cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A252698 Number of strings of length n over a 5-letter alphabet that do not begin with a palindrome.

This page as a plain text file.
%I A252698 #14 Mar 24 2017 00:47:57
%S A252698 0,5,20,80,380,1820,9020,44720,223220,1114280,5569580,27838880,
%T A252698 139185380,695882180,3479366180,17396607680,86982815180,434912961620,
%U A252698 2174563693820,10872812899520,54364058928020,271820266801220,1359101306167220,6795506391650720
%N A252698 Number of strings of length n over a 5-letter alphabet that do not begin with a palindrome.
%C A252698 5 divides a(n) for all n.
%C A252698 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.
%C A252698 This sequence gives the number of walks on K_5 with loops that do not begin with a palindromic sequence.
%H A252698 Peter Kagey, <a href="/A252698/b252698.txt">Table of n, a(n) for n = 0..1000</a>
%F A252698 a(n) = 5^n - A249638(n) for n > 0.
%e A252698 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.
%o A252698 (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 }
%Y A252698 A249638 gives the number of strings of length n over a 5-letter alphabet that DO begin with a palindrome.
%Y A252698 Analogous sequences for k-letter alphabets: A252696 (k=3), A252697 (k=4), A252699 (k=6), A252700 (k=7), A252701 (k=8), A252702 (k=9), A252703 (k=10).
%K A252698 easy,nonn,walk
%O A252698 0,2
%A A252698 _Peter Kagey_, Dec 20 2014