OFFSET
1,2
COMMENTS
See comments in A368900.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
PROG
(PARI)
up_to = 2^18;
LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2, len, g[n] = lcm(g[n-1], v[n]); b[n] = g[n]/g[n-1]); (b); };
A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m));
v369032 = LCMtransform(vector(up_to, i, A241909(i)));
A369032(n) = v369032[n];
(PARI)
A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 12 2024
STATUS
approved