OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Euclid Number
EXAMPLE
a(1) = 7 because 7 = 2*3 + 1 = 3*(1^2 + 1*0 + 0^2 + 1 + 0) + 1.
PROG
(PARI) a(n) = prod(k=1, n, prime(k)) + 1;
isA(n) = if( n<1 || (n%3 == 0), 0, 0 != sumdiv( n, d, kronecker( -3, d)));
for(n=0, 30, if(isA(a(n)), print1(a(n), ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Nov 18 2015
STATUS
approved