%I #67 Apr 23 2024 10:29:27
%S 0,1,4,21,120,697,4060,23661,137904,803761,4684660,27304197,159140520,
%T 927538921,5406093004,31509019101,183648021600,1070379110497,
%U 6238626641380,36361380737781,211929657785304,1235216565974041,7199369738058940,41961001862379597
%N a(n) = 6*a(n-1) - a(n-2) - 2 with n>1, a(0)=0, a(1)=1.
%C It appears that for n>0, A143608(n) divides a(n).
%C The sequence a(n)/A143608(n) appears to generate A001541 interleaved with A001653. - _R. J. Mathar_, Jul 04 2012
%C It also appears that if p equals a prime of the form 8*r +/- 3 then a(p + 1) == 0 (mod p); and that if p is a prime in the form of 8*r +/- 1 then a(p - 1) == 0 (mod p), inherited from A143608.
%H Bruno Berselli, <a href="/A182435/b182435.txt">Table of n, a(n) for n = 0..100</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-7,1).
%F a(n) = A046090(n-1), for n>=1.
%F G.f.: x*(1-3*x)/((1-x)*(1-6*x+x^2)). - _Bruno Berselli_, May 15 2012
%F a(n) = A001652(n-1)+1 with A001652(-1)=-1. - _Bruno Berselli_, May 16 2012
%F 2*a(n)*(a(n)-1)+1 = A001653(n)^2 for n>0. - _Bruno Berselli_, Oct 23 2012
%t m = -20;
%t n = -3;
%t c = 0;
%t list3 = Reap[While[c < 20,t = 6 n - m - 2;Sow[t];m = n;n = t; c++]][[2,1]]
%t LinearRecurrence[{7,-7,1},{0,1,4},30] (* _Harvey P. Dale_, May 11 2018 *)
%o (Magma) [n le 2 select n-1 else 6*Self(n-1)-Self(n-2)-2: n in [1..24]]; // _Bruno Berselli_, May 15 2012
%o (PARI) concat(0,Vec((1-3*x)/(1-x)/(1-6*x+x^2)+O(x^98))) \\ _Charles R Greathouse IV_, Jun 11 2013
%Y Cf. A001108, A143608, A001541 (first differences).
%Y Essentially a duplicate of A046090.
%K nonn,easy
%O 0,3
%A _Kenneth J Ramsey_, Apr 28 2012