OFFSET
1,3
COMMENTS
This is variant of A326042, and like that sequence, also this one is multiplicative.
LINKS
FORMULA
PROG
(PARI)
A348746(n) = { my(f=factor(n)); for(k=1, #f~, if(2==f[k, 1], f[k, 1]=3, if(3==f[k, 1], f[k, 1]=5, if(1==(f[k, 1]%4), for(i=1+primepi(f[k, 1]), oo, if(1==(prime(i)%4), f[k, 1]=prime(i); break)))))); factorback(f); };
A348747(n) = { my(f=factor(n)); for(k=1, #f~, if(f[k, 1]<=3, f[k, 1]--, if(5==f[k, 1], f[k, 1]=3, if(1==(f[k, 1]%4), forstep(i=primepi(f[k, 1])-1, 0, -1, if(1==(prime(i)%4), f[k, 1]=prime(i); break)))))); factorback(f); };
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, May 17 2022
STATUS
approved