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^16;
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); };
A209229(n) = (n && !bitand(n, n-1));
A241916(n) = if(1==A209229(n), n, my(f = factor(2*n), nbf = #f~, igp = primepi(f[nbf, 1]), g = f); for(i=1, nbf, g[i, 1] = prime(1+igp-primepi(f[i, 1]))); factorback(g)/2); \\ Antti Karttunen, Jan 12 2024
v369033 = LCMtransform(vector(up_to, i, A241916(i)));
A369033(n) = v369033[n];
(PARI)
A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 12 2024
STATUS
approved