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.

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

Original entry on oeis.org

1, 6, 27, 113, 458, 1839, 7365, 29470, 117891, 471577, 1886322, 7545303, 30181229, 120724934, 482899755, 1931599041, 7726396186, 30905584767, 123622339093, 494489356398, 1977957425619, 7911829702505, 31647318810050, 126589275240231, 506357100960957
Offset: 0

Views

Author

Gary W. Adamson, Jul 11 2008

Keywords

Comments

Old name was: a(n) = 4*a(n-1) + A042968(n), with a(0) = 1, where A042968 = "not divisible by 4": (1, 2, 3, 5, 6, 7, 9, 10, 11, ...). After the correction of a(13) the definition could be simplified. - N. J. A. Sloane, Aug 23 2018

Examples

			a(3) = 4*a(2) + A042968(3) = 4*27 + 5 = 113.
a(13) = 4*a(12) + A042968(13) = 4*30181229 + 18 = 120724934.
		

Crossrefs

Cf. A042968.

Programs

  • Magma
    I:=[1,6,27,113,458]; [n le 5 select I[n] else 5*Self(n-1)-4*Self(n-2)+Self(n-3)-5*Self(n-4)+4*Self(n-5): n in [1..30]]; // Vincenzo Librandi, Jun 28 2017, Jul 28 2018
  • Mathematica
    CoefficientList[Series[(1 + x) (1 + x^2) / ((1 - x)^2 (1 + x + x^2) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 28 2017 *)
    Nest[Append[#, Block[{k = #[[-1, -1]] + 1}, While[Mod[k, 4] == 0, k++]; {4 #[[-1, 1]] + k, k}]] &, {{1, 1}}, 24][[All, 1]] (* Michael De Vlieger, Jun 30 2018 *)
    LinearRecurrence[{5, -4, 1, -5, 4}, {1, 6, 27, 113, 458}, 25] (* Robert G. Wilson v, Jul 28 2018 *)
  • PARI
    Vec((1 + x)*(1 + x^2) / ((1 - x)^2*(1 - 4*x)*(1 + x + x^2)) + O(x^30)) \\ Colin Barker, Jun 26 2017
    

Formula

a(n) = 5*a(n-1) - 4*a(n-2) + a(n-3) - 5*a(n-4) + 4*a(n-5) for n>4. - Colin Barker, Jun 26 2017

Extensions

Corrected by Charlie Neder, Jun 22 2018
Edited by N. J. A. Sloane, Aug 23 2018, merging old entry A288571 with this one.