OFFSET
0,3
COMMENTS
Why exponent 5? Because it is the smallest nontrivial exponent e such that for an integer k not ending in 0, 1, 5 and 6, k^e has the same unit digit of k in base 10.
LINKS
Index entries for linear recurrences with constant coefficients, signature (5,-10, 10,-5,1,0,0,0,0,1,-5,10,-10,5,-1).
FORMULA
G.f.: x^2*(3 + 9*x + 12*x^2 + 12*x^3 + 12*x^4 + 12*x^5 + 12*x^6 + 12*x^7 + 13*x^8 + 8*x^9 + 15*x^10 - x^11 + x^12)/((1 - x)^6*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9)).
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) + a(n-10) - 5*a(n-11) + 10*a(n-12) - 10*a(n-13) + 5*a(n-14) - a(n-15) for n > 14.
a(n) = floor(n^5/10).
MATHEMATICA
Table[(n^5-Last[IntegerDigits[n]])/10, {n, 0, 36}]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Feb 28 2021
STATUS
approved