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.

A135574 A024495 but with terms swapped in pairs.

Original entry on oeis.org

0, 0, 3, 1, 11, 6, 42, 21, 171, 85, 683, 342, 2730, 1365, 10923, 5461, 43691, 21846, 174762, 87381, 699051, 349525, 2796203, 1398102, 11184810, 5592405, 44739243, 22369621, 178956971, 89478486, 715827882, 357913941, 2863311531, 1431655765
Offset: 0

Views

Author

Paul Curtz, Feb 24 2008

Keywords

Crossrefs

Programs

  • Magma
    I:=[0,0,3,1,11,6]; [n le 6 select I[n] else 3*Self(n-2) +3*Self(n-4) +4*Self(n-6): n in [1..41]]; // G. C. Greubel, Jan 05 2022
    
  • Maple
    A024495 := proc(n) option remember ; if n <=1 then 0; elif n = 2 then 1; else 3*procname(n-1)-3*procname(n-2)+2*procname(n-3) ; fi; end: A135574 := proc(n) option remember ; if n mod 2 = 0 then A024495(n+1) ; else A024495(n-1) ; fi; end: seq(A135574(n),n=0..40) ; # R. J. Mathar, Feb 07 2009
  • Mathematica
    LinearRecurrence[{0,3,0,3,0,4},{0,0,3,1,11,6},41] (* G. C. Greubel, Oct 19 2016 *)
  • Sage
    [(1/6)*(2^(n-1)*(5+3*(-1)^n) - (1+3*(-1)^n)*chebyshev_U(n, 1/2) - (1-3*(-1)^n)*chebyshev_U(n-1, 1/2)) for n in (0..40)] # G. C. Greubel, Jan 05 2022

Formula

a(n+1) - 2*a(n) = A135575(n).
O.g.f.: x^2*(3 + x +2*x^2 +3*x^3)/((1-2*x)*(1+2*x)*(x^2-x+1)*(x^2+x+1)). - R. J. Mathar, Mar 31 2008
a(n) = 3*a(n-2) + 3*a(n-4) + 4*a(n-6). - G. C. Greubel, Oct 19 2016
a(n) = (1/6)*(2^(n-1)*(5+3*(-1)^n) - (1+3*(-1)^n)*ChebyshevU(n, 1/2) - (1-3*(-1)^n)*ChebyshevU(n-1, 1/2)). - G. C. Greubel, Jan 05 2022

Extensions

More terms from R. J. Mathar, Mar 31 2008
More terms from R. J. Mathar, Feb 07 2009