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 A287805 #10 May 22 2025 10:21:47 %S A287805 1,5,19,73,281,1083,4175,16097,62065,239307,922711,3557761,13717913, %T A287805 52893147,203943935,786361409,3032030689,11690820555,45077144455, %U A287805 173807214241,670161078089,2583988659867,9963272432111,38416111919777,148123788152017,571131629935179 %N A287805 Number of quinary sequences of length n such that no two consecutive terms have distance 2. %H A287805 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4, 1, -6). %F A287805 For n>0, a(n) = 4*a(n-1) + a(n-2) - 6*a(n-3), a(1)=5, a(2)=19, a(3)=73. %F A287805 G.f.: (1 + x - 2*x^2 - 2*x^3)/(1 - 4*x - x^2 + 6*x^3). %e A287805 For n=2 the a(2)=19=25-6 sequences contain every combination except these six: 02,20,13,31,24,42. %t A287805 LinearRecurrence[{4, 1, -6}, {1, 5, 19, 73}, 40] %o A287805 (Python) %o A287805 def a(n): %o A287805 if n in [0,1,2,3]: %o A287805 return [1,5,19,73][n] %o A287805 return 4*a(n-1)+a(n-2)-6*a(n-3) %Y A287805 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. %K A287805 nonn,easy %O A287805 0,2 %A A287805 _David Nacin_, Jun 01 2017