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.

A287811 Number of septenary sequences of length n such that no two consecutive terms have distance 5.

This page as a plain text file.
%I A287811 #14 May 22 2025 10:21:47
%S A287811 1,7,45,291,1881,12159,78597,508059,3284145,21229047,137226717,
%T A287811 887047443,5733964809,37064931183,239591481525,1548743682699,
%U A287811 10011236540769,64713650292711,418315611378573,2704034619149571,17479154549033145,112987031151647583
%N A287811 Number of septenary sequences of length n such that no two consecutive terms have distance 5.
%H A287811 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6, 3).
%F A287811 a(n) = 6*a(n-1) + 3*a(n-2), a(0)=1, a(1)=7.
%F A287811 G.f.: (1 + x)/(1 - 6*x - 3*x^2).
%F A287811 a(n) = A090018(n-1)+A090018(n). - _R. J. Mathar_, Oct 20 2019
%e A287811 For n=2 the a(2) = 49-4 = 45 sequences contain every combination except these four: 05, 50, 16, 61.
%t A287811 LinearRecurrence[{6, 3}, {1,7}, 40]
%o A287811 (Python)
%o A287811 def a(n):
%o A287811  if n in [0, 1]:
%o A287811   return [1, 7][n]
%o A287811  return 6*a(n-1)-3*a(n-2)
%Y A287811 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473.
%Y A287811 Cf. A287804-A287819.
%K A287811 nonn,easy
%O A287811 0,2
%A A287811 _David Nacin_, Jun 01 2017