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.

A005013 a(n) = 3*a(n-2) - a(n-4), a(0)=0, a(1)=1, a(2)=1, a(3)=4. Alternates Fibonacci (A000045) and Lucas (A000032) sequences for even and odd n.

Original entry on oeis.org

0, 1, 1, 4, 3, 11, 8, 29, 21, 76, 55, 199, 144, 521, 377, 1364, 987, 3571, 2584, 9349, 6765, 24476, 17711, 64079, 46368, 167761, 121393, 439204, 317811, 1149851, 832040, 3010349, 2178309, 7881196, 5702887, 20633239, 14930352, 54018521, 39088169, 141422324
Offset: 0

Views

Author

Keywords

Comments

S(n,sqrt(5)), with the Chebyshev polynomials A049310, is an integer sequence in the real quadratic number field Q(sqrt(5)) with basis numbers <1,phi>, phi:=(1+sqrt(5))/2. S(n,sqrt(5)) = A(n) + 2*B(n)*phi, with A(n)= a(n+1)*(-1)^n and B(n)= A147600(n-1), n>=0, with A147600(-1):=0.
a(n) = p(n+1) where p(x) is the unique degree-(n-1) polynomial such that p(k) = Fibonacci(k) for k = 1, ..., n. - Michael Somos, Jan 08 2012
Row sums of A227431. - Richard R. Forberg, Jul 29 2013
This is the sequence of Lehmer numbers u_n(sqrt(R),Q) with the parameters R = 5 and Q = 1. It is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence satisfies a linear recurrence of order four. - Peter Bala, Apr 18 2014
The sequence of convergents of the 2-periodic continued fraction [0; 1, -5, 1, -5, ...] = 1/(1 - 1/(5 - 1/(1 - 1/(5 - ...)))) = (1/2)*(5 - sqrt(5)) begins [0/1, 1/1, 5/4, 4/3, 15/11, 11/8, 40/29, ...]; the denominators give the present sequence. The sequence of numerators [0, 1, 5, 4, 15, 11, 40, ...] is A203976. Cf. A108412 and A026741. - Peter Bala, May 19 2014
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. We have (1/2)*a(2*n + 1) = 1/2 o 1/2 o ... o 1/2 (2*n + 1 terms) and (1/2)*sqrt(5)* a(2*n) = 1/2 o 1/2 o ... o 1/2 (2*n terms). Cf. A084068 and A049629. - Peter Bala, Mar 23 2018

Examples

			G.f. = x + x^2 + 4*x^3 + 3*x^4 + 11*x^5 + 8*x^6 + 29*x^7 + 21*x^8 + 76*x^9 + ...
