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.

Previous Showing 11-14 of 14 results.

A065435 a(3) = 2, a(4) = 3; for n > 4, a(n) = {a(n-2)}+{a(n-1)}, where {a} means largest prime <= a.

Original entry on oeis.org

2, 3, 5, 8, 12, 18, 28, 40, 60, 96, 148, 228, 366, 586, 936, 1506, 2428, 3922, 6342, 10256, 16590, 26826, 43394, 70212, 113598, 183798, 297388, 481174, 778548, 1259712, 2038242, 3297918, 5336130, 8634042, 13970112, 22604076, 36574162
Offset: 3

Views

Author

Bodo Zinser, Nov 17 2001

Keywords

Examples

			a(9) = 28 because 11+17 = 28 and 11 largest prime <= a(7) = 12 and 17 is largest prime <= a(8) = 18
		

Crossrefs

Programs

  • Haskell
    a065435 n = a065435_list !! (n-3)
    a065435_list = 2 : 3 : zipWith (+) xs (tail xs) where
                   xs = map (a007917 . fromInteger) a065435_list
    -- Reinhard Zumkeller, Aug 10 2012
  • Mathematica
    PrevPrim[n_] := Block[ {k = n}, While[ !PrimeQ[k], k-- ]; Return[k]]; a[3] = 2; a[4] = 3; a[n_] := a[n] = PrevPrim[ a[n - 1]] + PrevPrim[ a[n - 2]]; Table[ a[n], {n, 3, 45} ]
    np[n_]:=If[PrimeQ[n],n,NextPrime[n,-1]]; Transpose[NestList[{Last[#], np[Last[#]]+np[First[#]]}&,{2,3},40]][[1]] (* Harvey P. Dale, Oct 01 2011 *)
  • PARI
    for (n=3, 300, if (n>4, a=precprime(a2) + precprime(a1); a2=a1; a1=a, if (n==4, a=a1=3, a=a2=2)); write("b065435.txt", n, " ", a) ) \\ Harry J. Smith, Oct 18 2009
    

Formula

a(n) = A007917(a(n-2)) + A007917(a(n-1)). - Jonathan Vos Post, Jul 10 2008

Extensions

More terms from Robert G. Wilson v, Nov 19 2001
Definition corrected by Harry J. Smith, Oct 18 2009

A071353 First term of the continued fraction expansion of (3/2)^n.

Original entry on oeis.org

2, 4, 2, 16, 1, 2, 11, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 8, 5, 1, 7, 1, 25, 16, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 3, 1, 1, 2, 7, 4, 3, 2, 4, 1, 3, 1, 3, 1, 1, 1, 2, 10, 1, 2, 4, 1, 4, 2, 1, 3, 2, 14, 9, 6, 1, 11, 1, 1, 2, 1, 1, 2, 6, 1, 12, 1, 1, 2, 1, 2, 19, 12, 8, 1, 89, 59, 1, 3
Offset: 1

Views

Author

Paul D. Hanna, Jun 10 2002

Keywords

Comments

If uniformly distributed, then the average of the reciprocal terms of this sequence is 1/2.
"Pisot and Vijayaraghavan proved that (3/2)^n has infinitely many accumulation points, i.e. infinitely many convergent subsequences with distinct limits. The sequence is believed to be uniformly distributed, but no one has even proved that it is dense in [0,1]." - S. R. Finch.

Examples

			a(7) = 11 since floor(1/frac(3^7/2^7)) = floor(1/.0859375) = 11.
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 192-199.

Crossrefs

Programs

  • Mathematica
    Table[Floor[1/FractionalPart[(3/2)^n]], {n, 1, 100}] (* G. C. Greubel, Apr 18 2017 *)
  • PARI
    a(n) = contfrac((3/2)^n)[2] \\ Michel Marcus, Aug 01 2013

Formula

a(n) = floor(1/frac((3/2)^n)).

A345020 a(0) = a(1) = 1, a(n) = largest natural number m <= a(n-1) + a(n-2) where gcd(m,a(k)) = 1 for all 1 < k <= n-1.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 17, 23, 37, 59, 89, 139, 227, 361, 587, 947, 1531, 2477, 4007, 6481, 10487, 16963, 27449, 44393, 71837, 116227, 188063, 304289, 492343, 796627, 1288967, 2085593, 3374557, 5460139, 8834689, 14294827, 23129507, 37424333, 60553837, 97978169
Offset: 0

Views

Author

Amrit Awasthi, Jun 05 2021

Keywords

Comments

First differs from A055500 at a(14).

Examples

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

Crossrefs

Cf. A055500.

Programs

  • Maple
    A[0]:= 1:
    A[1]:= 1: P:= 1:
    for n from 2 to 100 do
      for k from A[n-2]+A[n-1] by -1 do
        if igcd(k,P) = 1 then break fi
      od;
      A[n]:= k;
      P:= P*k;
    od:
    convert(A,list); # Robert Israel, Oct 23 2024
  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = Module[{k = a[n - 1] + a[n - 2]}, While[! AllTrue[Range[2, n - 2], CoprimeQ[a[#], k] &], k--]; k]; Array[a, 50, 0] (* Amiram Eldar, Jun 05 2021 *)

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

Original entry on oeis.org

1, 1, 1, 3, 5, 7, 13, 23, 43, 79, 139, 257, 467, 863, 1583, 2909, 5351, 9839, 18097, 33287, 61223, 112603, 207113, 380929, 700643, 1288657, 2370223, 4359517, 8018383, 14748119, 27126019, 49892519, 91766581, 168785119, 310444181
Offset: 0

Views

Author

Jonathan Vos Post, Mar 09 2007

Keywords

Comments

Analog of A055500 a(0)=1, a(1)=1, a(n) = largest prime <= a(n-1)+a(n-2). Might be called the Prime-tribonacci sequence. a(n) is asymptotic to c*T^n where T is the tribonacci constant 1.83928675 whose digits are A058265 for a real constant c.

Examples

			a(3) = 3 = a(0)+a(1)+a(2) = 1+1+1 = 3.
a(4) = 5 = a(1)+a(2)+a(3) = 1+1+3 = 5.
a(5) = 7 < a(2)+a(3)+a(4) = 1+3+5 = 9.
a(6) = 13 < a(3)+a(4)+a(5) = 3+5+7 = 15.
a(7) = 23 < a(4)+a(5)+a(6) = 5+7+13 = 25.
a(8) = 43 = a(5)+a(6)+a(7) = 7+13+23 = 43.
a(9) = 79 = a(6)+a(7)+a(8) = 13+23+43 = 79.
a(10) = 139 < a(7)+a(8)+a(9) = 23+43+79 = 145.
		

Crossrefs

Programs

  • Maple
    a[0]:=1:a[1]:=1:a[2]:=1:for n from 3 to 40 do a[n]:=prevprime(1+a[n-1]+a[n-2]+a[n-3]) od: seq(a[n],n=0..40); # Emeric Deutsch, Mar 24 2007

Extensions

More terms from Emeric Deutsch, Mar 24 2007
Offset corrected by N. J. A. Sloane, Jun 16 2021
Previous Showing 11-14 of 14 results.