|
|
A367502
|
|
Sum of the final digits of the prime power divisors (p^k, k>=0) of n.
|
|
2
|
|
|
1, 3, 4, 7, 6, 6, 8, 15, 13, 8, 2, 10, 4, 10, 9, 21, 8, 15, 10, 12, 11, 4, 4, 18, 11, 6, 20, 14, 10, 11, 2, 23, 5, 10, 13, 19, 8, 12, 7, 20, 2, 13, 4, 8, 18, 6, 8, 24, 17, 13, 11, 10, 4, 22, 7, 22, 13, 12, 10, 15, 2, 4, 20, 27, 9, 7, 8, 14, 7, 15, 2, 27, 4, 10, 14, 16, 9, 9, 10, 26, 21, 4, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1 + Sum_{d|n, d>1} floor(1/omega(d)) * (d mod 10).
|
|
EXAMPLE
|
a(16) = 21 since the prime power divisors of 16 are {1, 2, 4, 8, 16} and the sum of their final digits is 1 + 2 + 4 + 8 + 6 = 21.
|
|
MAPLE
|
f:= proc(n) local F, i, j, t;
F:= ifactors(n)[2];
1 + add(add(F[i, 1]^j mod 10, j = 1 .. F[i, 2]), i=1..nops(F))
end proc:
|
|
MATHEMATICA
|
Table[1 + Sum[Floor[1/PrimeNu[k]] Mod[k, 10] (1 - Ceiling[n/k] + Floor[n/k]), {k, 2, n}], {n, 100}]
|
|
PROG
|
(PARI) a(n) = my(f=factor(n)); 1 + sum(k=1, #f~, sum(j=1, f[k, 2], lift(Mod(f[k, 1], 10)^j))); \\ Michel Marcus, Nov 22 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|