The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A069213 a(n) = n-th positive integer relatively prime to n. 17

%I #22 Aug 14 2020 15:01:09

%S 1,3,4,7,6,17,8,15,13,23,12,35,14,31,28,31,18,53,20,49,37,47,24,71,31,

%T 55,40,65,30,109,32,63,53,71,51,107,38,79,62,99,42,145,44,95,83,95,48,

%U 143,57,123,80,111,54,161,74,129,89,119,60,223,62,127,109,127,87,217

%N a(n) = n-th positive integer relatively prime to n.

%C Smallest k such there are exactly n integers among (1,2,3,4,...,k) relatively prime to n. - _Benoit Cloitre_, Jun 09 2002

%H Reinhard Zumkeller, <a href="/A069213/b069213.txt">Table of n, a(n) for n = 1..10000</a>

%F a(p) = p+1, p is a prime, a(2^n)= 2^(n+1) - 1. What are a(pq), a(pqr), a(n) where n the product of first k primes? - _Amarnath Murthy_, Nov 14 2002

%F Let the remainder when n is divided by phi(n) be r and the quotient be k. I.e., n = k*phi(n) + r. Then k*n + r < a(n) < (k+1)*n. If the phi(n) numbers be arranged in increasing order and if the r-th number is m then a(n) = k*n + m. - _Amarnath Murthy_, Jul 07 2002

%e 6 is relatively prime to 1, 5, 7, 11, 13, 17,..., the 6th term of this sequence being 17, so a(6) = 17.

%t f[n_] := Block[{c = 0, k = 1}, While[c < n, If[CoprimeQ[k, n], c++ ]; k++ ]; k - 1]; Array[f, 66] (* _Robert G. Wilson v_, Sep 10 2008 *)

%t Table[Position[CoprimeQ[Range[300],n],True,1,n][[-1]],{n,70}]//Flatten (* _Harvey P. Dale_, Aug 14 2020 *)

%o (PARI) for(n=1,100,s=1; while(sum(i=1,s,if(gcd(n,i)-1,0,1))<n,s++); print1(s,","))

%o (Haskell)

%o a069213 = last . a077581_row -- _Reinhard Zumkeller_, Sep 26 2014

%Y Final term of n-th row of A077581.

%Y Cf. A077582.

%Y Cf. A247798, A247815.

%K nonn

%O 1,2

%A _Leroy Quet_, Apr 11 2002

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 June 9 20:03 EDT 2024. Contains 373248 sequences. (Running on oeis4.)