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.

A287817 Number of nonary sequences of length n such that no two consecutive terms have distance 2.

This page as a plain text file.
%I A287817 #9 May 22 2025 10:21:47
%S A287817 1,9,67,501,3747,28025,209609,1567743,11725731,87701095,655949055,
%T A287817 4906086571,36694443381,274451368893,2052723708275,15353082914309,
%U A287817 114831408642039,858866749063989,6423783365292409,48045861327359751,359352839194448551,2687733333725785179
%N A287817 Number of nonary sequences of length n such that no two consecutive terms have distance 2.
%H A287817 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (8, -1, -23, 10, 1).
%F A287817 a(n) = 8*a(n-1) - 1*a(n-2) - 23*a(n-3) + 10*a(n-4) + a(n-5), a(0)=1, a(1)=9, a(2)=67, a(3)=501, a(4)=3747.
%F A287817 G.f: (-1 - x + 4 x^2 + 3 x^3 - 3 x^4)/(-1 + 8 x - x^2 - 23 x^3 + 10 x^4 + x^5).
%e A287817 For n=2 the a(2) = 81 - 14 = 67 sequences contain every combination except these fourteen: 02,20,13,31,24,42,35,53,46,64,57,75,68,86.
%t A287817 LinearRecurrence[{8, -1, -23, 10, 1}, {1, 9, 67 , 501, 3747}, 40]
%o A287817 (Python)
%o A287817 def a(n):
%o A287817  if n in [0, 1, 2, 3, 4]:
%o A287817   return [1, 9, 67 , 501, 3747][n]
%o A287817  return 8*a(n-1)-a(n-2)-23*a(n-3)+10*a(n-4)+a(n-5)
%Y A287817 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
%K A287817 nonn,easy
%O A287817 0,2
%A A287817 _David Nacin_, Jun 02 2017