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.

Showing 1-3 of 3 results.

A124401 Indices where 2 occurs in A124151.

Original entry on oeis.org

3, 5, 8, 9, 11, 15, 21, 39, 50, 63, 83, 95, 99, 173, 350, 854, 1308, 1769, 2903, 5250, 5345, 5639, 6195, 7239, 21368, 41669, 47684, 58619, 63515, 69468, 70539, 133508, 134993, 187160, 493095
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Comments

Does 2 occur infinitely often in A124151?
The sum in A124151 is 1+n if k=1, and 1+k*(k^(2n)-1)/(k^2-1) if k>1. The indices of A124151(n)=2 are where k=1 is avoided, but where k=2 leads to a prime, i.e., where 1+n is not prime but 1+2*(4^n-1)/3 = (2^(2n+1)+1)/3 is prime. Therefore this sequence here is constructed by taking all n=(A000978(i)-1)/2 (the members of A127936), and eliminating cases with 1+n in A000040. - R. J. Mathar, Feb 03 2010

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[ Sum[k^(2j - 1), {j, n}] + 1] && k < 3, k++ ]; k]; lst = {}; Do[ If[f@n == 2, Print[n]; AppendTo[lst, n]], {n, 9250}]; lst (* Robert G. Wilson v, Dec 17 2006 *)
  • PARI
    is(n) = !isprime(n+1) && isprime(1 + 2*(4^n-1)/3); \\ Amiram Eldar, Oct 24 2024

Formula

A127936 \ A006093. - R. J. Mathar, Feb 03 2010

Extensions

More terms from Robert G. Wilson v, Dec 17 2006
a(24)-a(35) from R. J. Mathar, Feb 03 2010

A126906 Smallest k such that 1 + k^(2*n+1) + Sum_{j=1..n} k^(2*j) is prime.

Original entry on oeis.org

1, 2, 1, 2, 1, 10, 17, 2, 1, 2, 1, 94, 122, 22, 1, 80, 1, 4, 6, 2, 1, 242, 3, 6, 5, 80, 1, 12, 1, 82, 96, 2, 7, 188, 1, 136, 69, 158, 1, 2, 1, 954, 50, 118, 1, 570, 14, 90, 45, 6, 1, 228, 38, 4, 6, 22, 1, 12, 1, 580, 86, 336, 24, 768, 1, 1170, 408, 340, 1, 896
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Comments

1 is a term if and only if number of terms in polynomial is prime.

Crossrefs

Programs

  • Mathematica
    a[n_]: = Module[{k = 1}, While[!PrimeQ[1 + k^(2*n+1) + Sum[k^(2*j), {j, 1, n}]], k++]; k]; Array[a, 30] (* Amiram Eldar, Mar 13 2020 *)
  • PARI
    a(n) = my(k = 1); while(! isprime(1 + k^(2*n+1) + sum(j=1, n, k^(2*j))), k++); k; \\ Michel Marcus, Mar 13 2020

Extensions

More terms from Amiram Eldar, Mar 13 2020

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
Showing 1-3 of 3 results.