a(3) = 4 since p(x) = (x^2 - 3*x + 4) / 2 interpolates p(1) = 1, p(2) = 1, p(3) = 2, and p(4) = 4. - _Michael Somos_, Jan 08 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    a:=[0,1,1,4];; for n in [5..40] do a[n]:=3*a[n-2]-a[n-4]; od; a; # Muniru A Asiru, Oct 21 2018
  • Haskell
    a005013 n = a005013_list !! n
    a005013_list = alt a000045_list a000032_list where
       alt (f::fs) (:l:ls) = f : l : alt fs ls
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    I:=[0,1,1,4]; [n le 4 select I[n]  else 3*Self(n-2) - Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 09 2016
    
  • Maple
    with(combinat): A005013 := n-> if n mod 2 = 0 then fibonacci(n) else fibonacci(n+1)+fibonacci(n-1); fi;
    A005013:=z*(z**2+z+1)/((z**2+z-1)*(z**2-z-1)); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[Series[(x + x^2 + x^3)/(1 - 3x^2 + x^4), {x, 0, 40}], x]
    f[n_] = Product[(1 + 4*Sin[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; a = Table[f[n], {n, 0, 30}]; Round[a]; FullSimplify[ExpandAll[a]] (* Roger L. Bagula and Gary W. Adamson, Nov 26 2008 *)
    LinearRecurrence[{0, 3, 0, -1}, {0, 1, 1, 4}, 100] (* G. C. Greubel, Feb 08 2016 *)
  • PARI
    {a(n) = if( n%2, fibonacci(n+1) + fibonacci(n-1), fibonacci(n))}; /* Michael Somos, Jan 08 2012 */
    
  • PARI
    {a(n) = if( n<0, -a(-n), subst( polinterpolate( vector( n, k, fibonacci(k))), x, n+1))}; /* Michael Somos, Jan 08 2012 */
    

Formula

a(1) = a(2) = 1, a(3) = 4, a(n) = (a(n-1) * a(n-2) - 1) / a(n-3), unless n=3. a(-n) = -a(n).
a(2n) = A001906(n), a(2n+1) = A002878(n). a(n)=F(n+1)+(-1)^(n+1)F(n-1). - Mario Catalani (mario.catalani(AT)unito.it), Sep 20 2002
G.f.: x*(1+x+x^2)/((1-x-x^2)*(1+x-x^2)).
a(n) = Product_{k=1..floor((n-1)/2)} (1 + 4*sin(k*Pi/n)^2). - Roger L. Bagula and Gary W. Adamson, Nov 26 2008
Binomial transform is A096140. - Michael Somos, Apr 13 2012
From Peter Bala, Apr 18 2014: (Start)
a(n) = (alpha^n - beta^n)/(alpha - beta) for n odd, and a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2) for n even, where alpha = (1/2)*(sqrt(5) + 1) and beta = (1/2)*(sqrt(5) - 1). Equivalently, a(n) = U(n-1, sqrt(5)/2) for n odd and a(n) = (1/sqrt(5))*U(n-1, sqrt(5)/2) for n even, where U(n,x) is the Chebyshev polynomial of the second kind. (End)
E.g.f.: (Phi/sqrt(5))*exp(-Phi*x)*(exp(x)-1)*(exp(sqrt(5)*x) - 1/(Phi)^2), where Phi = (1+sqrt(5))/2. - G. C. Greubel, Feb 08 2016
a(n) = (5^floor((n-1)/2)/2^(n-1))*Sum_{k=0..n-1} binomial(n-1,k)/5^floor(k/2). - Tony Foster III, Oct 21 2018
a(n) = hypergeom([(1 - n)/2, (n + 1) mod 2 - n/2], [1 - n], -4) for n >= 2. - Peter Luschny, Sep 03 2019

Extensions

Additional comments from Michael Somos, Jun 01 2000

A075536 a(n) = ((1+(-1)^n)*T(n+1) + (1-(-1)^n)*S(n))/2, where T(n) = tribonacci numbers A000073, S(n) = generalized tribonacci numbers A001644.

Original entry on oeis.org

0, 1, 1, 7, 4, 21, 13, 71, 44, 241, 149, 815, 504, 2757, 1705, 9327, 5768, 31553, 19513, 106743, 66012, 361109, 223317, 1221623, 755476, 4132721, 2555757, 13980895, 8646064, 47297029, 29249425, 160004703, 98950096, 541292033, 334745777
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 23 2002

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x*(1+x+4*x^2+x^3-x^4)/(1-3*x^2-x^4-x^6) )); // G. C. Greubel, Apr 21 2019
    
  • Maple
    A075536 := proc(n)
        if type(n,'even') then
            A000073(n+1) ;
        else
            A001644(n) ;
        end if;
    end proc:
    seq(A075536(n),n=0..80) ; # R. J. Mathar, Aug 05 2021
  • Mathematica
    CoefficientList[Series[(x+x^2+4x^3+x^4-x^5)/(1-3x^2-x^4-x^6), {x, 0, 40}], x]
    LinearRecurrence[{0,3,0,1,0,1},{0,1,1,7,4,21},40] (* Harvey P. Dale, Jul 10 2012 *)
  • PARI
    my(x='x+O('x^40)); concat([0], Vec(x*(1+x+4*x^2+x^3-x^4)/(1-3*x^2-x^4-x^6))) \\ G. C. Greubel, Apr 21 2019
    
  • Sage
    (x*(1+x+4*x^2+x^3-x^4)/(1-3*x^2-x^4-x^6)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 21 2019

Formula

a(2n) = A073717(n) = A000073(2n+1).
a(2n+1) = A001644(2n+1).
a(n) = 3*a(n-2) + a(n-4) + a(n-6), a(0)=0, a(1)=1, a(2)=1, a(3)=7, a(4)=4, a(5)=21.
O.g.f.: x*(1 + x + 4*x^2 + x^3 - x^4)/(1 - 3*x^2 - x^4 - x^6).

Extensions

Index in definition corrected. - R. J. Mathar, Aug 05 2021

A172511 a(n) = a(n-1) * (11*a(n-1) - a(n-2)) / (a(n-1) + 4*a(n-2)), with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 7, 35, 210, 1365, 9165, 62322, 425867, 2915551, 19974626, 136884937, 938162617, 6430103330, 44072167855, 302074043195, 2070443441970, 14191023001437, 97266699113157, 666675822475026, 4569463931720051
Offset: 0

Views

Author

Michael Somos, Feb 05 2010

Keywords

Examples

			G.f. = 1 + x + 2*x^2 + 7*x^3 + 35*x^4 + 210*x^5 + 1365*x^6 + 9165*x^7 + ...
		

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-1] (11a[n-1]-a[n-2])/(a[n-1]+ 4a[n-2])},a,{n,30}] (* or *) LinearRecurrence[{11,-33,33,-11,1},{1,1,2,7,35},30] (* Harvey P. Dale, Nov 18 2013 *)
  • PARI
    {a(n) = (4 + fibonacci(4*n - 1)/3 + fibonacci(4*n - 3)/3 + 5 * fibonacci(2*n - 1)) / 10};
    
  • PARI
    {a(n) = my(A); if( n<1, n = 1-n); if( n<3, n, A = vector(n, k, k); for(k=3, n, A[k] = A[k-1] * (11*A[k-1] - A[k-2]) / (A[k-1] + 4*A[k-2])); A[n])}; /* Michael Somos, Sep 22 2014 */

