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.

A159284 Expansion of x*(1+x)/(1-x^2-2*x^3).

Original entry on oeis.org

0, 1, 1, 1, 3, 3, 5, 9, 11, 19, 29, 41, 67, 99, 149, 233, 347, 531, 813, 1225, 1875, 2851, 4325, 6601, 10027, 15251, 23229, 35305, 53731, 81763, 124341, 189225, 287867, 437907, 666317, 1013641, 1542131, 2346275, 3569413, 5430537
Offset: 0

Views

Author

Creighton Dement, Apr 08 2009

Keywords

Comments

a(n) is the number of composition of n+1 into parts congruent to 0 or 2 modulo 3. - Joerg Arndt, Apr 21 2025

Crossrefs

Programs

  • Magma
    I:=[0,1,1]; [n le 3 select I[n] else Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jun 27 2018
  • Mathematica
    CoefficientList[Series[x (1+x)/(1-x^2-2x^3),{x,0,50}],x] (* or *) LinearRecurrence[ {0,1,2},{0,1,1},50] (* Harvey P. Dale, Jul 16 2013 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 2,1,0]^n*[0;1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    

Formula

a(n) = abs(A078028(n-1)). - R. J. Mathar, Jul 05 2012
a(n) = a(n-2) + 2*a(n-3), a(0)=0, a(1) = a(2) =1. - G. C. Greubel, Apr 30 2017
a(n) = A052947(n-1)+A052947(n-2). - R. J. Mathar, Mar 23 2023

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021