A124164 Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13 is prime.
10, 30, 52, 70, 94, 120, 126, 142, 150, 160, 292, 318, 336, 378, 466, 792, 918, 960, 1044, 1104, 1116, 1180, 1198, 1222, 1312, 1446, 1558, 1642, 1686, 1780, 1794, 1804, 1900, 1902, 1974, 1996, 2038, 2040, 2076, 2286, 2392, 2428, 2448, 2458, 2460, 2478, 2518, 2584, 2596, 2602, 2668, 2736, 2742, 2788, 2800
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[n: n in [0..3000]| IsPrime(1 + n + n^3 + n^5 + n^7+ n^9 + n^11 + n^13 )]; // Vincenzo Librandi, Nov 12 2010
-
Magma
[n: n in [0..3000] | IsPrime(s) where s is 1+&+[n^i: i in [1..13 by 2]]]; // Vincenzo Librandi, Jun 28 2014
-
Mathematica
Do[If[PrimeQ[1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + n^13], Print[n]], {n, 1, 300}] Select[Range[8000], PrimeQ[Total[#^Range[1, 13, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)
-
PARI
is(n)=isprime(1+n+n^3+n^5+n^7+n^9+n^11+n^13) \\ Charles R Greathouse IV, Feb 20 2017