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 A287818 #12 May 22 2025 10:21:46 %S A287818 1,9,69,531,4089,31491,242529,1867851,14385369,110789811,853254609, %T A287818 6571393371,50609994249,389776014531,3001884188289,23119197549291, %U A287818 178053936060729,1371293449053651,10561101680875569,81336980637343611,626421808927336809,4824426473972595171 %N A287818 Number of nonary sequences of length n such that no two consecutive terms have distance 3. %H A287818 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (9, -10). %F A287818 For n>2, a(n) = 9*a(n-1) - 10*a(n-2), a(0)=1, a(1)=9, a(2)=69. %F A287818 G.f.: (1 - 2 x^2)/(1 - 9 x + 10 x^2). %F A287818 For n>0, a(n)=(1/5)(3 - 18/sqrt(41))*((9 - sqrt(41))/2)^n + (1/5)(3 + 18/sqrt(41))*((9 + sqrt(41))/2)^n. %F A287818 a(n) = A178869(n+1)-2*A178869(n-1). - _R. J. Mathar_, Oct 20 2019 %e A287818 For n=2 the a(2) = 81 - 12 = 69 sequences contain every combination except these twelve: 03,30,14,41,25,52,36,63,47,74,58,85. %t A287818 LinearRecurrence[{9, -10}, {1, 9, 69}, 40] %o A287818 (Python) %o A287818 def a(n): %o A287818 if n in [0, 1, 2]: %o A287818 return [1, 9, 69][n] %o A287818 return 9*a(n-1)-10*a(n-2) %Y A287818 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. %K A287818 nonn,easy %O A287818 0,2 %A A287818 _David Nacin_, Jun 02 2017