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 A287831 #12 May 22 2025 10:21:46 %S A287831 1,10,96,924,8892,85572,823500,7924932,76265388,733938084,7063035084, %T A287831 67970944260,654116708844,6294876045156,60578584659468, %U A287831 582976518206148,5610260171812140,53990200655546148,519573366930788172,5000101506310370436,48118353758378062956 %N A287831 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 8. %C A287831 In general, the number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 5+k for k in {0,1,2,3,4} is given by a(n) = 9*a(n-1) + 2*k*a(n-2), a(0)=1, a(1)=10. %H A287831 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (9,6). %F A287831 a(n) = 9*a(n-1) + 6*a(n-2), a(0)=1, a(1)=10. %F A287831 G.f.: (-1 - x)/(-1 + 9*x + 6*x^2). %F A287831 a(n) = ((1 - 11/sqrt(105))/2)*((9 - sqrt(105))/2)^n + ((1 + 11/sqrt(105))/2)*((9 + sqrt(105))/2)^n. %t A287831 LinearRecurrence[{9, 6}, {1, 10}, 30] %o A287831 (Python) %o A287831 def a(n): %o A287831 if n in [0, 1]: %o A287831 return [1, 10][n] %o A287831 return 9*a(n-1)+6*a(n-2) %Y A287831 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. A287825-A287831. %K A287831 nonn,easy %O A287831 0,2 %A A287831 _David Nacin_, Jun 02 2017