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

%I #15 Mar 29 2016 23:58:59

%S 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,

%T 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,

%U 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

%N 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.

%C From _Michael De Vlieger_, Mar 28 2016 (Start):

%C 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.

%C The test for unrelated numbers k that belong to n is 1 < gcd(k, n) < k.

%C (End)

%H Michael De Vlieger, <a href="/A073813/b073813.txt">Table of n, a(n) for n = 1..10000</a>

%F See program.

%e 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.

%t 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}]

%t 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 *)

%Y Cf. A045763, A073759, A002808.

%Y Cf. A056608. [From _R. J. Mathar_, Sep 23 2008]

%K nonn

%O 1,2

%A _Labos Elemer_, Aug 15 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 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)