A336486 The least prime s for which there exist primes p, q, r such that phi(p*q*s^n) = phi(r*s^(2n+1)) and sigma(p*q*s^n) = sigma(r*s^(2n+1)).
2, 2, 2, 2, 5, 37, 13, 7, 2, 19, 7, 7, 2, 19, 4447, 2, 2, 2, 2, 5, 73, 23, 37, 2, 2, 19, 19, 2, 2
Offset: 1
Examples
a(2) = 2 because for n = 2 and prime s = 2, a = 19*89*s^n and b = 199*s^(2n+1), we have phi(a) = phi(b) and sigma(a) = sigma(b).
Programs
-
Maple
with(NumberTheory): KS := []; for k to 29 do tf := false; for ii do s := ithprime(ii); c := 2*s^(k+1)+1; cc := (c^2-1)*(1/2); Q := Divisors(cc); for d in Q do q := d+c; if isprime(q) then p := c+cc/(q-c); if p < q then break end if; if isprime(p) then r := 2*(p+q)-c; if isprime(r) then print([k, [p, q], r], s); KS := [op(KS), s]; tf := true; break end if end if end if end do; if tf then break end if end do end do; KS
-
PARI
is(t, u, x, y) = ispseudoprime(t*x+1) && ispseudoprime(u*y/t+1) && ispseudoprime(x*y+1); a(n) = {my(s=1, t, u); while(s=nextprime(s+1), for(i=0, 1+n\2, t=s^i; fordiv(2*(1+u=s^(n+1)), d, if(is(t, u, 2*u/t+d, 2*t+(2*u+2)/d) || is(t, u, 2*u/t-d, 2*t-(2*u+2)/d), return(s))))); } \\ Jinyuan Wang, Sep 30 2020
Comments