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

A103632 Expansion of (1 - x + x^2)/(1 - x - x^4).

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 3, 4, 6, 8, 11, 15, 21, 29, 40, 55, 76, 105, 145, 200, 276, 381, 526, 726, 1002, 1383, 1909, 2635, 3637, 5020, 6929, 9564, 13201, 18221, 25150, 34714, 47915, 66136, 91286, 126000, 173915, 240051, 331337, 457337, 631252, 871303, 1202640
Offset: 0

Views

Author

Paul Barry, Feb 11 2005

Keywords

Comments

Diagonal sums of A103631.
The Kn11 sums, see A180662, of triangle A065941 equal the terms of this sequence without a(0) and a(1). - Johannes W. Meijer, Aug 11 2011
For n >= 2, a(n) is the number of palindromic compositions of n-2 with parts in {2,1,3,5,7,9,...}. The generating function follows easily from Theorem 1,2 of the Hoggatt et al. reference. Example: a(9) = 8 because we have 7, 151, 11311, 232, 313, 12121, 21112, and 1111111. - Emeric Deutsch, Aug 17 2016
Essentially the same as A003411. - Georg Fischer, Oct 07 2018

Crossrefs

Cf. A275446.

Programs

  • GAP
    a:=[1,0,1,1];;  for n in [5..50] do a[n]:=a[n-1]+a[n-4]; od; a; # Muniru A Asiru, Oct 07 2018
    
  • Magma
    I:=[1,0,1,1]; [n le 4 select I[n] else Self(n-1) + Self(n-4): n in [1..50]]; // G. C. Greubel, Mar 10 2019
    
  • Maple
    A103632 := proc(n): add( binomial(floor((2*n-3*k-1)/2), n-2*k), k=0..floor(n/2)) end: seq(A103632(n), n=0..46); # Johannes W. Meijer, Aug 11 2011
  • Mathematica
    LinearRecurrence[{1,0,0,1}, {1,0,1,1}, 50] (* G. C. Greubel, Mar 10 2019 *)
  • PARI
    my(x='x+O('x^50)); Vec((1-x+x^2)/(1-x-x^4)) \\ G. C. Greubel, Mar 10 2019
    
  • Sage
    ((1-x+x^2)/(1-x-x^4)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Mar 10 2019

Formula

G.f.: (1 - x + x^2)/(1 - x - x^4).
a(n) = a(n-1) + a(n-4) with a(0)=1, a(1)=0, a(2)=1 and a(3)=1.
a(n) = Sum_{k=0..floor(n/2)} binomial(floor((2*n-3*k-1)/2), n-2*k).
a(n) = A003269(n+1) - A003269(n-4), n > 4.

Extensions

Formula corrected by Johannes W. Meijer, Aug 11 2011

A048590 Pisot sequence L(8,9).

Original entry on oeis.org

8, 9, 11, 14, 18, 24, 32, 43, 58, 79, 108, 148, 203, 279, 384, 529, 729, 1005, 1386, 1912, 2638, 3640, 5023, 6932, 9567, 13204, 18224, 25153, 34717, 47918, 66139, 91289, 126003, 173918, 240054, 331340, 457340, 631255, 871306, 1202643, 1659980, 2291232, 3162535
Offset: 0

Views

Author

Keywords

Crossrefs

See A008776 for definitions of Pisot sequences.
Cf. A003411.

Programs

  • Magma
    Lxy:=[8,9]; [n le 2 select Lxy[n] else Ceiling(Self(n-1)^2/Self(n-2)): n in [1..50]]; // Bruno Berselli, Feb 05 2016
    
  • Mathematica
    RecurrenceTable[{a[0] == 8, a[1] == 9, a[n] == Ceiling[a[n - 1]^2/a[n - 2]]}, a, {n, 0, 50}] (* Bruno Berselli, Feb 05 2016 *)
  • PARI
    pisotL(nmax, a1, a2) = {
      a=vector(nmax); a[1]=a1; a[2]=a2;
      for(n=3, nmax, a[n] = ceil(a[n-1]^2/a[n-2]));
      a
    }
    pisotL(50, 8, 9) \\ Colin Barker, Aug 07 2016

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-4) - a(n-5) for n > 5 (holds at least up to n = 1000 but is not known to hold in general).
Showing 1-2 of 2 results.