login
A161462
Final digit of the sum of all the integers from n to 2*n-1.
0
1, 5, 2, 2, 5, 1, 0, 2, 7, 5, 6, 0, 7, 7, 0, 6, 5, 7, 2, 0, 1, 5, 2, 2, 5, 1, 0, 2, 7, 5, 6, 0, 7, 7, 0, 6, 5, 7, 2, 0, 1, 5, 2, 2, 5, 1, 0, 2, 7, 5, 6, 0, 7, 7, 0, 6, 5, 7, 2, 0, 1, 5, 2, 2, 5, 1, 0, 2, 7, 5, 6, 0, 7, 7, 0, 6, 5, 7, 2, 0, 1, 5, 2, 2, 5, 1
OFFSET
1,2
COMMENTS
Periodic with period 20. - R. J. Mathar, May 21 2010
Also, units digits of the pentagonal numbers. - Ant King, Jul 12 2011
FORMULA
From R. J. Mathar, May 21 2010: (Start)
a(n) = A000326(n) mod 10.
a(n) = a(n-5) - a(n-10) + a(n-15). (End)
a(n) = a(n-20). - Ant King, Jul 12 2011
a(n) = 70 - a(n-1) - a(n-2) - a(n-3) - ... - a(n-19). - Ant King, Jul 12 2011
EXAMPLE
a(1) = 1 mod 10 = 1;
a(2) = (3 + 4 + 5) mod 10 = 12 mod 10 = 2;
a(21) = (21 + 22 + ... + 41) mod 10 = 651 mod 10 = 1.
MATHEMATICA
Table[Mod[n*(3*n - 1)/2, 10], {n, 100}] (* Ant King, Jul 12 2011 *)
LinearRecurrence[{0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1}, {1, 5, 2, 2, 5, 1, 0, 2, 7, 5, 6, 0, 7, 7, 0}, 90] (* Harvey P. Dale, Nov 01 2020 *)
CROSSREFS
Sequence in context: A198496 A318332 A177925 * A259649 A217868 A153842
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Entries confirmed by R. J. Mathar, May 21 2010
STATUS
approved