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!)
A287829 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 6. 0
1, 10, 92, 848, 7816, 72040, 663992, 6120008, 56408056, 519912520, 4792028792, 44168084168, 407096815096, 3752207504200, 34584061167992, 318760965520328, 2938016812018936, 27079673239211080, 249593092776937592, 2300497181470860488, 21203660818791619576 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
FORMULA
a(n) = 9*a(n-1) + 2*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 2*x^2).
a(n) = ((1 - 11/sqrt(89))/2)*((9 - sqrt(89))/2)^n + ((1 + 11/sqrt(89))/2)*((9 + sqrt(89))/2)^n.
a(n) = A015579(n)+A015579(n+1). - R. J. Mathar, Oct 20 2019
MATHEMATICA
LinearRecurrence[{9, 2}, {1, 10}, 30]
PROG
(Python)
def a(n):
.if n in [0, 1]:
..return [1, 10][n]
.return 9*a(n-1)+2*a(n-2)
CROSSREFS
Sequence in context: A037534 A120996 A190990 * A265242 A262173 A103944
KEYWORD
nonn,easy
AUTHOR
David Nacin, Jun 02 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 April 19 18:05 EDT 2024. Contains 371797 sequences. (Running on oeis4.)