The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287807 Number of senary sequences of length n such that no two consecutive terms have distance 2. 0
1, 6, 28, 132, 624, 2952, 13968, 66096, 312768, 1480032, 7003584, 33141312, 156826368, 742110336, 3511703808, 16617560832, 78635142144, 372105487872, 1760822074368, 8332299518976, 39428864667648, 186579390892032, 882903157346304, 4177942598725632 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A171859 A338584 A084778 * A155588 A368574 A208439
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 01 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 19:55 EDT 2024. Contains 372522 sequences. (Running on oeis4.)