|
|
A301803
|
|
a(n) is the number of n-digit numbers divisible by their last digit.
|
|
0
|
|
|
9, 41, 420, 4203, 42036, 420357, 4203572, 42035714, 420357143, 4203571428, 42035714286, 420357142857, 4203571428572, 42035714285714, 420357142857143, 4203571428571428, 42035714285714286, 420357142857142857, 4203571428571428572, 42035714285714285714, 420357142857142857143, 4203571428571428571428
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
For n >= 4, a(n) = (1177/28)*10^(n-2) + b(n mod 6)/7, where b(0)=-1, b(1)=4, b(2)=-2, b(3)=1, b(4)=-4, b(5)=2.
|
|
EXAMPLE
|
For n=2:
Nothing can be divided by 0.
All 9 two-digit numbers ending in 1 are divisible by 1.
All 9 two-digit numbers ending in 2 are divisible by 2.
Two two-digit numbers ending in 3 are divisible by 3 (namely 33, 63 and 93).
Four two-digit numbers ending in 4 are divisible by 4 (24, 44, 64 and 84).
All 9 two-digit numbers ending in 5 are divisible by 5.
Three two-digit numbers ending in 6 are divisible by 6 (namely 36, 66 and 96).
The only two-digit number ending in 7 and divisible by 7 is 77.
2 two-digit numbers ending in 8 are divisible by 8: 48 and 88.
The only two-digit number ending in 9 and divisible by 9 is 99.
Thus a(2)=9+9+3+4+9+3+1+2+1=41.
|
|
MAPLE
|
B[0]:= -1: B[1]:= 4: B[2]:= -2:
B[3]:= 1: B[4]:= -4: B[5]:= 2:
F:= d -> (1177/28)*10^(d-2)+B[d mod 6]/7:
F(1):= 9: F(2):= 41: F(3):= 420:
map(F, [$1..30]);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|