cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A284723 Smallest odd prime that is relatively prime to n.

Original entry on oeis.org

3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3
Offset: 1

Views

Author

N. J. A. Sloane, Apr 04 2017

Keywords

Comments

More than the usual number of terms are shown in order to distinguish this from A239278.
a(n) = smallest odd prime missing from rad(n).
If rad(m) = rad(n), a(m) = a(n) (cf. A007947). - Bob Selcoe, Apr 04 2017

Crossrefs

Similar to but different from A239278.
Even bisection of A355001.

Programs

  • Mathematica
    a[n_] := Module[{p = 3}, While[Divisible[n, p], p = NextPrime[p]]; p]; Array[a, 100] (* Amiram Eldar, Jul 25 2022 *)
  • PARI
    a(n) = my(p=3); while(gcd(n, p) != 1, p=nextprime(p+1)); p; \\ Michel Marcus, Apr 04 2017; corrected Jun 13 2022

Formula

a(n) = 3 unless n == 0 (mod 3).
For n>3, a(n) < 3*log(n).
a(n) = A355001(2*n). - Antti Karttunen, Jul 18 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p odd prime} ((p*(p-1)/Product_{q odd prime <= p} q)) = 3.8401019546... . - Amiram Eldar, Jul 25 2022