%I #29 Sep 08 2022 08:45:28
%S 1,16,25,27,93,121,187,211,267,402,420,480,601,612,631,646,667,906,
%T 916,982,1023,1083,1131,1221,1248,1297,1326,1365,1485,1518,1683,1687,
%U 1806,1816,1840,1881,1975,1978,2001,2070,2098,2187,2275,2376,2382,2478,2563,2643,2836,3037,3043
%N Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + ... + n^27 + n^29 + n^31 is prime.
%C n can't be congruent to 2 mod 3, nor to 4 mod 5. - _Robert Israel_, Jun 24 2014
%H Robert Israel, <a href="/A124186/b124186.txt">Table of n, a(n) for n = 1..10000</a>
%p filter:= n -> isprime(1+add(n^(2*k+1),k=0..15));
%p select(filter, [$1..10000]); # _Robert Israel_, Jun 24 2014
%t Select[Range[100], PrimeQ[1 + Sum[#^(2k + 1), {k, 0, 15}]] &] (* _Alonso del Arte_, Jun 24 2014 *)
%t Select[Range[4000], PrimeQ[Total[#^Range[1, 31, 2]] + 1] &] (* _Vincenzo Librandi_, Jun 28 2014 *)
%o (PARI) for(n=1,10^4,if(ispseudoprime(sum(i=0,15,n^(2*i+1))+1),print1(n,", "))) \\ _Derek Orr_, Jun 24 2014
%o (Magma) [n: n in [0..5000] | IsPrime(s) where s is 1+&+[n^i: i in [1..31 by 2]]]; // _Vincenzo Librandi_, Jun 28 2014
%o (Sage)
%o i,n = var('i,n')
%o [n for n in (1..3100) if is_prime(1+(n^(2*i+1)).sum(i,0,15))] # _Bruno Berselli_, Jun 28 2014
%Y Cf. A049407, similar sequences listed in A244376.
%K nonn,easy
%O 1,2
%A _Artur Jasinski_, Dec 13 2006
%E a(46)-a(51) from _Derek Orr_, Jun 24 2014