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 A287830 #16 May 22 2025 10:21:46 %S A287830 1,10,94,886,8350,78694,741646,6989590,65872894,620814406,5850821230, %T A287830 55140648694,519669123166,4897584703270,46156938822094, %U A287830 435002788211926,4099652849195710,38636886795609094,364130592557264686,3431722880197818550,32342028292009425694 %N A287830 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 7. %C A287830 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 A287830 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (9,4). %F A287830 a(n) = 9*a(n-1) + 4*a(n-2), a(0)=1, a(1)=10. %F A287830 G.f.: (-1 - x)/(-1 + 9*x + 4*x^2). %F A287830 a(n) = ((1 - 11/sqrt(97))/2)*((9 - sqrt(97))/2)^n + ((1 + 11/sqrt(97))/2)*((9 + sqrt(97))/2)^n. %F A287830 a(n) = A015580(n)+A015580(n+1). - _R. J. Mathar_, Oct 20 2019 %t A287830 LinearRecurrence[{9, 4}, {1, 10}, 30] %o A287830 (Python) %o A287830 def a(n): %o A287830 if n in [0, 1]: %o A287830 return [1, 10][n] %o A287830 return 9*a(n-1)+4*a(n-2) %Y A287830 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. A287825-A287831. %K A287830 nonn,easy %O A287830 0,2 %A A287830 _David Nacin_, Jun 02 2017