login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A354207
a(n) = n - A354203(sigma(A354202(n))), where A354202 is fully multiplicative with a(p) = A354200(A000720(p)), and A354203 is its left inverse.
2
0, 1, 2, -19, 2, 5, 6, 3, -2, 7, 9, -11, 12, 13, 12, -453, 15, 7, 18, -49, 20, 20, 22, 19, -28, 25, 23, 5, 18, 27, 24, -37, 31, 32, 32, -217, 34, 37, 38, 25, 40, 41, 42, -2, 12, 45, 45, -421, 16, -3, 49, 29, 30, 50, 49, 51, 56, 47, 46, -9, 32, 55, 52, -19443, 62, 64, 66, 22, 68, 67, 69, 17, 71, 71, 22, 53, 75, 77, 76
OFFSET
1,3
FORMULA
a(n) = n - A354206(n).
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); };
A354203(n) = { my(f=factor(n)); for(k=1, #f~, f[k, 1] = A354201(primepi(f[k, 1]))); factorback(f); };
A354207(n) = (n-A354203(sigma(A354202(n))));
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, May 23 2022
STATUS
approved