The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A073813 Difference between n and largest unrelated number belonging to n, when n runs over composite numbers. For primes and for 4, unrelated set is empty. 4
 0, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 5, 2, 3, 2, 2, 2, 3, 2, 5, 2, 2, 3, 2, 2, 2, 3, 2, 2, 7, 2, 3, 2, 2, 5, 2, 3, 2, 2, 2, 3, 2, 5, 2, 2, 3, 2, 2, 2, 3, 2, 7, 2, 2, 3, 2, 2, 5, 2, 3, 2, 2, 7, 2, 3, 2, 5, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 5, 2, 3, 2, 7, 2, 11, 2, 3, 2, 5, 2, 2, 3, 2, 2, 7, 2, 3, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS From Michael De Vlieger, Mar 28 2016 (Start): a(0) = 0 since 4 is the smallest composite and "unrelated" numbers k with respect to n must be composite and smaller than n. Unrelated numbers k cannot be prime since primes p must either divide or be coprime to n; k cannot equal 1 since 1 is both a divisor of and coprime to n. The test for unrelated numbers k that belong to n is 1 < gcd(k, n) < k. (End) LINKS Michael De Vlieger, Table of n, a(n) for n = 1..10000 FORMULA See program. EXAMPLE composite[1]=4, URS[4]={}, a(1)=0 by convention; n=14, c[14]=24, URS[24]={9,10,14,15,16,18,20,21,22}, a(14)=24-Max[URS[24]]=2. MATHEMATICA c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x]; tn[x_] := Table[j, {j, 1, x}]; di[x_] := Divisors[x]; rrs[x_] := Flatten[Position[GCD[tn[x], x], 1]]; rs[x_] := Union[rrs[x], di[x]]; urs[x_] := Complement[tn[x], rs[x]]; Table[c[w]-Max[urs[c[w]]], {w, 1, 128}] Prepend[Function[k, k - SelectFirst[Range[k - 2, 2, -1], 1 < GCD[#, k] < # &]] /@ Select[Range[6, 138], ! PrimeQ@ # &], 0] (* Michael De Vlieger, Mar 28 2016, Version 10 *) CROSSREFS Cf. A045763, A073759, A002808. Cf. A056608. [From R. J. Mathar, Sep 23 2008] Sequence in context: A123582 A214861 A037914 * A104517 A098397 A278744 Adjacent sequences:  A073810 A073811 A073812 * A073814 A073815 A073816 KEYWORD nonn AUTHOR Labos Elemer, Aug 15 2002 STATUS approved

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

Last modified June 1 20:49 EDT 2020. Contains 334765 sequences. (Running on oeis4.)