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.

A015445 Generalized Fibonacci numbers: a(n) = a(n-1) + 9*a(n-2).

Original entry on oeis.org

1, 1, 10, 19, 109, 280, 1261, 3781, 15130, 49159, 185329, 627760, 2295721, 7945561, 28607050, 100117099, 357580549, 1258634440, 4476859381, 15804569341, 56096303770, 198337427839, 703204161769, 2488241012320, 8817078468241, 31211247579121, 110564953793290
Offset: 0

Views

Author

Keywords

Comments

The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 2, 10*a(n-2) equals the number of 10-colored compositions of n with all parts >= 2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011

Crossrefs

Programs

  • Magma
    [ n eq 1 select 1 else n eq 2 select 1 else Self(n-1)+9*Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Aug 23 2011
    
  • Maple
    m:=25; S:=series(1/(1-x-9*x^2), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 18 2020
  • Mathematica
    CoefficientList[Series[1/(1-x-9*x^2), {x,0,25}], x] (* or *) LinearRecurrence[{1,9}, {1,1}, 25] (* G. C. Greubel, Apr 30 2017 *)
  • PARI
    a(n)=([0,1; 9,1]^n*[1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
  • Sage
    [lucas_number1(n,1,-9) for n in range(1, 25)] # Zerinvary Lajos, Apr 22 2009
    

Formula

a(n) = (((1+sqrt(37))/2)^(n+1) - ((1-sqrt(37))/2)^(n+1))/sqrt(37).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*9^k. - Paul Barry, Jul 20 2004
a(n) = Sum_{k=0..n} binomial((n+k)/2, (n-k)/2)*(1+(-1)^(n-k))*3^(n-k)/2. - Paul Barry, Aug 28 2005
a(n) = Sum_{k=0..n} A109466(n,k)*(-9)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = (-703*(1/2-sqrt(37)/2)^n + 199*sqrt(37)*(1/2-sqrt(37)/2)^n-333*(1/2+sqrt(37)/2)^n + 171*sqrt(37)*(1/2+sqrt(37)/2)^n)/(74*(5*sqrt(37)-14)). - Alexander R. Povolotsky, Oct 13 2010
a(n) = Sum_{k=1..n+1, k odd} C(n+1,k)*37^((k-1)/2)/2^n. - Vladimir Shevelev, Feb 05 2014
G.f.: 1/(1-x-9*x^2). - Philippe Deléham, Feb 19 2020
a(n) = J(n, 9/2), where J(n,x) are the Jacobsthal polynomials. - G. C. Greubel, Feb 18 2020
E.g.f.: exp(x/2)*(sqrt(37)*cosh(sqrt(37)*x/2) + sinh(sqrt(37)*x/2))/sqrt(37). - Stefano Spezia, Feb 19 2020

Extensions

Edited by N. J. A. Sloane, Oct 11 2010