OFFSET
1,2
COMMENTS
The definition of the sequence has been corrected, given that it uses A095874, the indices in the list A000961 of "powers of primes" starting with A000961(1) = 1, rather than A322981, index of p^e in the list of prime powers A246655, as written in the original definition. See A333235 for the variant of this sequence which uses A322981 and A246655 instead, maybe the more natural choice given that the factorization of integers consists of prime powers > 1. - M. F. Hasler, Jun 15 2021
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
N:= 1000: # to get a(1) to a(N)
Primes:= select(isprime, [2, seq(2*i+1, i=1..(N-1)/2)]):
PP:= sort([1, seq(seq(p^k, k=1..floor(log[p](N))), p=Primes)]):
for n from 1 to nops(PP) do B[PP[n]]:= n od:
seq(mul(B[f[1]^f[2]], f=ifactors(n)[2]), n=1..N); # Robert Israel, Sep 02 2015
MATHEMATICA
pp = Select[Range@100, Length[FactorInteger[#]] == 1 &]; a = Table[Times @@ (Position[pp, #][[1, 1]] & /@ (#[[1]]^#[[2]] & /@ FactorInteger[n])), {n, 73}] (* Ivan Neretin, Sep 02 2015 *)
PROG
(PARI) f(n) = if(isprimepower(n), sum(i=1, logint(n, 2), primepi(sqrtnint(n, i)))+1, n==1); \\ A095874
a(n) = my(fr=factor(n)); for (k=1, #fr~, fr[k, 1] = f(fr[k, 1]^fr[k, 2]); fr[k, 2] = 1); factorback(fr); \\ Michel Marcus, May 29 2021
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Reinhard Zumkeller, Aug 17 2004
EXTENSIONS
Definition corrected by M. F. Hasler, Jun 16 2021
Example corrected by Ray Chandler, Jun 30 2021
STATUS
approved