login
Sum of the final digits of the prime power divisors (p^k, k>=0) of n.
2

%I #15 Apr 12 2024 16:59:53

%S 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,

%T 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,

%U 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

%N Sum of the final digits of the prime power divisors (p^k, k>=0) of n.

%H Robert Israel, <a href="/A367502/b367502.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 1 + Sum_{d|n, d>1} floor(1/omega(d)) * (d mod 10).

%e 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.

%p f:= proc(n) local F,i,j,t;

%p F:= ifactors(n)[2];

%p 1 + add(add(F[i,1]^j mod 10, j = 1 .. F[i,2]),i=1..nops(F))

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Apr 10 2024

%t Table[1 + Sum[Floor[1/PrimeNu[k]] Mod[k, 10] (1 - Ceiling[n/k] + Floor[n/k]), {k, 2, n}], {n, 100}]

%o (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

%Y 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).

%K nonn,easy,base

%O 1,2

%A _Wesley Ivan Hurt_, Nov 20 2023