A074634 Cototient-remainder triangle: triangular array T(n,k) (n >= 1, 0 <= k < n) read by rows, where T(n,k) = smallest number x such that cototient(x) mod n = k.
1, 1, 2, 1, 2, 4, 1, 2, 4, 9, 1, 2, 4, 9, 6, 1, 2, 4, 9, 6, 25, 1, 2, 4, 9, 6, 18, 10, 1, 2, 4, 9, 6, 25, 10, 15, 1, 2, 4, 9, 6, 25, 10, 15, 12, 1, 2, 4, 9, 6, 25, 10, 15, 12, 21, 1, 2, 4, 9, 6, 24, 10, 15, 12, 21, 45, 1, 2, 4, 9, 6, 25, 10, 15, 12, 21, 30, 35, 1, 2, 4, 9, 6, 25, 10, 15, 12
Offset: 1
Examples
1; 1,2; 1,2,4; 1,2,4,9; 1,2,4,9,6; 1,2,4,9,6,25; 1,2,4,9,6,18,10; 1,2,4,9,6,25,10,15; 1,2,4,9,6,25,10,15,12, ...
Programs
-
Mathematica
{k=0, s=0, fl=1}; Table[Print["#"]; Table[fl=1; Print[{r, m}]; Do[s=Mod[n-EulerPhi[n], m]; If[(s==r)&&(fl==1), Print[n]; fl=0], {n, 1, 500}], {r, 0, m-1}], {m, 1, 50}]
Formula
Min{x; Mod[x-Phi[x], n]=r}, r=1..n, n=1, ...
Extensions
Name modified to match data by Sean A. Irvine, Jan 22 2025