# Tag Info

### Calculate the number of primes up to n

C, 0.026119s (Mar 12 2016) ...
• 210k

### Is this even or odd?

ArnoldC, 299 283 bytes ...
• 104k

### Coprimes up to N

Python 2, 61 47 bytes lambda n:[k/n for k in range(n*n)if k/n*k%n==1] Try it online! Background Consider the ring $(Z_n, +_n, \cdot_n)$. While this ring is ...
• 210k

### Is this number a prime?

Hexagony, 28 bytes Since Etoplay absolutely trounced me on this question, I felt that I had to outgolf his only other answer. ...
• 11.6k

### Is this even or odd?

brainfuck, 8 bytes +[,>,]<. Input is in unary. Output is the 1 (truthy) for odd numbers and NUL (falsy) for even numbers. Try it online! How it works We ...
• 210k

### Theoretically output Graham's number

Binary lambda calculus, 114 bits = 14.25 bytes Hexdump: 00000000: 4457 42b0 2d88 1f9d 740e 5ed0 39ce 80 DWB.-...t.^.9.. Binary: ...
• 39.6k

### Compute the Carmichael function

Mathematica, 16 bytes CarmichaelLambda Well...
• 197k
Accepted

### Is it a Proth number?

Jelly, 5 bytes ’&C²> Try it online! or verify all test cases. Let $\newcommand{\&}[]{\text{ & }}j$ be a strictly positive integer. $j + 1$ ...
• 210k

### Is it a Proth number?

Python, 22 bytes lambda N:N-1&1-N>N**.5 This is a port of my Jelly answer. Test it on Ideone. How it works Let $\newcommand{\&}[]{\text{ & }}j$ ...
• 210k

### Abandon all squares, ye who divide me

05AB1E, 2 bytes fP Try it online! How it works ...
• 210k

• 15.7k

### Egyptian fraction representations of 1

Python 2, 42 bytes f=lambda n,x=1:1/n*[x]or[x+1]+f(n-1,x*-~x) Try it online! The key thing to observe is that ...
• 22.7k

671 ...
• 39.6k
Accepted

### How to solve the LCM in 50 bytes of Python

My solution to 50 bytes: v=1 for x in input().split()*6**6:v+=-v%int(x) print(v) Explanation The solution itself is relatively simple, but finding it was ...
• 22.7k

### Compute the Carmichael function

Python, 76 73 67 bytes f=lambda n,k=1:1-any(a**-~k*~-a**k%n for a in range(n))or-~f(n,k+1) Try it online! A further byte could be saved by returning True instead ...
• 210k

### Find the 10-adic cube root of 3

Python 2, 33 bytes lambda k:pow(3,10**k*2/3+1,10**k) Try it online! The pow function efficiently computes the modular ...
• 145k

### Find the smallest positive integer which has all integers from 1 to n as factors

Python, 46 bytes g=lambda n,c=0:n<1or(c%n<1)*c or g(n,c+g(n-1)) Take that, past xnor! 50 bytes: ...
• 145k
Accepted

### Is this number Loeschian?

Jelly, 11 9 bytes ÆF‘%3,2ḄȦ Try it online! or verify all test cases. Background In Elementary results on the binary quadratic form a² + ab + b², the author proves ...
• 210k