OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..362
MAPLE
a:= proc(n) option remember; local k;
for k from 1+`if`(n=1, 1, a(n-1)) while
not isprime(1+(k^49-k)/(k^2-1)) do od; k
end:
seq(a(n), n=1..40); # Alois P. Heinz, Jun 26 2014
MATHEMATICA
Do[If[PrimeQ[1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 + n^15 + n^17 + n^19 + n^21 + n^23 + n^25 + n^27 + n^29 + n^31 + n^33 + n^35 + n^37 + n^39 + n^41 + n^43 + n^45 + n^47], Print[n]], {n, 1, 2400}] (* Artur Jasinski *)
Select[Range[2500], PrimeQ[Total[#^Range[1, 47, 2]] + 1] &] (* Harvey P. Dale, Jan 13 2011 *)
PROG
(PARI) for(n=1, 10^4, if(ispseudoprime(sum(i=0, 23, n^(2*i+1))+1), print1(n, ", "))) \\ Derek Orr, Jun 24 2014
(Magma) [n: n in [0..4000] | IsPrime(s) where s is 1+&+[n^i: i in [1..47 by 2]]]; // Vincenzo Librandi, Jun 27 2014, after Derek Orr
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 13 2006
EXTENSIONS
a(35) and beyond from Derek Orr, Jun 24 2014
STATUS
approved