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.

A049853 a(n) = a(n-1) + Sum_{k=0..n-3} a(k) for n >= 2, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 2, 3, 6, 11, 19, 33, 58, 102, 179, 314, 551, 967, 1697, 2978, 5226, 9171, 16094, 28243, 49563, 86977, 152634, 267854, 470051, 824882, 1447567, 2540303, 4457921, 7823106, 13728594, 24092003, 42278518, 74193627
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A070550, A180662 (Ca2).

Programs

  • Haskell
    a049853 n = a049853_list !! n
    a049853_list = 1 : 2 : 2 : 3 :
       zipWith (+) a049853_list
                   (zipWith (+) (drop 2 a049853_list) (drop 3 a049853_list))
    -- Reinhard Zumkeller, Aug 06 2011
    
  • Maple
    a := proc(n) option remember: if n<2 then n+1 else a(n-1) + add(a(k), k=0..n-3) fi end: seq(a(n), n=0..33); # Johannes W. Meijer, Jun 18 2018
  • Mathematica
    LinearRecurrence[{2,-1,1},{1,2,2},40] (* Harvey P. Dale, May 12 2022 *)
  • PARI
    Vec((1 - x)*(1 + x) / (1 - 2*x + x^2 - x^3) + O(x^40)) \\ Colin Barker, Jun 17 2018

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-3); 3 initial terms required.
a(n) = a(n-1) + a(n-2) + a(n-4) for n > 3. - Reinhard Zumkeller, Aug 06 2011
Empirical: a(n) = Sum_{k=0..floor(n/3)} A084534(n-2*k, n-3*k). - Johannes W. Meijer, Jun 17 2018
G.f.: (1 - x)*(1 + x) / (1 - 2*x + x^2 - x^3). - Colin Barker, Jun 17 2018