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.

A124502 a(1)=a(2)=1; thereafter, a(n+1) = a(n) + a(n-1) + 1 if n is a multiple of 5, otherwise a(n+1) = a(n) + a(n-1).

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 14, 23, 37, 60, 98, 158, 256, 414, 670, 1085, 1755, 2840, 4595, 7435, 12031, 19466, 31497, 50963, 82460, 133424, 215884, 349308, 565192, 914500, 1479693, 2394193, 3873886, 6268079, 10141965, 16410045, 26552010, 42962055, 69514065, 112476120
Offset: 1

Views

Author

N. J. A. Sloane, May 25 2008

Keywords

Comments

If we split this sequence into 5 separate sequences of n mod 5, each individual sequence is of the form a(n) = 12*a(n-1) - 10*a(n-2) - a(n-3). For example, 12*98 - 10*9 - 1 = 1085. This is the same recurrence exhibited in A138134 and the n mod 5 =0 sequence...5, 60, 670, 7435 is A138134.

Examples

			a(6) = a(5) + a(4) + 1 = 5 + 3 + 1 = 9 because n=5 is a multiple of 5.
a(7) = a(6) + a(5) = 9 + 5 = 14 because n=6 is not a multiple of 5.
		

Crossrefs

Programs

  • Maple
    A124502:=proc(n) option remember; local t1; if n <= 2 then return 1; fi: if n mod 5 = 1 then t1:=1 else t1:=0; fi: procname(n-1)+procname(n-2)+t1; end proc; [seq(A124502(n), n=1..100)]; # N. J. A. Sloane, May 25 2008
  • Mathematica
    a=0; b=0; lst={a,b}; Do[z=a+b+1; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z,{n,4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 16 2010 *)
    nxt[{n_,a_,b_}]:={n+1,b,If[Divisible[n,5],a+b+1,a+b]}; NestList[nxt,{2,1,1},40][[All,2]] (* or *) LinearRecurrence[{1,1,0,0,1,-1,-1},{1,1,2,3,5,9,14},40] (* Harvey P. Dale, Jun 15 2017 *)

Formula

O.g.f.: x/((1-x)*(x^4 + x^3 + x^2 + x + 1)*(1 - x - x^2)). - R. J. Mathar, May 30 2008
a(n+5) = a(n) + Fibonacci(n+5), n>5.
a(n) = 12*a(n-5) - 10*a(n-10) - a(n-15). - Gary Detlefs, Dec 10 2010

Extensions

Typo in Maple code corrected by R. J. Mathar, May 30 2008
More specific name from R. J. Mathar, Dec 09 2009
Indices in definition corrected by N. J. A. Sloane, Nov 25 2010

A293553 a(n) is the integer k that minimizes |k/Fibonacci(n) - 1/4|.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 8, 14, 22, 36, 58, 94, 152, 247, 399, 646, 1045, 1691, 2736, 4428, 7164, 11592, 18756, 30348, 49104, 79453, 128557, 208010, 336567, 544577, 881144, 1425722, 2306866, 3732588, 6039454, 9772042, 15811496, 25583539, 41395035, 66978574
Offset: 0

Views

Author

Clark Kimberling, Oct 14 2017

Keywords

Crossrefs

Programs

  • Mathematica
    z = 120; r = 1/4; f[n_] := Fibonacci[n];
    Table[Floor[r*f[n]], {n, 0, z}];   (* A004697 *)
    Table[Ceiling[r*f[n]], {n, 0, z}]; (* A293552 *)
    Table[Round[r*f[n]], {n, 0, z}];   (* A293553 *)

Formula

G.f.: x^4/((-1 + x) (1 + x) (1 - x + x^2) (-1 + x + x^2) (1 + x + x^2)).
a(n) = a(n-1) + a(n-2) + a(n-6) - a(n-7) - a(n-8) for n >= 9.
a(n) = floor(1/2 + Fibonacci(n)/4).
a(n) = A004697(n) if (fractional part of Fibonacci(n)/4) < 1/2, otherwise a(n) = A293552(n).
a(n) = A131132(n-4) for n > 3. - Georg Fischer, Oct 22 2018
Showing 1-2 of 2 results.