%I #23 Sep 08 2022 08:45:28
%S 12,18,39,75,82,92,133,152,273,428,568,617,749,922,949,975,1020,1033,
%T 1058,1088,1113,1207,1253,1329,1372,1389,1762,1784,1882,1943,1950,
%U 1962,1969,2372,2445,2508,2594,2768,2973,2977,3237,3327,3338,3459,3545,3550,3554
%N Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + ... + n^45 + n^47 is prime.
%H Vincenzo Librandi, <a href="/A124205/b124205.txt">Table of n, a(n) for n = 1..362</a>
%p a:= proc(n) option remember; local k;
%p for k from 1+`if`(n=1, 1, a(n-1)) while
%p not isprime(1+(k^49-k)/(k^2-1)) do od; k
%p end:
%p seq(a(n), n=1..40); # _Alois P. Heinz_, Jun 26 2014
%t 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 *)
%t Select[Range[2500], PrimeQ[Total[#^Range[1, 47, 2]] + 1] &] (* _Harvey P. Dale_, Jan 13 2011 *)
%o (PARI) for(n=1,10^4,if(ispseudoprime(sum(i=0,23,n^(2*i+1))+1),print1(n,", "))) \\ _Derek Orr_, Jun 24 2014
%o (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_
%Y Cf. A049407.
%K nonn
%O 1,1
%A _Artur Jasinski_, Dec 13 2006
%E a(35) and beyond from _Derek Orr_, Jun 24 2014