OFFSET
0,2
COMMENTS
5 divides a(n) for all n.
lim n -> infinity a(n)/5^n ~ 0.570048386972902 is the probability that a random, infinite string over a 5-letter alphabet does not begin with a palindrome.
This sequence gives the number of walks on K_5 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) = 5^n - A249638(n) for n > 0.
EXAMPLE
For n = 3, the first 10 of the a(3) = 80 solutions are (in lexicographic order) 011, 012, 013, 014, 021, 022, 023, 024, 031, 032.
PROG
(Ruby) seq = [1, 0]; (2..N).each { |i| seq << 5 * seq[i-1] + 5**((i+1)/2) - seq[(i+1)/2] }; seq = seq.each_with_index.collect { |a, i| 5**i - a }
CROSSREFS
KEYWORD
easy,nonn,walk
AUTHOR
Peter Kagey, Dec 20 2014
STATUS
approved