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

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

A345471 a(0) = a(1) = 1, a(n) is the smallest positive integer m >= a(n-1) + a(n-2) such that gcd(a(k),m) = 1 for all 1 < k <= n - 1.

Original entry on oeis.org

1, 1, 2, 3, 5, 11, 17, 29, 47, 79, 127, 211, 343, 557, 907, 1469, 2377, 3847, 6229, 10079, 16319, 26399, 42719, 69119, 111841, 180967, 292811, 473779, 766607, 1240387, 2006999, 3247393, 5254397, 8501791, 13756189, 22258001, 36014191, 58272197, 94286389, 152558587
Offset: 0

Views

Author

Amrit Awasthi, Jun 20 2021

Keywords

Comments

First differs from A073021 at a(12).

Examples

			a(5) = 11 because 11 is the smallest number greater than or equal to a(3) + a(4) = 5 + 3 = 8 which is coprime to all previous terms of the sequence.
		

Crossrefs

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = Module[{k = a[n - 1] + a[n - 2]}, While[! AllTrue[Range[2, n - 1], CoprimeQ[a[#], k] &], k++]; k]; Array[a, 40, 0] (* Amiram Eldar, Jun 20 2021 *)
Showing 1-2 of 2 results.