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

A053602 a(n) = a(n-1) - (-1)^n*a(n-2), a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025
Offset: 0

Views

Author

Michael Somos, Jan 17 2000

Keywords

Comments

If b(0)=0, b(1)=1 and b(n) = b(n-1) + (-1)^n*b(n-2), then a(n) = b(n+3). - Jaume Oliver Lafont, Oct 03 2009
a(n) is the number of palindromic compositions of n-1 into parts of 1 and 2. a(7) = 5 because we have 2+2+2, 2+1+1+2, 1+2+2+1, 1+1+2+1+1, 1+1+1+1+1+1. - Geoffrey Critzer, Mar 17 2014
a(n) is the number of palindromic compositions of n into odd parts (the corresponding generating function follows easily from Theorem 1.2 of the Hoggatt et al. reference). Example: a(7) = 5 because we have 7, 1+5+1, 3+1+3, 1+1+3+1+1, 1+1+1+1+1+1+1. - Emeric Deutsch, Aug 16 2016
The ratio of a(n)/a(n-1) oscillates between phi-1 and phi+1 as n tends to infinity, where phi is golden ratio (A001622). - Waldemar Puszkarz, Oct 10 2017

Crossrefs

Programs

  • Magma
    I:=[0,1,1,2]; [n le 4 select I[n] else Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi Oct 10 2017
    
  • Maple
    a[0] := 0: a[1] := 1: for n from 2 to 60 do a[n] := a[n-1]-(-1)^n*a[n-2] end do: seq(a[n], n = 0 .. 50); # Emeric Deutsch, Oct 09 2017
  • Mathematica
    nn=50;CoefficientList[Series[x (1+x+x^2)/(1-x^2-x^4),{x,0,nn}],x] (* Geoffrey Critzer, Mar 17 2014 *)
    LinearRecurrence[{0,1,0,1},{0,1,1,2},60] (* Harvey P. Dale, Nov 07 2016 *)
    RecurrenceTable[{a[0]==0, a[1]==1, a[n]==a[n-1]-(-1)^n a[n-2]}, a, {n, 50}] (* Vincenzo Librandi, Oct 10 2017 *)
  • PARI
    a(n)=fibonacci(n\2+n%2*2)
    
  • SageMath
    [fibonacci(n//2 + 2*(n%2)) for n in range(61)] # G. C. Greubel, Dec 06 2022

Formula

G.f.: x*(1 + x + x^2)/(1 - x^2 - x^4).
a(n) = a(n-2) + a(n-4).
a(2n) = F(n), a(2n-1) = F(n+1) where F() is Fibonacci sequence.
a(3-n) = A051792(n).
a(3)=1, a(4)=2, a(n+2) = a(n+1) + sign(a(n) - a(n+1))*a(n), n > 4. - Benoit Cloitre, Apr 08 2002
a(n) = A079977(n-1) + A079977(n-2) + A079977(n-3), n > 2. - Ralf Stephan, Apr 26 2003
a(0) = 0, a(1) = 1; a(2n) = a(2n-1) - a(2n-2); a(2n+1) = a(2n) + a(2n-1). - Amarnath Murthy, Jul 21 2005

A123231 Row sums of A123230.

Original entry on oeis.org

1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025, 196418
Offset: 1

Views

Author

Roger L. Bagula, Oct 06 2006

Keywords

Comments

All terms are Fibonacci numbers A000045: a(2n-1) = Fibonacci(n), a(2n) = Fibonacci(n+2), a(2n-1) = a(2n+2). - Alexander Adamchuk, Oct 08 2006

Crossrefs

Programs

  • GAP
    a:=[1,2,1,3];; for n in [5..50] do a[n]:=a[n-2]+a[n-4]; od; a; # Muniru A Asiru, Oct 12 2018
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1 + 2*x + x^3)/(1 - x^2 - x^4))); // G. C. Greubel, Oct 12 2018
    
  • Maple
    seq(coeff(series(-x*(1+2*x+x^3)/(x^4+x^2-1),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    p[0, x] = 1; p[1, x] = x + 1; p[k_, x_] := p[k, x] = x*p[k - 1, x] + (-1)^(n + 1)p[k - 2, x]; Table[Sum[CoefficientList[p[n, x], x][[m]], {m, 1, n + 1}], {n, 0, 20}]
    Rest[Flatten[Reverse/@Partition[Fibonacci[Range[30]],2,1]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    vector(50, n, fibonacci(3/4 -(-1)^(n+1)*3/4 +(n+1)/2)) \\ G. C. Greubel, Oct 12 2018
    

Formula

From Alexander Adamchuk, Oct 08 2006: (Start)
a(n) = Fibonacci(A028242(n+2)).
a(n) = Fibonacci(A030451(n+1)).
a(n) = Fibonacci(3/4 -(-1)^(n+1)*3/4 +(n+1)/2). (End)
a(n) = A053602(n+1) = A097594(n-5). - R. J. Mathar, Mar 08 2011
G.f. -x*(1+2*x+x^3) / ( -1+x^2+x^4 ). - R. J. Mathar, Mar 08 2011
a(n) = a(n-2) + a(n-4). - Muniru A Asiru, Oct 12 2018

Extensions

More terms from Alexander Adamchuk, Oct 08 2006

A097594 a(n) = (a(n-1) mod a(n-2)) + a(n-2), a(0) = 3, a(1) = 2.

Original entry on oeis.org

2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025, 196418, 121393, 317811, 196418, 514229, 317811, 832040, 514229
Offset: 0

Views

Author

Gerald McGarvey, Aug 29 2004

Keywords

Crossrefs

Programs

  • Magma
    [Fibonacci(3 +Floor(n/2) +2*(n mod 2)): n in [0..60]]; // G. C. Greubel, Dec 06 2022
    
  • Mathematica
    LinearRecurrence[{0,1,0,1}, {2,5,3,8}, 60] (* G. C. Greubel, Dec 06 2022 *)
  • SageMath
    [fibonacci(3 +(n//2) + 2*(n%2)) for n in range(61)] # G. C. Greubel, Dec 06 2022

Formula

a(2n) = Fibonacci(n+4), a(2n+1) = Fibonacci(n+3).
a(n) = A053602(n+6).
a(n) = abs( A051792(n+11) ).
G.f.: (2 + 5*x + x^2 + 3*x^3)/(1 - x^2 - x^4). - G. C. Greubel, Dec 06 2022

A032090 "BHK" (reversible, identity, unlabeled) transform of 0,1,1,1...

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 4, 5, 10, 14, 26, 39, 69, 107, 183, 289, 484, 772, 1276, 2047, 3356, 5402, 8812, 14213, 23113, 37325, 60581, 97905, 158718, 256622, 415716, 672337, 1088662, 1760998, 2850646, 4611643, 7463885, 12075527
Offset: 1

Views

Author

Keywords

Crossrefs

For n>2, a(n) = A032089(n-1) + [n even], a(2n) = A032097(n-1).

Programs

  • Mathematica
    CoefficientList[Series[- x (x^6 + x^5 - x^4 + 2 x^3 - 2 x^2 - x + 1)/((x - 1) (x^2 + x - 1) (x^4 + x^2 - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 19 2013 *)
    LinearRecurrence[{2,1,-3,1,-1,0,1},{0,1,1,1,2,2,4,5},40] (* Harvey P. Dale, Mar 31 2019 *)

Formula

G.f.: -x^2*(x^6+x^5-x^4+2*x^3-2*x^2-x+1) / ((x-1)*(x^2+x-1)*(x^4+x^2-1)). [Colin Barker, Dec 07 2012]
2*a(n) = 2+A000045(n-1) - |A051792(n+5)|, n>1. - R. J. Mathar, Mar 24 2023

A345347 Find the largest k with F(k) <= n, where F(k) is the k-th Fibonacci number. a(n) = F(k+2) + n.

Original entry on oeis.org

1, 4, 7, 11, 12, 18, 19, 20, 29, 30, 31, 32, 33, 47, 48, 49, 50, 51, 52, 53, 54, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 199, 200, 201, 202, 203, 204
Offset: 0

Views

Author

Peter Munn, Jun 14 2021

Keywords

Comments

The terms consist of 1 together with numbers that appear in row m of the Wythoff array (A035513) if m is in the sequence.
a(0) = 1, otherwise a(n) is the number whose Zeckendorf representation is "10" followed by the Zeckendorf representation of n.
If we define an extended Zeckendorf representation to be the Zeckendorf representation with "01" appended, then the numbers in the sequence are exactly those whose extended representation starts 101... . This extended representation is a valid Fibonacci base representation if we specify the rightmost digit to have weight F(0) = 0.
Equivalently, for positive integer m, find the largest k with F(k) <= m, where F(k) is the k-th Fibonacci number. m is in the sequence if and only if m >= F(k) + F(k-2).
Numbers given to rabbits on Rabbit 1's branch of the generation tree described in the A035513 examples.
Equivalently, take the positive integers in turn, placing runs of them alternatively into 2 sets, with run lengths from A053602/A051792 (self-interleaved Fibonacci sequence) as follows:
set A: 1 0 1 1 2 3 5 ...
set B: 1 1 2 3 5 8 ...
The sequence lists the numbers in set A.

Examples

			The initial Fibonacci numbers are F(0)..F(5) = 0, 1, 1, 2, 3, 5.
For n = 0, the largest k with F(k) <= 0 is k = 0, so F(k+2) = F(2) = 1, so a(0) = 1 + 0 = 1.
For n = 1, the largest k with F(k) <= 1 is k = 2, so F(k+2) = F(4) = 3, so a(1) = 3 + 1 = 4.
For n = 4, the largest k with F(k) <= 4 is k = 4, so F(k+2) = F(6) = 8, so a(4) = 8 + 4 = 12.
In the paragraph that follows we use the Wythoff array-based definition from the start of the comments.
Every positive integer appears once (only) in the Wythoff array. 0 is not positive, so does not appear in the array, so is not in the sequence. 1 is in the sequence by definition. 2 appears in Wythoff row 0, and 0 is not in the sequence, so 2 is not in the sequence. 4 appears in Wythoff row 1, and 1 is in the sequence, so 4 is in the sequence.
		

Crossrefs

Appears to be column 1 of A194030.

Programs

  • Mathematica
    kmax=12;Flatten[Table[Range[Fibonacci[k]+Fibonacci[k-2],Fibonacci[k+1]-1],{k,2,kmax}]] (* Paolo Xausa, Jan 02 2022 *)
    A108852[n_]:=1+Floor[Log[GoldenRatio,1+n*Sqrt[5]]];
    nterms=100;Table[n+Fibonacci[1+A108852[n]],{n,0,nterms-1}](* Paolo Xausa, Jan 02 2022 *)
  • PARI
    a(n) = my(k=0); while(fibonacci(k)<=n, k=k+1); n+fibonacci(k+1)

Formula

a(n) = A000045(A108852(n)+1) + n.
Union_{k >= 2} {m : F(k)+F(k-2) <= m < F(k+1)}, where F(k) = A000045(k).
Showing 1-5 of 5 results.