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!)
A252701 Number of strings of length n over an 8-letter alphabet that do not begin with a palindrome. 9
0, 8, 56, 392, 3080, 24248, 193592, 1545656, 12362168, 98873096, 790960520, 6327490568, 50619730952, 404956301960, 3239648870024, 25917178598024, 207337416422024, 1658699232503096, 13269593761151672, 106156749298252856, 849253993595062328, 6794031942433008056 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

8 divides a(n) for all n.

lim n -> infinity a(n)/8^n ~ 0.73661041899617 is the probability that a random, infinite string over an 8-letter alphabet does not begin with a palindrome.

This sequence gives the number of walks on K_8 with loops that do not begin with a palindromic sequence.

LINKS

Peter Kagey, Table of n, a(n) for n = 0..1000

FORMULA

a(n) = 8^n - A249641(n) for n > 0.

EXAMPLE

For n = 3, the first 10 of the a(3) = 392 solutions are (in lexicographic order) 011, 012, 013, 014, 015, 016, 017, 021, 022, 023.

MATHEMATICA

a252701[n_] := Block[{f}, f[0] = f[1] = 0;

  f[x_] := 8*f[x - 1] + 8^Ceiling[(x)/2] - f[Ceiling[(x)/2]];

Prepend[Rest@Table[8^i - f[i], {i, 0, n}], 0]]; a252701[21] (* Michael De Vlieger, Dec 26 2014 *)

PROG

(Ruby) seq = [1, 0]; (2..N).each { |i| seq << 8 * seq[i-1] + 8**((i+1)/2) - seq[(i+1)/2] }; seq = seq.each_with_index.collect { |a, i| 8**i - a }

CROSSREFS

A249641 gives the number of strings of length n over an 8-letter alphabet that DO begin with a palindrome.

Analogous sequences for k-letter alphabets: A252696 (k=3), A252697 (k=4), A252698 (k=5), A252699 (k=6), A252700 (k=7), A252702 (k=9), A252703 (k=10).

Sequence in context: A170641 A170689 A003950 * A033134 A126985 A323699

Adjacent sequences:  A252698 A252699 A252700 * A252702 A252703 A252704

KEYWORD

easy,nonn,walk

AUTHOR

Peter Kagey, Dec 20 2014

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 22 17:42 EDT 2022. Contains 353957 sequences. (Running on oeis4.)