cp's OEIS Frontend

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.

A287834 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 3.

This page as a plain text file.
%I A287834 #13 May 22 2025 10:21:46
%S A287834 1,11,105,1005,9621,92105,881753,8441329,80811789,773639469,
%T A287834 7406320733,70903294113,678781988705,6498216958121,62209699634757,
%U A287834 595555173609653,5701457600593525,54582044135967257,522532964509030377,5002390498942001761,47889630709552579709
%N A287834 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 3.
%H A287834 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (10,-2,-21,10).
%F A287834 a(n) = 10*a(n-1) - 2*a(n-2) - 21*a(n-3) + 10*a(n-4), a(0)=1, a(1)=11, a(2)=105, a(3)=1005, a(4)=9621.
%F A287834 G.f.: (-1 - x + 3*x^2 + 2*x^3 - 2*x^4)/(-1 + 10*x - 2*x^2 - 21*x^3 + 10*x^4).
%t A287834 LinearRecurrence[{10, -2, -21, 10}, {1, 11, 105, 1005, 9621}, 20]
%o A287834 (Python)
%o A287834 def a(n):
%o A287834  if n in [0,1,2,3,4]:
%o A287834   return [1, 11, 105, 1005, 9621][n]
%o A287834  return 10*a(n-1) - 2*a(n-2) - 21*a(n-3) + 10*a(n-4)
%Y A287834 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. A287825-A287839.
%K A287834 nonn,easy
%O A287834 0,2
%A A287834 _David Nacin_, Jun 07 2017