%I #33 Oct 25 2024 09:34:02
%S 1,1,1,1,3,5,9,15,27,47,83,145,255,447,785,1377,2417,4241,7443,13061,
%T 22921,40223,70587,123871,217379,381473,669439,1174783,2061601,
%U 3617857,6348897,11141537,19552035,34311429,60212361,105665327,185429723,325406479,571048563,1002120369
%N a(0) = a(1) = a(2) = a(3) = 1; thereafter a(n) = a(n-1) + a(n-2) + a(n-4).
%C A079398, A103609, A003269, A306276, A126116, and A000288 are the other six sequences which have characteristic equations of the form x^4 = ax^3 + bx^2 + cx + 1 in which a, b, and c are equal to either 0 or 1 -- but not all three of them are equal to zero. (Each of those sequences begins with 1,1,1,1.)
%C A005251 has the same characteristic equation, and each successive term is determined by the same operation, namely, a(n) = a(n-1) + a(n-2) + a(n-4). However, it has different starting values: (0,1,1,1) instead of (1,1,1,1).
%C The characteristic equation of this sequence is x^4 = x^3 + x^2 + 1. Lim_{n->infinity} a(n+1)/a(n) = 1.754877666...
%H Colin Barker, <a href="/A307677/b307677.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,0,1).
%F From _Colin Barker_, Apr 25 2020: (Start)
%F G.f.: (1 - x^2 - x^3) / ((1 + x)*(1 - 2*x + x^2 - x^3)).
%F a(n) = a(n-1) + a(n-2) + a(n-4) for n>3. (End)
%F a(n) = (1/5)*((-1)^n + 2*(2*A005314(n+1) - A005314(n) - 2*A005314(n-1))). - _G. C. Greubel_, Oct 23 2024
%t LinearRecurrence[{1,1,0,1}, {1,1,1,1}, 51] (* _G. C. Greubel_, Oct 23 2024 *)
%o (PARI) Vec((1 - x^2 - x^3) / ((1 + x)*(1 - 2*x + x^2 - x^3)) + O(x^40)) \\ _Colin Barker_, Apr 25 2020
%o (Magma) [n le 4 select 1 else Self(n-1) +Self(n-2) +Self(n-4): n in [1..51]]; // _G. C. Greubel_, Oct 23 2024
%o (SageMath)
%o @CachedFunction # a = A307677
%o def a(n): return 1 if n<4 else a(n-1) +a(n-2) +a(n-3)
%o [a(n) for n in range(51)] # _G. C. Greubel_, Oct 23 2024
%Y Cf. A000288, A003269, A005251, A005314, A079398, A103609, A126116, A306276.
%K nonn,easy
%O 0,5
%A _Joseph Damico_, Apr 21 2019