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.

A126018 Smallest prime of the form 1 + Sum{j=1..n} k^(2*j-1).

Original entry on oeis.org

2, 3, 43, 5, 683, 7, 10101010101011, 43691, 174763, 11, 2796203, 13, 1074532291189456211731158116986854092943409, 10518179715343122711873674826619717982095485405484801996888751, 715827883, 17, 47765234780450752737667634787440955821061405946096137816061
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Comments

Primes arising in A124151.
If n=(prime number-1) then a(n) = prime(n). - Artur Jasinski, Dec 23 2006

Examples

			Consider n = 8. 1 + Sum{j=1...8} k^(2*j-1) evaluates to 9 for k = 1 and to 43691 for k = 2. 9 is composite but 43691 is prime, hence a(8) = 1+2+2^3+2^5+2^7+2^9+2^11+2^13+2^15 = 43691.
		

Crossrefs

Programs

  • Mathematica
    Table[k=0; Until[PrimeQ[p=1+Sum[k^(2j-1),{j,n}]], k++]; p, {n, 17}] (* James C. McMahon, Dec 23 2024 *)
  • PARI
    {for(n=1,14,k=1;while(!isprime(s=1+sum(j=1,n,k^(2*j-1))),k++);print1(s,","))} \\ Klaus Brockhaus, Dec 16 2006

Extensions

Edited and extended by Klaus Brockhaus, Dec 16 2006
a(15)-a(17) from James C. McMahon, Dec 23 2024