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!)
A072022 Smallest x such that the number of nonprimes (i.e., 1 and composites) in the reduced residue set (RSS(x)) of x equals n, or 0 if there are no such x. 6

%I #29 Jan 07 2022 19:30:52

%S 1,5,7,15,26,11,13,38,102,17,19,25,0,23,35,144,74,198,29,31,75,57,104,

%T 94,37,55,69,41,43,118,0,47,81,128,87,134,53,93,480,146,77,59,61,117,

%U 111,166,172,67,250,91,71,73,350,194,129,202,79,206,212,83,214,153,218

%N Smallest x such that the number of nonprimes (i.e., 1 and composites) in the reduced residue set (RSS(x)) of x equals n, or 0 if there are no such x.

%C See A074915 for a bound on A048864(x) which allows the establishment of a search range for a(n). - _Giovanni Resta_, Feb 25 2020

%H Giovanni Resta, <a href="/A072022/b072022.txt">Table of n, a(n) for n = 1..10000</a>

%H Abhijit A J, A. Satyanarayana Reddy, <a href="https://arxiv.org/abs/1907.09908">Number of non-primes in the set of units modulo n</a>, arXiv:1907.09908 [math.GM], 2019.

%F a(n) = min{x; A048864(x)=n}; a(n)=0 if no such number exists.

%e n = 15: RRS(15) = {1,2,4,7,8,11,13,14} of which nonprimes = cRRS(15) = {1,4,8,14}, i.e., 4 terms; 15 is the smallest such number, so a(4) = 15. a(m) = 0 for m = {13, 31, 70, 119, 189, 210, 235, 236}.

%t f[x_] := EulerPhi[x]-PrimePi[x]+Length[FactorInteger[x]] t=Table[0, {256}]; Do[s=f[n]; If[s<257&&t[[s]]==0, t[[s]]=n], {n, 3, 1000000}]; t

%t (* Second program: *)

%t With[{s = Table[Count[Range[n - 1], k_ /; And[CoprimeQ[k, n], ! PrimeQ@ k]], {n, 10^3}]}, Function[{t, u}, Take[#, 63] &@ Join[{1}, Rest@ ReplacePart[t, Map[# -> Lookup[u, #][[1]] &, Rest@ Keys@ u]]]] @@ {ConstantArray[0, Max@ s], KeySort@ PositionIndex@ s}] (* _Michael De Vlieger_, Jul 30 2017 *)

%o (PARI) f(n) = eulerphi(n) - (primepi(n) - omega(n)); \\ A048864

%o a(n) = {my(k=1); while (f(k) != n, k++); k;} \\ _Michel Marcus_, Aug 07 2019

%Y Cf. A048864, A072023, A074915.

%K nonn

%O 1,2

%A _Labos Elemer_, Jun 06 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 March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)