Formula

a(n) = (4 + A049685(n-1) + 5 * A001519(n)) / 10 = a(1 - n).
G.f.: (4 / (1 - x) + (1 - 6*x) / (1 - 7*x + x^2) + (5 - 10*x) / (1 - 3*x + x^2)) / 10.
a(0)=1, a(1)=1, a(2)=2, a(3)=7, a(4)=35, a(n)=11*a(n-1)-33*a(n-2)+ 33*a(n-3)- 11*a(n-4)+a(n-5). - Harvey P. Dale, Nov 18 2013
a(n) = a(1-n) for all n in Z. - Michael Somos, Sep 22 2014
0 = a(n)*(+a(n+1) + 4*a(n+2)) + a(n+1)*(-11*a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Sep 22 2014
a(n) = b(n+1) * b(n) * b(n-1) * b(n-2) / 6 for all n in Z where b = A005247. - Michael Somos, Sep 22 2014

A075676 Sequences A001644 and A000073 interleaved.

Original entry on oeis.org

3, 1, 3, 2, 11, 7, 39, 24, 131, 81, 443, 274, 1499, 927, 5071, 3136, 17155, 10609, 58035, 35890, 196331, 121415, 664183, 410744, 2246915, 1389537, 7601259, 4700770, 25714875, 15902591, 86992799, 53798080, 294294531, 181997601
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 24 2002

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (3+x- 6*x^2-x^3-x^4)/(1-3*x^2-x^4-x^6) )); // G. C. Greubel, Apr 21 2019
    
  • Mathematica
    CoefficientList[Series[(3+x-6x^2-x^3-x^4)/(1-3x^2-x^4-x^6), {x, 0, 40}], x]
    LinearRecurrence[{0,3,0,1,0,1},{3,1,3,2,11,7},40] (* Harvey P. Dale, May 01 2014 *)
  • PARI
    my(x='x+O('x^40)); Vec((3+x-6*x^2-x^3-x^4)/(1-3*x^2-x^4-x^6)) \\ G. C. Greubel, Apr 21 2019
    
  • Sage
    ((3+x-6*x^2-x^3-x^4)/(1-3*x^2-x^4-x^6)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 21 2019

Formula

a(n) = A000073(n) if n odd, a(n) = A001644(n) if n even.
a(n) = ((1-(-1)^n)*T(n) + (1+(-1)^n)*S(n))/2, where T(n) = A000073(n), S(n) = A001644(n).
a(n) = 3*a(n-2) + a(n-4) + a(n-6), a(0)=3, a(1)=1, a(2)=3, a(3)=2, a(4)=11, a(5)=7.
O.g.f.: (3 + x - 6*x^2 - x^3 - x^4)/(1 - 3*x^2 - x^4 - x^6).
a(n) = T(n) + (1+(-1)^n)*(T(n-1) + (3/2)*T(n-2)).

A138123 Antidiagonal sums of a triangle of coefficients of recurrences of the Fibonacci sequence.

Original entry on oeis.org

1, 1, 3, 0, 3, 0, 7, 1, 11, 0, 17, 0, 29, 1, 47, 0, 75, 0, 123, 1, 199, 0, 321, 0, 521, 1, 843, 0, 1363, 0, 2207, 1, 3571, 0, 5777, 0, 9349, 1, 15127, 0, 24475, 0, 39603, 1, 64079, 0, 103681, 0, 167761, 1, 271443, 0, 439203, 0, 710647, 1, 1149851, 0, 1860497, 0
Offset: 1

Views

Author

Paul Curtz, May 04 2008

Keywords

Comments

Consider the irregular sparse triangle T(p,p) = A000204(p), T(p,2p)= -A033999(p)=(-1)^(p+1), T(p,m) =0 else; 1<=m<=2p, p>=1. Then a(n)=sum_{m=1..[2(n+1)/3]} T(1+n-m,m).
The T are coefficients in recurrences f(n)=sum_{m=1..2p} T(p,m)*f(n-m).
The recurrence for p=1, f(n)=f(n-1)+f(n-2), is satisfied by the Fibonacci sequence A000045. The recurrence for p=2, f(n)=3f(n-2)-f(n-4), is satisfied by A005013, A005247, A075091, A075270, A108362 and A135992.
Conjecture: The Fibonacci sequence F obeys all the recurrences: A000045(n)=F(n)= L(p)*F(n-p)-(-1)^p*F(n-2p), any p>0, L=A000204.
[Proof: conjecture is equivalent to the existence of a g.f. of F with denominator 1-L(p)x^p+(-1)^p*x^(2p). Since 1-x-x^2 is known to be a denominator of such a g.f. of A000045, the conjecture is that 1-L(p)*x^p+(-1)^p*x^(2p) can be reduced to 1-x-x^2. One finds: {1-L(p)*x^p+(-1)^p*x^(2p)}/(1-x-x^2) = sum{n=0..p-1}F(n+1)x^n-sum{n=0..p-2} (-1)^(n+p)F(n+1)x^(2p-n-2) is a polynomial with integer coefficients, which is proved by multiplication with 1-x-x^2 and via F(n)+F(n+1)=F(n+2) and L(n)=F(n-1)+F(n+1). - R. J. Mathar, Jul 10 2008].
Conjecture: The Lucas sequence L also obeys all the recurrences: L(n)= L(p)*L(n-p)-(-1)^p*L(n-2p), any p>0, L=A000204.

Examples

			The triangle T(p,m) with Lucas numbers on the diagonal starts
  1, 1;
  0, 3, 0,-1;
  0, 0, 4, 0, 0, 1;
  0, 0, 0, 7, 0, 0, 0,-1;
  0, 0, 0, 0,11, 0, 0, 0, 0, 1;
The antidiagonal sums are a(1)=1. a(2)=0+1=1. a(3)=0+3=3. a(4)=0+0+0=0. a(5)=0+0+4-1=3.
		

Formula

Row sums: Sum_{m=1..2p} T(p,m) = A098600(p).
Conjectures from Chai Wah Wu, Apr 15 2024: (Start)
a(n) = a(n-2) - a(n-3) + a(n-4) + a(n-5) + a(n-7) for n > 7.
G.f.: x*(-x^5 - 2*x^2 - x - 1)/((x + 1)*(x^2 - x + 1)*(x^4 + x^2 - 1)). (End)

Extensions

Edited and extended by R. J. Mathar, Jul 10 2008
Showing 1-5 of 5 results.