PROG
(MAGMAMagma) [n: n in [0..5000] | IsPrime(s) where s is 1+&+[n^i: i in [1..31 by 2]]]; // Vincenzo Librandi, Jun 28 2014
(MAGMAMagma) [n: n in [0..5000] | IsPrime(s) where s is 1+&+[n^i: i in [1..31 by 2]]]; // Vincenzo Librandi, Jun 28 2014
editing
approved
(Sage)
i, n = var('i, n')
[n for n in (1..3100) if is_prime(1+(n^(2*i+1)).sum(i, 0, 15))] # Bruno Berselli, Jun 28 2014
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
editing
proposed
Select[Range[4000], PrimeQ[Total[#^Range[1, 31, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)
(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
nonn,easy,changed
approved
editing
editing
approved