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 A215595 #27 Feb 22 2020 20:57:36 %S A215595 0,0,1,52,2027,70226,2280825,71112600,2155562551,64005323902, %T A215595 1870809923477,54006556365476,1543466751232275,43746473462661450, %U A215595 1231293799939647601,34451045198171912752,959005856055827234927,26576960554539062120726,733650711461388661963725 %N A215595 Number of strings of length n, formed from the 26-letter English alphabet, which contain the substring xy. %H A215595 G. C. Greubel, <a href="/A215595/b215595.txt">Table of n, a(n) for n = 0..700</a> %H A215595 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (52,-677,26). %F A215595 a(n) = 26*a(n-1) + 26^(n-2) - a(n-2). %F A215595 a(n) = 52*a(n-1) - 677*a(n-2) + 26*a(n-3). - _Charles R Greathouse IV_, Aug 16 2012 %F A215595 G.f.: x/(1 - 52*x + 677*x^2 - 26*x^3). - _Alexander R. Povolotsky_, Aug 16 2012 %F A215595 a(n) = (1/168)*(13 +2*sqrt(42))^(-n)*(-(84+13*sqrt(42))*(13+2*sqrt(42))^(2*n) + 168*(338+52*sqrt(42))^n-84+13*sqrt(42)). - _Alexander R. Povolotsky_, Aug 16 2012 %F A215595 a(n) = Sum_{j=1..n} (-1)^(j+1) * B(n,j), where B(n,j) is the number of ways to place k occurrences of xy in a string of length n, and then choosing arbitrary letters for the n - 2k remaining positions. B(n,j) = product((n-i),i=j..(2*j-1)) / j! * 26^(n-2*j). %e A215595 For n = 2, the only such string is xy. For n = 3, there are 26 strings of the form *xy and 26 of the form xy*. For n = 4, there are 26^2 of each of the forms xy**, *xy* and **xy, but we double count xyxy, so the answer for n=4 is 3*26^2 - 1 = 2027. %t A215595 Join[{0}, CoefficientList[Series[x/(1 - 52*x + 677*x^2 - 26*x^3), {x, 0, 50}], x]] (* _G. C. Greubel_, Feb 26 2017 *) %o A215595 (PARI) x='x+O('x^50); concat([0,0], Vec(x/(1 - 52*x + 677*x^2 - 26*x^3))) \\ _G. C. Greubel_, Feb 26 2017 %Y A215595 Cf. A186314 (same problem for ternary strings). %K A215595 nonn,easy %O A215595 0,4 %A A215595 _David Kofoed Wind_, Aug 16 2012