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

A073021 Apart from initial 0, same as A055498.

Original entry on oeis.org

1, 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
Offset: 0

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 *)

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

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, 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

Or might be called Ishikawa primes, as he proved that prime(n+2) < prime(n) + prime(n+1) for n > 1. This improves on Bertrand's Postulate (Chebyshev's theorem), which says prime(n+2) < prime(n+1) + prime(n+1). - Jonathan Sondow, Sep 21 2013

Examples

			a(8) = 23 because 23 is largest prime <= a(7) + a(6) = 17 + 11 = 28.
		

Crossrefs

Programs

  • Haskell
    a055500 n = a055500_list !! n
    a055500_list = 1 : 1 : map a007917
                   (zipWith (+) a055500_list $ tail a055500_list)
    -- Reinhard Zumkeller, May 01 2013
    
  • Mathematica
    PrevPrim[n_] := Block[ {k = n}, While[ !PrimeQ[k], k-- ]; Return[k]]; a[1] = a[2] = 1; a[n_] := a[n] = PrevPrim[ a[n - 1] + a[n - 2]]; Table[ a[n], {n, 1, 42} ]
    (* Or, if version >= 6 : *)a[0] = a[1] = 1; a[n_] := a[n] = NextPrime[ a[n-1] + a[n-2] + 1, -1]; Table[a[n], {n, 0, 100}](* Jean-François Alcover, Jan 12 2012 *)
    nxt[{a_,b_}]:={b,NextPrime[a+b+1,-1]}; Transpose[NestList[nxt,{1,1},40]] [[1]] (* Harvey P. Dale, Jul 15 2013 *)
  • Python
    from sympy import prevprime; L = [1, 1]
    for _ in range(36): L.append(prevprime(L[-2] + L[-1] + 1))
    print(*L, sep = ", ")  # Ya-Ping Lu, May 05 2023

Formula

a(n) is asymptotic to C*phi^n where phi = (1+sqrt(5))/2 and C = 0.41845009129953131631777132510164822489... - Benoit Cloitre, Apr 21 2003
a(n) = A007917(a(n-1) + a(n-2)) for n > 1. - Reinhard Zumkeller, May 01 2013
a(n) >= prime(n-1) for n > 1, by Ishikawa's theorem. - Jonathan Sondow, Sep 21 2013

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

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 *)

A073022 Each term is the smallest prime > the sum of the previous 2 terms.

Original entry on oeis.org

1, 1, 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
Offset: 0

Views

Author

Phil Carmody, Aug 15 2002

Keywords

Examples

			After 1,1, the next prime >2 is 3.
		

Crossrefs

Cf. A055498.

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,NextPrime[a+b]}; NestList[nxt,{1,1},40][[All,1]] (* Harvey P. Dale, Apr 14 2022 *)
  • PARI
    l=1; h=1; print1("1, 1, "); while(l<2^32,t=l+h+1; while(!isprime(t),t+=1); print1(t,", "); l=h; h=t)

Formula

a(n+1)=nextprime(a(n)+a(n-1))

A351140 a(1) = 1, a(n) = smallest prime > a(n-1) + n.

Original entry on oeis.org

1, 5, 11, 17, 23, 31, 41, 53, 67, 79, 97, 113, 127, 149, 167, 191, 211, 233, 257, 281, 307, 331, 359, 389, 419, 449, 479, 509, 541, 577, 613, 647, 683, 719, 757, 797, 839, 881, 929, 971, 1013, 1061, 1109, 1163, 1213, 1277, 1327, 1381, 1433, 1487, 1543, 1597
Offset: 1

Views

Author

Alex Ratushnyak, Feb 02 2022

Keywords

Comments

The sequence with >= in place of > is essentially the same after the first three terms: 1, 3, 7, 11, 17, 23, 31, ...

Examples

			The smallest prime above 1+2 is 5, so a(2)=5.
The smallest prime above 5+3 is 11, so a(3)=11.
		

Crossrefs

Programs

  • Maple
    R:= 1: p:= 1:
    for n from 2 to 100 do
      p:= nextprime(p+n);
      R:= R,p;
    od:
    R; # Robert Israel, Nov 20 2023
  • Mathematica
    a[1] = 1; a[n_] := a[n] = NextPrime[a[n - 1] + n]; Array[a, 50] (* Amiram Eldar, Feb 03 2022 *)
  • PARI
    lista(nn) = my(list = List(), last = 1); listput(list, last); for (n=2, nn, last = nextprime(last + n +1); listput(list, last);); Vec(list); \\ Michel Marcus, Feb 03 2022
  • Python
    from sympy import nextprime
    p = 1
    for i in range(2,1000):
      print(p, end=",")
      p = nextprime(p+i)
    
Showing 1-8 of 8 results.