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 A386293 #15 Jul 23 2025 09:05:53 %S A386293 0,7,73,697,6433,58537,529393,4774777,43013953,387289417,3486260113, %T A386293 31378962457,282421147873,2541832273897,22876658237233, %U A386293 205890595223737,1853018041368193,16677173109731977,150094600937260753,1350851580234038617,12157664909301114913 %N A386293 a(n) = 9^n - (1/2)*4^n, n > 0; a(0) = 0. %C A386293 a(n) is the number of ternary strings of length 2*n that exclude strings with only 0's and 2's with an even number of each. %H A386293 Vincenzo Librandi, <a href="/A386293/b386293.txt">Table of n, a(n) for n = 0..300</a> %H A386293 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (13,-36). %F A386293 a(n) = 13*a(n-1) - 36*a(n-2), n > 2. %F A386293 G.f.: (7*x - 18*x^2)/((1 - 4*x)*(1 - 9*x)). %F A386293 E.g.f.: exp(9*x) - (1/2)*exp(4*x) - 1/2. %e A386293 For n = 2, a(2) = 73 since from the 81 strings of length 4 we exclude the following 8 (number of permutations in parentheses): 0022 (6), 0000 (1), 2222 (1). %e A386293 For n = 3, a(3) = 697 since from the 729 strings of length 6 we exclude the following 32 (number of permutations in parentheses): 000000 (1), 000022 (15), 002222 (15), 222222 (1). %t A386293 CoefficientList[Series[(7*x-18*x^2)/((1-4*x)*(1-9*x)),{x,0,25}],x] (* _Vincenzo Librandi_, Jul 23 2025 *) %o A386293 (Magma) [0] cat [9^n - (1/2)*4^n: n in [1..30]]; // _Vincenzo Librandi_, Jul 23 2025 %Y A386293 Cf. A386227. %K A386293 nonn,easy %O A386293 0,2 %A A386293 _Enrique Navarrete_, Jul 17 2025