OFFSET
1,1
MATHEMATICA
q[n_] := q[n] = And @@ Divisible[{Times @@ ((d = Divisors[n]) + 1), Times @@ (Rest@d - 1)}, n]; Select[Range[2*10^7], q[#] && q[# + 1] &]
PROG
(PARI) is1(k) = if(k == 1, 1, my(d = divisors(k)); !(gcd(prod(k=1, #d, d[k]+1), prod(k=2, #d, d[k]-1)) % k));
lista(kmax) = {my(q1 = is1(1), q2); for(k = 2, kmax, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2); }
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Amiram Eldar, Nov 15 2024
STATUS
approved