OFFSET
0,2
LINKS
FORMULA
For n>2, a(n) = 6*a(n-1) - 6*a(n-2), a(1)=6, a(2)=28.
G.f.: (1 - 2*x^2)/(1 - 6*x + 6*x^2).
EXAMPLE
For n=2 the a(2)=28=36-8 sequences contain every combination except these eight: 02,20,13,31,24,42,35,53.
MATHEMATICA
LinearRecurrence[{6, -6}, {1, 6, 28}, 40]
PROG
(Python)
def a(n):
.if n in [0, 1, 2]:
..return [1, 6, 28][n]
.return 6*a(n-1)-6*a(n-2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 01 2017
STATUS
approved