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!)
A089090 a(n) is the smallest composite number coprime to n. 3

%I #14 Jul 25 2022 15:52:35

%S 4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,49,4,9,

%T 4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,49,4,9,4,9,

%U 4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,25,4,9,4,9,4,49,4,9,4,9,4,25,4

%N a(n) is the smallest composite number coprime to n.

%C If n is the n-th primorial, then a(n) = prime(n+1)^2.

%H Antti Karttunen, <a href="/A089090/b089090.txt">Table of n, a(n) for n = 1..16384</a>

%F a(n) = A053669(n)^2.

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} ((p^2*(p-1)/Product_{q prime <= p} q)) = 10.3344588090... . - _Amiram Eldar_, Jul 25 2022

%e n=30: below 30 coprimes to 30 phi(30)=8 numbers are relevant but each 1 or primes; so a(8)>30; the first suitable number is a(30)=49.

%t m=0;Table[fla=1;Do[s=GCD[n, k];If[Equal[s, 1]&&!PrimeQ[n]&&!Equal[n, 1]&& Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 130}], {k, 1, 256}]

%o (PARI) A089090(n) = forprime(p=2, , if(n%p, return(p*p))); \\ _Antti Karttunen_, Dec 19 2018

%Y Cf. A053669, A007978, A053670-A053674, A090091-A090093.

%K easy,nonn

%O 1,1

%A _Labos Elemer_, Nov 26 2003

%E Offset corrected by _Antti Karttunen_, Dec 19 2018

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 May 3 01:16 EDT 2024. Contains 372203 sequences. (Running on oeis4.)