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.

A287813 Number of octonary sequences of length n such that no two consecutive terms have distance 2.

This page as a plain text file.
%I A287813 #12 May 22 2025 10:21:47
%S A287813 1,8,52,340,2224,14548,95164,622504,4072036,26636740,174241072,
%T A287813 1139777284,7455717772,48770692552,319027694548,2086881784180,
%U A287813 13651089405616,89296980486772,584125595190556,3820988224873576,24994540788543364,163498820845182820
%N A287813 Number of octonary sequences of length n such that no two consecutive terms have distance 2.
%H A287813 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (7, -3).
%F A287813 For n>2, a(n) = 7*a(n-1) - 3*a(n-2), a(0)=1, a(1)=8, a(2)=52.
%F A287813 G.f.: (1 + x - x^2)/(1 - 7 x + 3 x^2).
%F A287813 a(n) = A190972(n) + A190972(n+1) - A190972(n-1). - _R. J. Mathar_, Oct 20 2019
%e A287813 For n=2 the a(2) = 64 - 12 = 52 sequences contain every combination except these twelve: 02,20,13,31,24,42,35,53,46,64,57,75.
%t A287813 LinearRecurrence[{7, -3}, {1, 8, 52}, 40]
%o A287813 (Python)
%o A287813 def a(n):
%o A287813  if n in [0, 1, 2]:
%o A287813   return [1, 8, 52][n]
%o A287813  return 7*a(n-1)-3*a(n-2)
%Y A287813 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
%K A287813 nonn,easy
%O A287813 0,2
%A A287813 _David Nacin_, Jun 02 2017