|
|
A010879
|
|
Final digit of n.
|
|
149
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Also decimal expansion of 137174210/1111111111 = 0.1234567890123456789012345678901234... - Jason Earls, Mar 19 2001
In general the base k expansion of A062808(k)/A048861(k) (k>=2) will produce the numbers 0,1,2,...,k-1 repeated with period k, equivalent to the sequence n mod k. The k-digit number in base k 123...(k-1)0 (base k) expressed in decimal is A062808(k), whereas A048861(k) = k^k-1. In particular, A062808(10)/A048861(10)=1234567890/9999999999=137174210/1111111111.
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
|
|
FORMULA
|
a(n) = n mod 10.
Periodic with period 10.
Complex representation: a(n) = 1/10*(1-r^n)*sum{1<=k<10, k*product{1<=m<10,m<>k, (1-r^(n-m))}} where r=exp(Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (256/5)^2*(sin(n*Pi/10))^2 * sum{1<=k<10, k*product{1<=m<10,m<>k, (sin((n-m)*Pi/10))^2}}.
G.f.: g(x) = (sum{1<=k<10, k*x^k})/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +5*x^4 +6*x^5 +7*x^6 +8*x^7 +9*x^8) ) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
Also: g(x) = x(9x^10-10x^9+1)/((1-x^10)(1-x)^2).
a(n) = n^k mod 10, for k > 0, where k mod 4 = 1. - Doug Bell, Jun 15 2015
|
|
MAPLE
|
n mod 10 ;
|
|
MATHEMATICA
|
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 81] (* Ray Chandler, Aug 26 2015 *)
|
|
PROG
|
(Sage) [power_mod(n, 5, 10)for n in range(0, 81)] # Zerinvary Lajos, Nov 04 2009
(Haskell)
a010879 = (`mod` 10)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|