login
a(n) = 6*a(n-1) - 7*a(n-2) - 2*a(n-3) for n >= 3, with a(0) = a(1) = 0, a(2) = 1.
2

%I #18 Jun 09 2021 22:39:36

%S 0,0,1,6,29,130,565,2422,10317,43818,185845,787710,3337709,14140594,

%T 59904181,253765510,1074982605,4553728698,19289962933,81713711502,

%U 346145071085,1466294520130,6211324200181,26311593418006,111457702066509,472142410072650

%N a(n) = 6*a(n-1) - 7*a(n-2) - 2*a(n-3) for n >= 3, with a(0) = a(1) = 0, a(2) = 1.

%C a(n) is the lower-left entry of {{6, -7, -2}, {1, 0, 0}, {0, 1, 0}}^n.

%C 2p = A100484(k) divides a(p) for odd prime p = prime(k).

%C a(n) and n have the opposite parity for n >= 1. - _Jianing Song_, Jun 09 2021

%H Jianing Song, <a href="/A345031/b345031.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-7,-2).

%F a(n) = (((1 + sqrt(5))/2)^(3n) + ((1 - sqrt(5))/2)^(3n) - 2^(n+1))/10.

%F Relation with A343575:

%F For even n, A343575(n) = 10*(a(n) mod (2*n)) - 1;

%F For odd n, A343575(n) = 10*(a(n) mod (2*n)).

%F O.g.f.: x^2/((1 - 2*x)*(1 - 4*x - x^2)).

%F E.g.f.: (exp((2 + sqrt(5))*x) + exp((2 - sqrt(5))*x) - 2*exp(2*x))/10.

%o (PARI) a(n) = my(M = [6, -7, -2; 1, 0, 0; 0, 1, 0]); (M^n)[3,1]

%Y Cf. A343575.

%K nonn,easy

%O 0,4

%A _Jianing Song_, Jun 06 2021