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

A113823 Tribonacci analog of A055502.

Original entry on oeis.org

0, 2, 3, 7, 13, 29, 53, 97, 181, 337, 617, 1151, 2111, 3881, 7151, 13147, 24181, 44483, 81817, 150497, 276817, 509137, 936469, 1722431, 3168097, 5827001, 10717561, 19712669, 36257237, 66687469, 122657377, 225602099, 414946951, 763206467, 1403755531, 2581909003
Offset: 0

Views

Author

Jonathan Vos Post, Jan 23 2006

Keywords

Comments

This is to the tribonacci sequence as A055502 is to the Fibonacci sequence (i.e. least prime greater than the sum of the previous 2 terms in A055502, least prime greater than the sum of the previous 3 terms in this sequence).
The first 9 positive terms are also elements of A089189 but that coincidence breaks down as a(10) = 617 is a prime p, but p-1 = 616 = 2^3 * 7 * 11 is not cubefree.

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 2; a[2] = 3; a[n_] := a[n] = NextPrime[a[n-1] + a[n-2] + a[n-3]]; Array[a, 40, 0] (* Amiram Eldar, Sep 24 2023 *)

Formula

a(0) = 0, a(1) = 2, for n>2: a(n) = smallest prime > a(n-1)+a(n-2)+a(n-3).

Extensions

More terms from Amiram Eldar, Sep 24 2023

A113884 Pentanacci analog of A055502.

Original entry on oeis.org

0, 2, 3, 7, 13, 29, 59, 113, 223, 439, 877, 1721, 3389, 6653, 13093, 25741, 50599, 99487, 195581, 384509, 755959
Offset: 0

Views

Author

Jonathan Vos Post, Jan 27 2006

Keywords

Comments

This is to the pentanacci sequence as A055502 is to the Fibonacci sequence and A113823 is to the tribonacci sequence (i.e., least prime greater than the sum of the previous 2 terms in A055502, least prime greater than the sum of the previous 3 terms in A113823, least prime greater than the sum of the previous 5 terms in this sequence).

Examples

			a(6) = 59 because a(1)+a(2)+a(3)+a(4)+a(5) = 2+3+7+13+29 = 54, the smallest prime beyond 54 is 59.
a(10) = 877 because a(5)+a(6)+a(7)+a(8)+a(9) = 29 + 59 + 113 + 223 + 439 = 863 is prime, the next prime being 14 more, namely 877.
		

Crossrefs

Formula

a(-n) = a(0) = 0, a(1) = 2, for n>1: a(n) = smallest prime > a(n-1)+a(n-2)+a(n-3)+a(n-4)+a(n-5).

A113843 Tetranacci analog of A055502.

Original entry on oeis.org

0, 2, 3, 7, 13, 29, 53, 103, 199, 389, 751, 1447, 2789, 5381, 10369, 19991, 38543, 74287, 143197, 276019, 532061, 1025579, 1976857, 3810517, 7345031, 14158009, 27290429, 52604017, 101397487, 195449957, 376741891, 726193373, 1399782719, 2698167947, 5200885961
Offset: 0

Views

Author

Jonathan Vos Post, Jan 24 2006

Keywords

Comments

This is to the tribonacci sequence as A055502 is to the Fibonacci sequence and A113823 is to the tribonacci sequence (i.e., least prime greater than the sum of the previous 2 terms in A055502, least prime greater than the sum of the previous 3 terms in A113823, least prime greater than the sum of the previous 4 terms in this sequence).

Examples

			a(15) = 19991 because a(11)+a(12)+a(13)+a(14) = 1447 + 2789 + 5381 + 10369 = 19986 and 19991 is the smallest prime > 19986.
		

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_,c_,d_}]:={b,c,d,NextPrime[a+b+c+d]}; Transpose[ NestList[ nxt,{0,2,3,7},40]][[1]] (* Harvey P. Dale, Sep 18 2013 *)

Formula

a(-n) = a(0) = 0, a(1) = 2, for n>1: a(n) = smallest prime > a(n-1)+a(n-2)+a(n-3)+a(n-4).

Extensions

More terms from Harvey P. Dale, Sep 18 2013

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

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

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