OFFSET
1,2
COMMENTS
Whenever n is an odd prime, a(n) is 0 (see M. Penn).
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
M. Penn, Hello, old friend..., YouTube video.
FORMULA
From Jianing Song, Jun 07 2021: (Start)
For even n, a(n) = 10*(A345031(n) mod (2*n)) - 1;
For odd n, a(n) = 10*(A345031(n) mod (2*n)). (End)
MATHEMATICA
Table[Mod[Floor[(2+Sqrt[5])^n-2^(n+1)], 20n], {n, 67}] (* Stefano Spezia, Apr 21 2021 *)
PROG
(PARI) a(n) = my(M = [6, -7, -2; 1, 0, 0; 0, 1, 0]); 10*((M^n)[3, 1] % (2*n)) - !(n%2) \\ Jianing Song, Jun 07 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
William C. Laursen, Apr 20 2021
EXTENSIONS
More terms from Stefano Spezia, Apr 21 2021
STATUS
approved