[go: up one dir, main page]

login
Search: a015580 -id:a015580
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 6*a(n-1) + 8*a(n-2), with a(0)=0, a(1)=1.
+10
4
0, 1, 6, 44, 312, 2224, 15840, 112832, 803712, 5724928, 40779264, 290475008, 2069084160, 14738305024, 104982503424, 747801460736, 5326668791808, 37942424436736, 270267896954880, 1925146777223168, 13713023838978048, 97679317251653632, 695780094221746176
OFFSET
0,3
FORMULA
G.f.: x/(1 - 2*x*(3+4*x)). - Harvey P. Dale, Jul 26 2011
MATHEMATICA
LinearRecurrence[{6, 8}, {0, 1}, 50]
CoefficientList[Series[-(x/(-1+6 x+8 x^2)), {x, 0, 50}], x] (* Harvey P. Dale, Jul 26 2011 *)
PROG
(Magma) I:=[0, 1]; [n le 2 select I[n] else 6*Self(n-1)+8*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 14 2011
(PARI) a(n)=([0, 1; 8, 6]^n*[0; 1])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 7.
+10
0
1, 10, 94, 886, 8350, 78694, 741646, 6989590, 65872894, 620814406, 5850821230, 55140648694, 519669123166, 4897584703270, 46156938822094, 435002788211926, 4099652849195710, 38636886795609094, 364130592557264686, 3431722880197818550, 32342028292009425694
OFFSET
0,2
COMMENTS
In general, the number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 5+k for k in {0,1,2,3,4} is given by a(n) = 9*a(n-1) + 2*k*a(n-2), a(0)=1, a(1)=10.
FORMULA
a(n) = 9*a(n-1) + 4*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 4*x^2).
a(n) = ((1 - 11/sqrt(97))/2)*((9 - sqrt(97))/2)^n + ((1 + 11/sqrt(97))/2)*((9 + sqrt(97))/2)^n.
a(n) = A015580(n)+A015580(n+1). - R. J. Mathar, Oct 20 2019
MATHEMATICA
LinearRecurrence[{9, 4}, {1, 10}, 30]
PROG
(Python)
def a(n):
.if n in [0, 1]:
..return [1, 10][n]
.return 9*a(n-1)+4*a(n-2)
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 02 2017
STATUS
approved

Search completed in 0.006 seconds