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.
%I A294491 #12 Oct 31 2017 23:07:15 %S A294491 1,1,6,87,2092,71445,3183156,175466347,11544312984,883404542025, %T A294491 77115832253380,7564442149980111,823833773843404776, %U A294491 98644885379708947357,12880909497761085034632,1821689155897508835803475,277402856595034529463789616,45253909471856604392088994065 %N A294491 Number of length 2n n-ary words that can be built by repeatedly inserting doublets into the initially empty word. %C A294491 Also the number of rooted closed walks of length 2n on the infinite rooted n-ary tree. %H A294491 Alois P. Heinz, <a href="/A294491/b294491.txt">Table of n, a(n) for n = 0..322</a> %F A294491 a(n) = Sum_{j=0..n-1} binomial(2*n,j)*(n-j)*(n-1)^j for n>0, a(0) = 1. %F A294491 a(n) = [x^n] 2*(n-1)/(n-2+n*sqrt(1-(4*n-4)*x)) for n>1, a(n) = 1 for n<2. %F A294491 a(n) = A183135(n,n). %F A294491 a(n) = n * A248828(n) for n>0, a(0) = 1. %e A294491 a(2) = 6 because 6 words of length 4 can be built over 2-letter alphabet {a, b} by repeatedly inserting doublets (words with two equal letters) into the initially empty word: aaaa, aabb, abba, baab, bbaa, bbbb. %p A294491 a:= n-> `if`(n=0, 1, add(binomial(2*n, j)*(n-j)*(n-1)^j, j=0..n-1)): %p A294491 seq(a(n), n=0..21); %Y A294491 Main diagonal of A183135. %Y A294491 Cf. A248828. %K A294491 nonn %O A294491 0,3 %A A294491 _Alois P. Heinz_, Oct 31 2017