login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124330 a(n)= ((d(n) mod phi(n)) +1)th positive integer which is coprime to 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. 3

%I #13 Feb 18 2023 22:48:46

%S 1,1,1,3,3,1,3,1,5,1,3,7,3,11,8,11,3,1,3,17,8,9,3,1,4,9,7,15,3,1,3,13,

%T 7,9,6,29,3,9,7,21,3,29,3,15,13,9,3,31,4,17,7,15,3,25,6,19,7,9,3,47,3,

%U 9,11,15,6,29,3,13,7,27,3,37,3,9,13,13,5,29,3,27,8,9,3,43,6,9,7,19,3,47,5

%N a(n)= ((d(n) mod phi(n)) +1)th positive integer which is coprime to 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.

%H Antti Karttunen, <a href="/A124330/b124330.txt">Table of n, a(n) for n = 1..20000</a>

%t f[n_] := Block[{k = 0, m = Mod[Length[Divisors[n]], EulerPhi[n]] + 1},While[m > 0,k++;While[GCD[n, k] > 1, k++ ];m--;];k];Table[f[n], {n, 100}] (* _Ray Chandler_, Oct 26 2006 *)

%o (PARI) A124330(n) = { my(k=1+(numdiv(n)%eulerphi(n))); for(i=1,oo,if(1==gcd(i,n),k--;if(!k,return(i)))); }; \\ _Antti Karttunen_, Feb 18 2023

%Y Cf. A000005, A000010, A124218, A124331.

%K nonn

%O 1,4

%A _Leroy Quet_ and _Ray Chandler_, Oct 26 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 02:46 EDT 2024. Contains 371917 sequences. (Running on oeis4.)