A124331 a(n) is the ((phi(n) mod d(n)) + 1)-th positive divisor of n, where phi(n) is number of positive integers which are <= n and are coprime to n and d(n) is the number of positive divisors of n.
1, 2, 1, 4, 1, 3, 1, 1, 1, 1, 1, 6, 1, 7, 1, 8, 1, 1, 1, 4, 1, 11, 1, 1, 25, 1, 9, 1, 1, 1, 1, 16, 1, 1, 1, 4, 1, 19, 1, 1, 1, 7, 1, 4, 1, 23, 1, 12, 1, 5, 1, 1, 1, 3, 1, 1, 1, 1, 1, 5, 1, 31, 1, 16, 1, 11, 1, 4, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 4, 81, 1, 1, 1, 1, 43, 1, 1, 1, 1, 1, 4, 1, 47, 1, 24, 1, 1, 1
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
Crossrefs
Programs
-
Mathematica
f[n_] := Block[{d = Divisors[n]}, d[[Mod[EulerPhi[n], Length[d]] + 1]]];Table[f[n], {n, 100}] (* Ray Chandler, Oct 26 2006 *)
-
PARI
A124331(n) = { my(m=eulerphi(n)%numdiv(n), ds=divisors(n)); ds[1+m]; }; \\ Antti Karttunen, Mar 30 2021