[go: up one dir, main page]

login
A089090
a(n) is the smallest composite number coprime to n.
3
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, 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, 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
OFFSET
1,1
COMMENTS
If n is the n-th primorial, then a(n) = prime(n+1)^2.
LINKS
FORMULA
a(n) = A053669(n)^2.
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
EXAMPLE
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.
MATHEMATICA
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}]
PROG
(PARI) A089090(n) = forprime(p=2, , if(n%p, return(p*p))); \\ Antti Karttunen, Dec 19 2018
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, Nov 26 2003
EXTENSIONS
Offset corrected by Antti Karttunen, Dec 19 2018
STATUS
approved