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-10 of 14 results. Next

A065436 Duplicate of A055500.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 17, 23, 37, 59, 89, 139, 227, 359, 577, 929, 1499, 2423, 3919, 6337
Offset: 1

Views

Author

Keywords

A068523 Essentially the same as A055500.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 23, 37, 59, 89, 139, 227, 359, 577, 929, 1499, 2423, 3919, 6337, 10253
Offset: 1

Views

Author

Keywords

A362883 a(n) = A055498(n) - A055500(n).

Original entry on oeis.org

-1, 0, 0, 0, 0, 4, 6, 12, 24, 42, 68, 122, 208, 336, 552, 904, 1464, 2378, 3848, 6232, 10090, 16338, 26446, 42802, 69252, 112072, 181332, 293412, 474762, 768190, 1242960, 2011162, 3254150, 5265324, 8519478, 13784866, 22304378, 36089262, 58393658, 94482964, 152876664
Offset: 0

Views

Author

Philip Baciaz, May 07 2023

Keywords

Comments

After the initial zeros, {a(n)} seems approximately linear on a log scale (not a surprise with the prime number theorem in mind?), a(n-1)/a(n) seems to converge to the golden ratio (A001622), and 1/a(5) + 1/a(6) + ... + 1/a(n) seems to converge to 0.60086367622...

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n<3, n+1, (h-> `if`(t=1,
          prevprime(h), nextprime(h)))(t+b(n-1, t)+b(n-2, t)))
        end:
    a:= n-> b(n,-1)-b(n,1):
    seq(a(n), n=1..50);  # Alois P. Heinz, May 12 2023
  • Mathematica
    b[n_, t_] := b[n, t] = If[n < 3, n+1, Function[h, If[t == 1, NextPrime[h, -1], NextPrime[h]]][t + b[n-1, t] + b[n-2, t]]];
    a[n_] := If[n == 0, -1, b[n-1, -1] - b[n-1, 1]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, May 19 2024, after Alois P. Heinz *)

A055498 a(0)=0, a(1)=1, a(n) = smallest prime >= a(n-1) + a(n-2).

Original entry on oeis.org

0, 1, 2, 3, 5, 11, 17, 29, 47, 79, 127, 211, 347, 563, 911, 1481, 2393, 3877, 6271, 10151, 16427, 26591, 43019, 69623, 112643, 182279, 294923, 477209, 772139, 1249361, 2021501, 3270863, 5292367, 8563237, 13855607, 22418849, 36274471, 58693331, 94967809, 153661163
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2000

Keywords

Examples

			After 3, 5, the next prime >=8 is 11.
		

Crossrefs

Programs

  • Haskell
    a055498 n = a055498_list !! n
    a055498_list = 0 : 1 : map a007918
        (zipWith (+) a055498_list $ tail a055498_list)
    -- Reinhard Zumkeller, Nov 13 2014
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = NextPrime[a[n - 1] + a[n - 2] -1]; Array[a, 37, 0] (* Robert G. Wilson v, Mar 13 2013 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==NextPrime[a[n-1]+a[n-2]-1]},a,{n,50}] (* Harvey P. Dale, May 08 2013 *)
  • PARI
    a(n)=local(v);if(n<2,n>=0,n++;v=vector(n,i,1);for(i=3,n,v[i]=nextprime(v[i-1]+v[i-2]));v[n]) /* Michael Somos, Feb 01 2004 */
    

Formula

a(n+1) = nextprime(a(n) + a(n-1)) where nextprime(n) is smallest prime >= n.
a(n) is asymptotic to c*phi^n where phi = (1 + sqrt(5))/2 and c = 1.086541275044988562375... - Benoit Cloitre, May 02 2004
a(n) = A055499(n-1) for n>3. - Robert G. Wilson v, Mar 13 2013
a(n) = A007918(a(n-1) + a(n-2)) for n > 1. - Reinhard Zumkeller, Nov 13 2014

A054998 Integers that can be expressed as the sum of consecutive primes in exactly 3 ways.

Original entry on oeis.org

41, 83, 197, 199, 223, 240, 251, 281, 287, 340, 371, 401, 439, 491, 510, 593, 660, 733, 803, 857, 864, 883, 931, 941, 961, 983, 990, 991, 1012, 1060, 1061, 1099, 1104, 1187, 1236, 1283, 1313, 1361, 1381, 1392, 1433, 1439, 1493, 1511, 1523, 1524, 1553
Offset: 1

Views

Author

Jud McCranie, May 30 2000

Keywords

Examples

			41 can be expressed as 41 or 11+13+17 or 2+3+5+7+11+13, so 41 is in the sequence.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, section C2.

Crossrefs

