login
A343575
a(n) = floor((2+sqrt(5))^n - 2^(n+1)) mod (20*n).
2
0, 9, 0, 49, 0, 9, 0, 129, 60, 49, 0, 49, 0, 9, 100, 129, 0, 249, 0, 49, 340, 9, 0, 449, 0, 9, 240, 289, 0, 249, 0, 129, 60, 9, 600, 49, 0, 9, 580, 449, 0, 609, 0, 289, 700, 9, 0, 449, 700, 249, 60, 289, 0, 969, 200, 129, 60, 9, 0, 49, 0, 9, 1240, 769, 0, 369, 0
OFFSET
1,2
COMMENTS
Whenever n is an odd prime, a(n) is 0 (see M. Penn).
LINKS
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
Cf. A345031.
Sequence in context: A340954 A087094 A375682 * A270010 A167319 A231948
KEYWORD
nonn,easy
AUTHOR
William C. Laursen, Apr 20 2021
EXTENSIONS
More terms from Stefano Spezia, Apr 21 2021
STATUS
approved