OFFSET
1,4
LINKS
FORMULA
PROG
(PARI)
A354200(n) = if(1==n, 5, my(p=prime(n), m=p%4); forprime(q=1+p, , if(m==(q%4), return(q))));
A354201(n) = if(n<=3, (n+1)\2, my(m=prime(n)%4); forstep(i=n-1, 0, -1, if(m==(prime(i)%4), return(prime(i)))));
A354202(n) = { my(f=factor(n)); for(k=1, #f~, f[k, 1] = A354200(primepi(f[k, 1]))); factorback(f); };
CROSSREFS
Cf. A354361 (positions of 1's).
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, May 23 2022
STATUS
approved