Programs

  • Maple
    N:= 10^4: # to get all terms <= N
    P:= [0,op(select(isprime, [2,seq(i,i=3..N,2)]))]:
    nP:= nops(P);
    S:= ListTools:-PartialSums(P):
    V:= Vector(N):
    for i from 1 to nP-1 do
      for j from i+1 to nP while S[j] - S[i] <= N do
         V[S[j]-S[i]]:= V[S[j]-S[i]]+1
    od od:
    select(t -> V[t] = 3, [$1..N]): # Robert Israel, Apr 05 2017
  • Mathematica
    Module[{nn = 300, s}, s = Array[Prime, nn]; Keys@ Take[Select[KeySort@ Merge[Table[PositionIndex@ Map[Total, Partition[s, k, 1]], {k, nn/2}], Identity], Length@ # == 3 &], Floor[nn/6]]] (* Michael De Vlieger, Apr 06 2017, Version 10 *)

Formula

A054845(a(n)) = 3. - Ray Chandler, Sep 20 2023

A054999 Integers that can be expressed as the sum of consecutive primes in exactly 4 ways.

Original entry on oeis.org

1151, 1164, 1320, 1367, 1650, 1854, 1951, 2393, 2647, 2689, 2856, 2867, 3198, 3264, 3389, 3754, 4200, 4920, 4957, 5059, 5100, 5153, 5770, 5999, 6504, 7451, 7901, 8152, 8819, 10134, 10320, 10499, 10536, 10649, 10859, 10949, 11058, 12294
Offset: 1

Views

Author

Jud McCranie, May 30 2000

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, section C2.

Crossrefs

Formula

A054845(a(n)) = 4. - Ray Chandler, Sep 20 2023

A055502 a(0)=0, a(1)=2, a(n) = smallest prime > a(n-1)+a(n-2).

Original entry on oeis.org

0, 2, 3, 7, 11, 19, 31, 53, 89, 149, 239, 389, 631, 1021, 1657, 2683, 4349, 7039, 11393, 18433, 29833, 48271, 78121, 126397, 204521, 330943, 535481, 866431, 1401937, 2268377, 3670319, 5938711, 9609031, 15547769, 25156811, 40704589, 65861461, 106566059, 172427531
Offset: 0

Views

Author

N. J. A. Sloane, Jul 09 2000

Keywords

Crossrefs

Programs

  • Maple
    A055502 := proc(n) option remember; if n<=0 then n else nextprime(A055502(n-1)+A055502(n-2)); fi; end;
  • Mathematica
    a[0] = 0; a[1] = 2; a[n_] := a[n] = NextPrime[a[n-1] + a[n-2]]; Array[a, 40, 0] (* Amiram Eldar, Sep 24 2023 *)

Extensions

More terms from Amiram Eldar, Sep 24 2023

A054997 Integers that can be expressed as the sum of consecutive primes in exactly 2 ways.

Original entry on oeis.org

5, 17, 23, 31, 36, 53, 59, 60, 67, 71, 72, 90, 97, 100, 101, 109, 112, 119, 120, 127, 131, 138, 139, 143, 152, 173, 180, 181, 187, 204, 210, 211, 221, 228, 233, 258, 263, 269, 271, 276, 300, 304, 323, 330, 331, 349, 353, 372, 373, 379, 384, 390, 395, 408
Offset: 1

Views

Author

Jud McCranie, May 30 2000

Keywords

Examples

			5 can be expressed as 5 or 2+3, so 5 is in the sequence.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, section C2.

Crossrefs

Formula

A054845(a(n)) = 2. - Ray Chandler, Sep 20 2023

A055499 a(0)=0, a(1)=1, a(n) = smallest prime > a(n-1)+a(n-2).

Original entry on oeis.org

0, 1, 2, 5, 11, 17, 29, 47, 79, 127, 211, 347, 563, 911, 1481, 2393, 3877, 6271, 10151, 16427, 26591, 43019, 69623, 112643, 182279, 294923, 477209, 772139, 1249361, 2021501, 3270863, 5292367, 8563237, 13855607, 22418849, 36274471, 58693331, 94967809, 153661163
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2000

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = NextPrime[a[n - 1] + a[n - 2]]; Array[a, 36, 0] (* Robert G. Wilson v, Mar 13 2013 *)

A055501 a(0)=1, a(1)=2, a(n) = largest prime < a(n-1)+a(n-2).

Original entry on oeis.org

1, 2, 2, 3, 3, 5, 7, 11, 17, 23, 37, 59, 89, 139, 227, 359, 577, 929, 1499, 2423, 3919, 6337, 10253, 16573, 26821, 43391, 70207, 113591, 183797, 297377, 481171, 778541, 1259701, 2038217, 3297913, 5336129, 8633983, 13970093, 22604069, 36574151, 59178199, 95752333
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2000

Keywords

Comments

Except for initial terms, same as A055500. - Franklin T. Adams-Watters, Jul 11 2006

Crossrefs

Programs

  • Mathematica
    Transpose[NestList[{#[[2]],NextPrime[Total[#],-1]}&,{1,2},40]][[1]] (* Harvey P. Dale, May 29 2013 *)
Showing 1-10 of 14 results. Next