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-4 of 4 results.

A244376 Numbers k such that 1 + k + k^3 + k^5 + k^7 + k^9 + k^11 is prime.

Original entry on oeis.org

1, 2, 10, 40, 47, 55, 62, 121, 137, 152, 167, 201, 233, 278, 290, 293, 313, 333, 370, 382, 430, 452, 460, 506, 546, 555, 613, 625, 642, 675, 705, 711, 752, 767, 793, 797, 831, 835, 837, 872, 878, 891, 906, 917, 923, 978, 985, 1005, 1012, 1017, 1018, 1021
Offset: 1

Views

Author

Vincenzo Librandi, Jun 27 2014

Keywords

Crossrefs

Cf. A127936.
Cf. numbers n such that 1+n+n^3 + ... + n^k, with k odd: A006093 (k=1), A049407 (k=3), A124154 (k=5), A124150 (k=7), A124163 (k=9), this sequence (k=11), A124164 (k=13), A244377 (k=15), A244378 (k=17), A124178 (k=19), A244379 (k=21), A124181 (k=23), A244380 (k=25), A124185 (k=27), A244383 (k=29), A124186 (k=31), A244384 (k=33), A124187 (k=35), A244385 (k=37), A124189 (k=39), A244386 (k=41), A124200 (k=43), A244387 (k=45), A124205 (k=47), A244388 (k=49), A124206 (k=51), A244389 (k=53), A124207 (k=55), A244390 (k=57), A124208 (k=59), A244391 (k=61), A124209 (k=63).

Programs

  • Magma
    [n: n in [0..1500] | IsPrime(s) where s is 1+&+[n^i: i in [1..11 by 2]]];
    
  • Mathematica
    Select[Range[4000], PrimeQ[Total[#^Range[1, 11, 2]] + 1] &]
  • PARI
    isok(n) = isprime(1 + n + n^3 + n^5 + n^7 + n^9 + n^11); \\ Michel Marcus, Jun 27 2014
    
  • Sage
    i,n = var('i,n')
    [n for n in (1..2000) if is_prime(1+(n^(2*i+1)).sum(i,0,5))] # Bruno Berselli, Jun 27 2014

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

A124151 Smallest k such that 1 + Sum{j=1..n} k^(2*j-1) is prime.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 10, 2, 2, 1, 2, 1, 48, 182, 2, 1, 60, 1, 10, 42, 2, 1, 102, 12, 4, 12, 110, 1, 12, 1, 100, 5, 28, 18, 144, 1, 102, 9, 2, 1, 30, 1, 186, 110, 130, 1, 566, 23, 1234, 2, 12, 1, 336, 103, 142, 341, 1104, 1, 444, 1, 22, 119, 2, 45, 14, 1, 84, 23, 238, 1, 936, 1, 78, 12
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006, Dec 14 2006

Keywords

Comments

a(n) = 1 if and only if n is in A006093 (primes minus 1), so 1 occurs infinitely often.

Examples

			Consider n = 7. 1 + Sum{j=1...7} k^(2*j-1) evaluates to 8, 10923, 1793614, 71582789, 1271565756, 13433856703, 98907531458, 558482096649, 2573639151184, 10101010101011 for k = 1, ..., 10. Only the last of these numbers, 1+10+10^3+10^5+10^7+10^9+10^11+10^13 = 10101010101011, is prime, hence a(7) = 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[Sum[k^(2j - 1), {j, n}] + 1], k++ ]; k]; Array[f, 74] (* Robert G. Wilson v, Dec 17 2006 *)
  • PARI
    a(n)={my(k=1);while(!isprime(1+sum(j=1,n,k^(2*j-1))),k++); k} \\ Klaus Brockhaus, Dec 16 2006

Extensions

Edited and extended by Klaus Brockhaus, Dec 16 2006

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-4 of 4 results.