OFFSET
1,1
FORMULA
a(n) = setbit(a(n-1),(p-1)/2) where p is the n-th odd prime.
EXAMPLE
a(3) = 14 because 3, 5 and 7 are odd primes so therefore bits 1, 2 and 3 are set and bit zero is not. 1110_2 = 14.
PROG
(Python)
import gmpy
a = gmpy.mpz(0)
i = 0
for p in range(3, 100, 2):
if gmpy.is_prime(p):
a = gmpy.setbit(a, (p-1)/2)
i += 1
print(i, a)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alan Griffiths, Oct 08 2007
STATUS
approved