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.

A287807 Number of senary sequences of length n such that no two consecutive terms have distance 2.

This page as a plain text file.
%I A287807 #10 May 22 2025 10:21:47
%S A287807 1,6,28,132,624,2952,13968,66096,312768,1480032,7003584,33141312,
%T A287807 156826368,742110336,3511703808,16617560832,78635142144,372105487872,
%U A287807 1760822074368,8332299518976,39428864667648,186579390892032,882903157346304,4177942598725632
%N A287807 Number of senary sequences of length n such that no two consecutive terms have distance 2.
%H A287807 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6, -6).
%F A287807 For n>2, a(n) =  6*a(n-1) - 6*a(n-2), a(1)=6, a(2)=28.
%F A287807 G.f.: (1 - 2*x^2)/(1 - 6*x + 6*x^2).
%e A287807 For n=2 the a(2)=28=36-8 sequences contain every combination except these eight: 02,20,13,31,24,42,35,53.
%t A287807 LinearRecurrence[{6, -6}, {1, 6, 28}, 40]
%o A287807 (Python)
%o A287807 def a(n):
%o A287807  if n in [0, 1, 2]:
%o A287807   return [1, 6, 28][n]
%o A287807  return 6*a(n-1)-6*a(n-2)
%Y A287807 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
%K A287807 nonn,easy
%O A287807 0,2
%A A287807 _David Nacin_, Jun 01 2017