cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A124186 Numbers n such that 1 + n + n^3 + n^5 + n^7 + n^9 + n^11 + ... + n^27 + n^29 + n^31 is prime.

Original entry on oeis.org

1, 16, 25, 27, 93, 121, 187, 211, 267, 402, 420, 480, 601, 612, 631, 646, 667, 906, 916, 982, 1023, 1083, 1131, 1221, 1248, 1297, 1326, 1365, 1485, 1518, 1683, 1687, 1806, 1816, 1840, 1881, 1975, 1978, 2001, 2070, 2098, 2187, 2275, 2376, 2382, 2478, 2563, 2643, 2836, 3037, 3043
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Comments

n can't be congruent to 2 mod 3, nor to 4 mod 5. - Robert Israel, Jun 24 2014

Crossrefs

Cf. A049407, similar sequences listed in A244376.

Programs

  • 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
    
  • Maple
    filter:= n -> isprime(1+add(n^(2*k+1),k=0..15));
    select(filter, [$1..10000]); # Robert Israel, Jun 24 2014
  • Mathematica
    Select[Range[100], PrimeQ[1 + Sum[#^(2k + 1), {k, 0, 15}]] &] (* Alonso del Arte, Jun 24 2014 *)
    Select[Range[4000], PrimeQ[Total[#^Range[1, 31, 2]] + 1] &] (* Vincenzo Librandi, Jun 28 2014 *)
  • PARI
    for(n=1,10^4,if(ispseudoprime(sum(i=0,15,n^(2*i+1))+1),print1(n,", "))) \\ Derek Orr, Jun 24 2014
    
  • 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

Extensions

a(46)-a(51) from Derek Orr, Jun 24 2014