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.

A287812 Number of octonary sequences of length n such that no two consecutive terms have distance 1.

This page as a plain text file.
%I A287812 #10 May 22 2025 10:21:47
%S A287812 1,8,50,314,1972,12386,77796,488636,3069120,19277130,121079578,
%T A287812 760500364,4776699874,30002433636,188445170924,1183623397912,
%U A287812 7434334035874,46695023649050,293291264969380,1842161313673506,11570608166423524,72674945645197500
%N A287812 Number of octonary sequences of length n such that no two consecutive terms have distance 1.
%H A287812 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (7, -3, -10, 3).
%F A287812 For n>4, a(n) = 7*a(n-1) - 3*a(n-2) - 10*a(n-3) + 3*a(n-2), a(0)=1, a(1)=8, a(2)=50, a(3)=314, a(4)=1972.
%F A287812 G.f.: (-1 - x + 3 x^2 + 2 x^3 - x^4)/(-1 + 7 x - 3 x^2 - 10 x^3 + 3 x^4).
%e A287812 For n=2 the a(2) = 64 - 14 = 50 sequences contain every combination except these fourteen: 01,10,12,21,23,32,34,43,45,54,56,65,67,76.
%t A287812 LinearRecurrence[{7, -3, -10, 3}, {1, 8, 50, 314, 1972}, 40]
%o A287812 (Python)
%o A287812 def a(n):
%o A287812  if n in [0, 1, 2, 3, 4]:
%o A287812   return [1, 8, 50, 314, 1972][n]
%o A287812  return 7*a(n-1)-3*a(n-2)-10*a(n-3)+3*a(n-4)
%Y A287812 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
%K A287812 nonn,easy
%O A287812 0,2
%A A287812 _David Nacin_, Jun 02 2017