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 A287829 #16 May 22 2025 10:21:47 %S A287829 1,10,92,848,7816,72040,663992,6120008,56408056,519912520,4792028792, %T A287829 44168084168,407096815096,3752207504200,34584061167992, %U A287829 318760965520328,2938016812018936,27079673239211080,249593092776937592,2300497181470860488,21203660818791619576 %N A287829 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 6. %C A287829 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 A287829 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (9,2). %F A287829 a(n) = 9*a(n-1) + 2*a(n-2), a(0)=1, a(1)=10. %F A287829 G.f.: (-1 - x)/(-1 + 9*x + 2*x^2). %F A287829 a(n) = ((1 - 11/sqrt(89))/2)*((9 - sqrt(89))/2)^n + ((1 + 11/sqrt(89))/2)*((9 + sqrt(89))/2)^n. %F A287829 a(n) = A015579(n)+A015579(n+1). - _R. J. Mathar_, Oct 20 2019 %t A287829 LinearRecurrence[{9, 2}, {1, 10}, 30] %o A287829 (Python) %o A287829 def a(n): %o A287829 if n in [0, 1]: %o A287829 return [1, 10][n] %o A287829 return 9*a(n-1)+2*a(n-2) %Y A287829 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. A287825-A287831. %K A287829 nonn,easy %O A287829 0,2 %A A287829 _David Nacin_, Jun 02 2017