login
A182189
a(n) = 6*a(n-1) - a(n-2) - 4 with n > 1, a(0)=1, a(1)=3.
8
1, 3, 13, 71, 409, 2379, 13861, 80783, 470833, 2744211, 15994429, 93222359, 543339721, 3166815963, 18457556053, 107578520351, 627013566049, 3654502875939, 21300003689581, 124145519261543, 723573111879673
OFFSET
0,2
COMMENTS
If p is a prime of the form 8*n +- 1 then a(p) == 3 (mod p); if p is a prime of the form 8*n +- 3 then a(p) == -1 (mod p).
From Pedro Caceres, Dec 30 2017:
The terms a(n) > 1 satisfy a(n)^5 + b(n)^5 = c(n)^5 + d(n)^5 where b(n) = a(n) - 2, c(n) = (a(n)-1) + i*ceiling((a(n)-1)*sqrt(2)), and d(n) is the conjugate of c(n), where i is the imaginary unit. Note that Re(c(n)) is A001542(n) and Im(d(n)) is A001541(n). (End)
FORMULA
G.f.: (1-4*x-x^2)/((1-x)*(1-6*x+x^2)). - Bruno Berselli, Jun 07 2012
a(n) = 1 + A000129(2*n). - G. C. Greubel, May 24 2021
MATHEMATICA
m = -11; n = -1; c = 0;
list3 = Reap[While[c < 22, t = 6 n - m - 4; Sow[t]; m = n; n = t; c++]][[2, 1]]
CoefficientList[Series[(1-4*x-x^2)/((1-x)*(1-6*x+x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 26 2012 *)
1 + Fibonacci[2*Range[0, 40], 2] (* G. C. Greubel, May 24 2021 *)
PROG
(Magma) I:=[1, 3]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2)-4: n in [1..41]]; // Bruno Berselli, Jun 07 2012
(PARI) my(x='x+O('x^40)); Vec((1-4*x-x^2)/((1-x)*(1-6*x+x^2))) \\ Altug Alkan, Dec 30 2017
(Sage) [1 + lucas_number1(2*n, 2, -1) for n in (0..40)] # G. C. Greubel, May 24 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kenneth J Ramsey, Apr 17 2012
STATUS
approved