A165258 Minimum value such that n occurs a(n) times, subject to the constraint that gcd(n,a(n)) = 1.
1, 3, 2, 3, 2, 5, 2, 5, 4, 7, 4, 7, 4, 9, 8, 9, 6, 11, 6, 9, 8, 9, 6, 11, 6, 11, 8, 11, 6, 13, 8, 13, 8, 13, 12, 13, 10, 15, 10, 17, 10, 17, 10, 15, 14, 15, 10, 17, 10, 17, 10, 15, 12, 17, 12, 15, 14, 15, 12, 17, 12, 15, 16, 15, 12, 19, 12, 19, 14, 19, 14, 19, 14, 19, 14, 21, 16, 19, 14
Offset: 1
Keywords
Programs
-
PARI
count(v,t,n)=local(r);for(i=1,n,if(v[i]==t,r++));r nexta(v,n)=for(i=1,n-1,if(gcd(i,n)==1&&count(v,i,n-1)