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 A287819 #12 Apr 09 2020 10:52:41 %S A287819 1,9,71,561,4433,35031,276827,2187585,17287073,136608591,1079529611, %T A287819 8530826457,67413620993,532726379847,4209793089371,33267280400913, %U A287819 262889866978817,2077449112980255,16416740845208075,129730917736941417,1025179795159015841 %N A287819 Number of nonary sequences of length n such that no two consecutive terms have distance 4. %H A287819 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (8,1,-14). %F A287819 For n>2, a(n) = 8*a(n-1) + a(n-2) - 14*a(n-3), a(0)=1, a(1)=9, a(2)=71, a(3)=561. %F A287819 G.f.: (1 + x - 2 x^2 - 2 x^3)/(1 - 8 x - x^2 + 14 x^3). %e A287819 For n=2 the a(2) = 81 - 10 = 71 sequences contain every combination except these ten: 04,40,15,51,26,62,37,73,48,84. %t A287819 LinearRecurrence[{8, 1, -14}, {1, 9, 71, 561}, 40] %o A287819 (Python) %o A287819 def a(n): %o A287819 if n in [0, 1, 2, 3]: %o A287819 return [1, 9, 71, 561][n] %o A287819 return 8*a(n-1)+a(n-2)-14*a(n-3) %Y A287819 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. %K A287819 nonn,easy %O A287819 0,2 %A A287819 _David Nacin_, Jun 02 2017