A094701 Smallest linear combination of phi(n) and sigma(n) with nonnegative coefficients: a(n) = Min_{x>=0,y>=0} (x+y) for which x*phi(n) + y*sigma(n) is a multiple of n.
1, 2, 2, 2, 2, 1, 2, 2, 3, 3, 2, 3, 2, 4, 5, 2, 2, 3, 2, 4, 7, 4, 2, 2, 5, 4, 3, 1, 2, 5, 2, 2, 9, 4, 18, 3, 2, 4, 9, 4, 2, 7, 2, 6, 3, 4, 2, 3, 7, 5, 9, 5, 2, 3, 7, 3, 9, 4, 2, 5, 2, 4, 7, 2, 11, 7, 2, 9, 9, 10, 2, 3, 2, 4, 12, 4, 10, 7, 2, 5, 3, 4, 2, 3, 13, 4, 9, 4, 2, 5, 9, 9, 9, 4, 19, 3, 2, 7, 5, 5, 2, 7
Offset: 1
Keywords
Examples
a(6) = 1 as 1*sigma(6) is a multiple of 6. a(4) = 2 as 2*phi(4) + 0*sigma(4) = 4. - Example added by _Antti Karttunen_, Feb 24 2020 a(14) = 4 as 3*phi(14) + 1*sigma(14) = 3*6 + 24 = 3*14, where 3+1 = 4.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..12857
- Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
Crossrefs
Programs
-
PARI
A094701(n) = { my(x=eulerphi(n),y=sigma(n)); for(s=1,oo,for(t=0,s,if(!(((t*x)+((s-t)*y))%n),return(s)))); }; \\ Antti Karttunen, Feb 24 2020
Formula
a(multiperfect) = 1.
a(prime) = 2 as 1*phi(prime) + 1*sigma(prime) and 1+1 = 2.
For primes > 5, a(2*prime) = 4.
Extensions
Name clarified by Antti Karttunen, Feb 24 2020
Comments