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!)
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
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. A056608. [From R. J. Mathar, Sep 23 2008]
Sequence in context: A123582 A214861 A037914 * A104517 A098397 A278744
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 03:29 EDT 2024. Contains 373089 sequences. (Running on oeis4.)