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-1 of 1 results.

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

Original entry on oeis.org

1, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31, 34, 35, 38, 39, 42, 43, 46, 47, 50, 51, 54, 55, 58, 59, 62, 63, 66, 67, 70, 71, 74, 75, 78, 79, 82, 83, 86, 87, 90, 91, 94, 95, 98, 99, 102, 103, 106, 107, 110, 111, 114, 115, 118, 119, 122
Offset: 0

Views

Author

N. J. A. Sloane, Jan 12 2000

Keywords

Crossrefs

Cf. A010684 (first differences), A263511 (partial sums).

Programs

  • Magma
    I:=[2,3,6]; [1] cat [n le 3 select I[n] else Self(n-1) +Self(n-2) -Self(n-3): n in [1..30]]; // G. C. Greubel, May 26 2018
  • Maple
    A053438 := proc(n)
        if n > 0 then
            2*n -(1+(-1)^n)/2 ;
        else
            1 ;
        end if
    end proc:
    seq(A053438(n),n=0..30) ; # R. J. Mathar, Oct 27 2020
  • Mathematica
    CoefficientList[Series[(1+x+2*x^3)/((1-x)*(1-x^2)), {x, 0, 50}], x] (* or *) Join[{1}, LinearRecurrence[{1,1,-1}, {2,3,6}, 50]] (* G. C. Greubel, May 26 2018 *)
  • PARI
    a(n)=abs(n\2*4+n%2*3-1) \\ Charles R Greathouse IV, Dec 08 2011
    

Formula

a(n) = 2*n -(1+(-1)^n)/2 if n>=1. - Frank Ellermann, Feb 12 2002
a(n) = A042964(n), n>0. - R. J. Mathar, Oct 13 2008
a(n) = A014601(n) - 1 for n>0. - Hugo Pfoertner, Oct 26 2020
Showing 1-1 of 1 results.