login
Numbers k such that 1 + k + k^3 + k^5 + k^7 + k^9 + ... + k^15 is prime.
2

%I #16 Sep 08 2022 08:46:08

%S 2,3,15,26,30,42,63,77,107,114,123,131,143,149,173,177,212,288,297,

%T 308,309,348,411,474,548,551,600,659,681,701,705,711,770,780,788,833,

%U 840,894,927,1011,1016,1059,1064,1082,1092,1104,1178,1239,1290,1400,1422

%N Numbers k such that 1 + k + k^3 + k^5 + k^7 + k^9 + ... + k^15 is prime.

%H Vincenzo Librandi, <a href="/A244377/b244377.txt">Table of n, a(n) for n = 1..1100</a>

%t Select[Range[5000], PrimeQ[Total[#^Range[1, 15, 2]] + 1]&]

%o (Magma) [n: n in [0..1500] | IsPrime(s) where s is 1+&+[n^i: i in [1..15 by 2]]];

%o (Sage)

%o i,n = var('i,n')

%o [n for n in (1..2000) if is_prime(1+(n^(2*i+1)).sum(i,0,7))] # _Bruno Berselli_, Jun 27 2014

%Y Cf. similar sequences listed in A244376.

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Jun 27 2014