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.

A287827 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 3.

This page as a plain text file.
%I A287827 #10 May 22 2025 10:21:46
%S A287827 1,10,86,742,6404,55274,477082,4117804,35541714,306768722,2647791524,
%T A287827 22853698754,197255539962,1702558017644,14695170558994,
%U A287827 126837403201602,1094762853302164,9449150445514434,81557794797885642,703944119701429084,6075903902137709074
%N A287827 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 3.
%H A287827 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (9, -1, -20, 10).
%F A287827 For n>4, a(n) = 9*a(n-1) - a(n-2) - 20*a(n-3) + 10*a(n-4), a(0)=1, a(1)=10, a(2)=86, a(3)=742, a(4)=6404.
%F A287827 G.f.: (-1 - x + 3*x^2 + 2*x^3 - 2*x^4)/(-1 + 9*x - x^2 - 20*x^3 + 10*x^4).
%t A287827 LinearRecurrence[{9, -1, -20, 10}, {1, 10, 86, 742, 6404}, 30]
%o A287827 (Python)
%o A287827 def a(n):
%o A287827  if n in [0, 1, 2, 3, 4]:
%o A287827   return [1, 10, 86, 742, 6404][n]
%o A287827  return 9*a(n-1)-a(n-2)-20*a(n-3)+10*a(n-4)
%Y A287827 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819. A287825-A287831.
%K A287827 nonn,easy
%O A287827 0,2
%A A287827 _David Nacin_, Jun 02 2017