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.

A287808 Number of septenary sequences of length n such that no two consecutive terms have distance 1.

This page as a plain text file.
%I A287808 #10 May 22 2025 10:21:46
%S A287808 1,7,37,197,1049,5587,29757,158491,844153,4496123,23947233,127547675,
%T A287808 679344041,3618320227,19271886609,102645866251,546712113769,
%U A287808 2911896468083,15509334488577,82605772190267,439974623297369,2343391557436483,12481365289466289
%N A287808 Number of septenary sequences of length n such that no two consecutive terms have distance 1.
%H A287808 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (7, -8, -6, 6).
%F A287808 For n>4, a(n) =  7*a(n-1) - 8*a(n-2) - 6*a(n-3) + 6*a(n-4), a(1)=7, a(2)=37, a(3)=197, a(4)=1049.
%F A287808 G.f.: (1-4*x^2+2*x^4)/(1-7*x+8*x^2+6*x^3-6*x^4).
%e A287808 For n=2 the a(2)=37=49-12 sequences contain every combination except these twelve: 01,10,12,21,23,32,34,43,45,54,56,65.
%t A287808 LinearRecurrence[{7, -8, -6, 6}, {1, 7, 37, 197, 1049}, 40]
%o A287808 (Python)
%o A287808 def a(n):
%o A287808  if n in [0,1,2,3,4]:
%o A287808   return [1, 7, 37, 197, 1049][n]
%o A287808  return 7*a(n-1)-8*a(n-2)-6*a(n-3)+6*a(n-4)
%Y A287808 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
%K A287808 nonn,easy
%O A287808 0,2
%A A287808 _David Nacin_, Jun 01 2017