login
A194642
Units' digits of the nonzero heptagonal numbers.
0
1, 7, 8, 4, 5, 1, 2, 8, 9, 5, 6, 2, 3, 9, 0, 6, 7, 3, 4, 0, 1, 7, 8, 4, 5, 1, 2, 8, 9, 5, 6, 2, 3, 9, 0, 6, 7, 3, 4, 0, 1, 7, 8, 4, 5, 1, 2, 8, 9, 5, 6, 2, 3, 9, 0, 6, 7, 3, 4, 0, 1, 7, 8, 4, 5, 1, 2, 8, 9, 5, 6, 2, 3, 9, 0, 6, 7, 3, 4, 0, 1, 7, 8, 4, 5, 1
OFFSET
1,2
COMMENTS
This is a periodic sequence with period 20 and cycle 1, 7, 8, 4, 5, 1, 2, 8, 9, 5, 6, 2, 3, 9, 0, 6, 7, 3, 4, 0.
FORMULA
a(n) = a(n-20).
a(n) = a(n-5) -a(n-10) +a(n-15).
a(n) = 45 -a(n-1) -a(n-2) -a(n-3) -a(n-4) -a(n-10) -a(n-11) -a(n-12) -a(n-13) -a(n-14).
a(n) = 90 -a(n-1) -a(n-2) -a(n-3) -... -a(n-17) -a(n-18) -a(n-19).
a(n) = (n*(5*n-3)/2) mod 10.
G.f.: -x*(4*x^13 +3*x^12 +7*x^11 +6*x^10 +5*x^8 -5*x^6 +5*x^4 +4*x^3 +8*x^2 +7*x +1) / ((x -1)*(x^2 +1)*(x^4 +x^3 +x^2 +x +1)*(x^8 -x^6 +x^4 -x^2 +1)). - Colin Barker, Sep 23 2013
a(n) = A010879(A000566(n)). - Michel Marcus, Aug 10 2015
EXAMPLE
The seventh nonzero heptagonal number is A000566(7)=112, which has units' digit 2. Hence a(7)=2.
MATHEMATICA
Table[Mod[n*(5*n-3)/2, 10], {n, 100}]
CROSSREFS
Sequence in context: A330161 A197823 A011243 * A114857 A292823 A256920
KEYWORD
nonn,easy,base
AUTHOR
Ant King, Aug 31 2011
STATUS
approved