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.

A247595 a(n) = 4*a(n-1) - 4*a(n-2) + 4*a(n-3) with a(0) = 1, a(1) = 3, a(2) = 10.

Original entry on oeis.org

1, 3, 10, 32, 100, 312, 976, 3056, 9568, 29952, 93760, 293504, 918784, 2876160, 9003520, 28184576, 88228864, 276191232, 864587776, 2706501632, 8472420352, 26522025984, 83024429056, 259899293696, 813587562496, 2546850791424, 7972650090496, 24957547446272
Offset: 0

Views

Author

Michael Somos, Sep 20 2014

Keywords

Examples

			G.f. = 1 + 3*x + 10*x^2 + 32*x^3 + 100*x^4 + 312*x^5 + 976*x^6 + 3056*x^7 + ...
		

Crossrefs

Programs

  • Haskell
    a247595 n = a247595_list !! n
    a247595_list = 1 : 3 : 10 : map (* 4) (zipWith3 (((+) .) . (-))
       (drop 2 a247595_list) (tail a247595_list) a247595_list)
    -- Reinhard Zumkeller, Sep 21 2014
    
  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x +2*x^2)/(1-4*x+4*x^2-4*x^3)));  // G. C. Greubel, Aug 04 2018
  • Mathematica
    CoefficientList[Series[(1-x+2*x^2)/(1-4*x+4*x^2-4*x^3), {x, 0, 60}], x] (* G. C. Greubel, Aug 04 2018 *)
  • PARI
    {a(n) = if( n<0, polcoeff( (2*x - x^2 + x^3) / (4 - 4*x + 4*x^2 - x^3) + x * O(x^-n), -n), polcoeff( (1 - x + 2*x^2) / (1 - 4*x + 4*x^2 - 4*x^3) + x * O(x^n), n))};
    

Formula

G.f.: (1 - x + 2*x^2) / (1 - 4*x + 4*x^2 - 4*x^3).
0 = a(n) - 4*a(n-1) + 4*a(n-2) - 4*a(n-3) for all n in Z.
a(n) = A061279(2*n) for all n in Z.
Binomial transform of A247594.