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.

A287804 Number of quinary sequences of length n such that no two consecutive terms have distance 1.

This page as a plain text file.
%I A287804 #16 Apr 09 2020 10:52:28
%S A287804 1,5,17,59,205,713,2481,8635,30057,104629,364225,1267923,4413861,
%T A287804 15365465,53490097,186209299,648230545,2256616133,7855718641,
%U A287804 27347281995,95201200637,331413874569,1153716087665,4016309864843,13981555011321,48672509644725
%N A287804 Number of quinary sequences of length n such that no two consecutive terms have distance 1.
%H A287804 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (5,-5,-1).
%F A287804 a(n) = 5*a(n-1) - 5a(n-2) - a(n-3), a(0)=1, a(1)=5, a(2)=17.
%F A287804 G.f.: (1 - 3*x^2)/(1 - 5*x + 5*x^2 + x^3).
%e A287804 For n=2 the a(2)=17=25-8 sequences contain every combination except these eight: 01,10,12,21,23,32,34,43.
%t A287804 LinearRecurrence[{5, -5, -1}, {1, 5, 17}, 50]
%o A287804 (Python)
%o A287804 def a(n):
%o A287804     if n in [0,1,2]:
%o A287804         return [1,5,17][n]
%o A287804     return 5*a(n-1)-5*a(n-2)-a(n-3)
%Y A287804 Cf. A040000, A003945, A083318, A078057, A003946, A126358, A003946, A055099, A003947, A015448, A126473. A287804-A287819.
%K A287804 nonn,easy
%O A287804 0,2
%A A287804 _David Nacin_, Jun 01 2017