login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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:
map(f, [$1..100]); # Robert Israel, Apr 10 2024
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
Cf. A000961 (Powers of primes), A001221 (omega), A010879 (Final digit of n), A023888 (Sum of the prime power divisors of n including 1), A371885 (first k with a(k) = n).
Sequence in context: A322656 A105827 A230289 * A023888 A222085 A187793
KEYWORD
nonn,easy,base
AUTHOR
Wesley Ivan Hurt, Nov 20 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 00:15 EDT 2024. Contains 375310 sequences. (Running on oeis4.)