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.

Showing 1-7 of 7 results.

A381113 Decimal expansion of the asymptotic mean of the second smallest prime not dividing k, where k runs over the positive integers (A380539).

Original entry on oeis.org

5, 1, 5, 9, 1, 4, 2, 8, 5, 9, 6, 5, 1, 6, 4, 2, 0, 3, 0, 1, 3, 6, 5, 8, 0, 9, 7, 4, 5, 0, 1, 2, 5, 8, 1, 7, 2, 0, 0, 0, 7, 3, 0, 7, 2, 1, 4, 1, 9, 1, 6, 7, 9, 9, 3, 5, 0, 0, 6, 6, 3, 8, 8, 6, 6, 2, 4, 5, 4, 2, 4, 3, 7, 8, 8, 1, 0, 7, 1, 2, 1, 2, 1, 9, 9, 5, 3, 5, 3, 3, 9, 3, 6, 1, 5, 1, 0, 5, 0, 0, 1, 1, 9, 4, 9
Offset: 1

Views

Author

Amiram Eldar, Feb 14 2025

Keywords

Examples

			5.15914285965164203013658097450125817200073072141916...
		

Crossrefs

Cf. A002110, A007504, A249270 (analogous constant with smallest prime), A380539.

Programs

  • PARI
    primorial(k) = prod(i = 1, k, prime(i));
    primesum(k) = sum(i = 1, k, prime(i));
    suminf(k = 2, prime(k) * (prime(k)-1) * (primesum(k-1)-k+1) / primorial(k))

Formula

Equals lim_{m->oo} (1/m) * Sum_{k=1..m} A380539(k).
Equals Sum_{k>=2} prime(k) * (prime(k)-1) * (primesum(k-1)-k+1) / primorial(k), where primesum(k) = A007504(k) and primorial(k) = A002110(k).

A382659 Numbers k such that k < A053669(k)^2 * A380539(k), i.e., k < A382248(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 48, 50, 54, 60, 66, 70, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 210, 240, 252, 270, 300, 330, 360, 390
Offset: 1

Views

Author

Michael De Vlieger, Apr 14 2025

Keywords

Comments

Numbers k whose reduced residue system (RRS) does not intersect A126706 (i.e., the sequence of numbers that are neither squarefree nor prime powers). Alternatively, numbers k whose RRS is a subset of A303554 (i.e., the union of powers of primes and squarefree numbers).
Let p = A053669(k), and let q = A380539(k). Thus, p and q are the smallest and second smallest primes, respectively, that do not divide k. Let m = p^2 * q = A382248(k). Then this sequence is that of k such that k < m.
There are 72 terms in this sequence.
Sequences A048597 and A051250 are proper subsets of this sequence.

Examples

			Let omega = A001221.
For omega = 0, we have the subset {1}. 1 is in the sequence since 1 < m, m = 2^2 * 3 = 12.
For omega = 1, we have the subset {2, 3, 4, 5, 7, 8, 9, 11, 16, 32}.
  11 is in the sequence since 11 < m, m = 2^2 * 3 = 12, but 13 is not, since 13 > 12.
  9 is in the sequence since 9 < m, m = 2^2 * 5 = 20.
  25 is not a term since 25 > 12, and 27 is not a term since 27 > 20.
For omega = 2, we have the subset {6, 10, 12, 14, 15, 18, 20, 22, 24, 26, 28, 34, 36, 38, 40, 44, 48, 50, 54, 72, 96, 108, 144, 162}.
  38 = 2*19 is a term since 38 < 45, 45 = 3^2 * 5, but 46 = 2*23 is not, since 46 > 45.
  15 = 3*5 is a term since 15 < 20, but 21 is not, since 21 > 20 and 35 is not, since 35 > 12.
  Intersection with A033845 = {k : rad(k) = 6} is {6, 12, 18, 24, 36, 48, 54, 72, 96, 108, 144, 162}, since m = 5^2 * 7 = 175.
  Intersection with A033846 = {k : rad(k) = 10} is {10, 20, 40, 50}, since m = 3^2 * 7 = 63.
  Intersection with A033847 = {k : rad(k) = 14} is {14, 28}, since m = 3^2 * 5 = 45, etc.
For omega = 3, we have the subset {30, 42, 60, 66, 70, 78, 84, 90, 102, 114, 120, 126, 132, 138, 150, 156, 168, 174, 180, 240, 252, 270, 300, 360, 450, 480}, of which {30, 42, 66, 70, 78, 102, 114, 138, 174} are squarefree.
  Intersection with A143207 = {k : rad(k) = 30} is {30, 60, 90, .., 480} because m = 7^2 * 11 = 539.
  Intersection with 42*A108319 = {k : rad(k) = 42} is {42, 84, 126, 168}, since m = 5^2 * 11 = 275, etc.
For omega = 4, we have the subset {210, 330, 390, 420, 510, 630, 840, 1050, 1260, 1470}, of which {210, 330, 390, 510} are squarefree.
  Intersection with A147571 = {k : rad(k) = 210} is {210, 420, 630, 840, 1050, 1260, 1470} since m = 11^2 * 13 = 1573, etc.
For omega = 5, we have 2310 = 2*3*5*7*11, a term since 2310 < 13*17 = 2873; 2730 = 2*3*5*7*13 is not a term.
There are no terms larger than 2310, since the intersection with A147572 = {2310}, 2730 is not a term, and k = Product_{i=1..j} prime(i), k > prime(j+1)^2 * prime(j+2) for j > 5. Therefore the sequence is finite like A051250.
		

Crossrefs

Cf. A048597 (k such that k < p^2), A051250 (k such that k < p*q), A053669, A126706, A303554, A380539, A382248, A382960.

Programs

  • Mathematica
    Select[Range[30030], Function[n, c = 0; q = 2; n < Times @@ Reap[While[c < 2, While[Divisible[n, q], q = NextPrime[q]]; Sow[q^(2 - c)]; q = NextPrime[q]; c++]][[-1, 1]] ] ]

A382960 Numbers k such that k < A053669(k)^2 * A380539(k)^2, i.e., k < A382767(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 66, 68, 69, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84
Offset: 1

Views

Author

Michael De Vlieger, Apr 14 2025

Keywords

Comments

Numbers k whose reduced residue system does not intersect A286708 (i.e., powerful numbers that are not prime powers).
Let p = A053669(k), and let q = A380539(k). Thus, p and q are the smallest and second smallest primes, respectively, that do not divide k. Let m = p^2 * q^2 = A382767(k). Then this sequence is that of k such that k < m.
This sequence is finite following arguments akin to those in A051250 and A382659, with 626 terms.
Sequences A048597, A051250, and A382659 are proper subsets of this sequence.

Examples

			Let omega = A001221.
For omega = 0, we have the subset {1}. 1 is in the sequence since 1 < m, m = (2*3)^2 = 36.
For omega = 1, we have the subset {2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 64, 81, 128}.
  31 is in the sequence since 31 < m, m = (2*3)^2 = 36, but 37 is not a term since 37 > 36.
  25 is in the sequence since 25 < m, m = 36.
  49 is not a term since 49 > 36, and 243 is not a term since 243 > 100, 100 = (2*5)^2, etc.
For omega = 2, we have the squarefree numbers {6, 10, 14, 15, 22, 26, 34, 35, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218}.
  Intersection with A033845 = {k : rad(k) = 6} is {6, 12, 18, .., 1152}, since m = (5*7)^2 = 1225.
  Intersection with A033846 = {k : rad(k) = 10} is {10, 20, 40, ..., 400}, since m = (3*7)^2 = 441.
  Intersection with A033847 = {k : rad(k) = 14} is {14, 28, 56, ..., 224}, since m = (3*5)^2 = 225.
  Intersection with A033848 = {k : rad(k) = 15} is {15, 45, 75, 135}, since m = (2*7)^2 = 196, etc.
		

Crossrefs

Cf. A048597 (k such that k < p^2), A051250 (k such that k < p*q), A053669, A286708, A380539, A382659 (k such that k < p^2*q), A382767.

Programs

  • Mathematica
    Select[Range[510510], Function[n, c = 0; q = 2; n < Times @@ Reap[While[c < 2, While[Divisible[n, q], q = NextPrime[q]]; Sow[q^2]; q = NextPrime[q]; c++]][[-1, 1]] ] ]

A382248 Smallest number k that is neither squarefree nor a prime power such that k is coprime to n.

Original entry on oeis.org

12, 45, 20, 45, 12, 175, 12, 45, 20, 63, 12, 175, 12, 45, 28, 45, 12, 175, 12, 63, 20, 45, 12, 175, 12, 45, 20, 45, 12, 539, 12, 45, 20, 45, 12, 175, 12, 45, 20, 63, 12, 275, 12, 45, 28, 45, 12, 175, 12, 63, 20, 45, 12, 175, 12, 45, 20, 45, 12, 539, 12, 45, 20
Offset: 1

Views

Author

Michael De Vlieger, Mar 31 2025

Keywords

Comments

Let p be the smallest prime that is coprime to n and let q be the second smallest prime that is coprime to n. Then a(n) = p^2 * q.
Records in this sequence are set by n in A002110.

Examples

			a(1) = 12 = 2^2*3, since p = 2, q = 3.
a(2) = 45 = 3^2*5, since p = 3, q = 5.
a(3) = 20 = 2^2*5, since p = 2, q = 5.
a(4) = 45 = 3^2*5, since p = 3, q = 5, a(2^i) = 45 for i > 0.
a(6) = 175 = 5^2*7, since p = 5, q = 7.
a(9) = 20 = 2^2*5, since p = 2, q = 5, a(3^i) = 20 for i > 0.
a(10) = 63 = 3^2*7, since p = 3, q = 7.
a(12) = 175 = 5^2*7, since p = 5, q = 7, a(k) = 175 for n in A033845 (i.e., n such that rad(n) = 6).
a(20) = 63 = 3^2*7, since p = 3, q = 7, a(k) = 63 for n in A033846 (i.e., n such that rad(n) = 10).
a(30) = 539 = 7^2*11, since p = 7, q = 11, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[c = 0; q = 2; Times @@ Reap[While[c < 2, While[Divisible[n, q], q = NextPrime[q]]; Sow[q^(2 - c)]; q = NextPrime[q]; c++] ][[-1, 1]], {n, 120}]
  • PARI
    a(n) = my(k=2); while (isprimepower(k) || issquarefree(k) || (gcd(k, n) != 1) , k++); k; \\ Michel Marcus, Apr 01 2025

Formula

a(n) = A053669(n)^2 * A380539(n).
For k and m such that rad(k) = rad(m), a(k) = a(m), where rad = A007947.

A381031 The second smallest prime not dividing n minus the smallest prime not dividing n.

Original entry on oeis.org

1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 5, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 5, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 8, 1, 2, 1, 2, 5, 2, 1, 2, 1, 4, 3, 2, 1, 6, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 9
Offset: 1

Views

Author

Antti Karttunen, Feb 12 2025

Keywords

Examples

			For n = 1, the least prime not dividing it is 2, and the second least prime not dividing is 3, thus a(1) = 3-2 = 1.
For n = 3, the least nondividing prime is 2, the second least nondividing prime is 5, thus a(3) = 5-2 = 3.
For n = 6 = 2*3, the least nondividing prime is 5, and the second least nondividing prime is 7, thus a(6) = 7-5 = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = 1, q = 1, c = 0}, While[c < 2, p = NextPrime[p]; If[! Divisible[n, p], c++; If[c == 1, q = p]]]; p-q]; Array[a, 105] (* Amiram Eldar, Feb 14 2025 *)
  • PARI
    A381031(n) = { my(c=0,e=0); forprime(p=2, , if(n%p, c++; if(1==c, e=p, if(2==c, return(p-e))))); };

Formula

a(n) = A380539(n) - A053669(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A381113 - A249270 = 2.239091... . - Amiram Eldar, Feb 14 2025

A381805 Smallest composite squarefree number that is coprime to n.

Original entry on oeis.org

6, 15, 10, 15, 6, 35, 6, 15, 10, 21, 6, 35, 6, 15, 14, 15, 6, 35, 6, 21, 10, 15, 6, 35, 6, 15, 10, 15, 6, 77, 6, 15, 10, 15, 6, 35, 6, 15, 10, 21, 6, 55, 6, 15, 14, 15, 6, 35, 6, 21, 10, 15, 6, 35, 6, 15, 10, 15, 6, 77, 6, 15, 10, 15, 6, 35, 6, 15, 10, 33, 6, 35
Offset: 1

Views

Author

Michael De Vlieger, Mar 31 2025

Keywords

Comments

Let p be the smallest prime that is coprime to n and let q be the second smallest prime that is coprime to n. Then a(n) = p*q.
Records in this sequence are set by n in A002110.

Examples

			a(1) = 6 = 2*3, since p = 2, q = 3.
a(2) = 15 = 3*5, since p = 3, q = 5.
a(3) = 10 = 2*5, since p = 2, q = 5.
a(4) = 15 = 3*5, since p = 3, q = 5, a(2^i) = 15 for i > 0.
a(6) = 35 = 5*7, since p = 5, q = 7.
a(9) = 20 = 2*5, since p = 2, q = 5, a(3^i) = 10 for i > 0.
a(10) = 21 = 3*7, since p = 3, q = 7.
a(12) = 35 = 5*7, since p = 5, q = 7, a(k) = 35 for n in A033845 (i.e., n such that rad(n) = 6).
a(20) = 21 = 3*7, since p = 3, q = 7, a(k) = 21 for n in A033846 (i.e., n such that rad(n) = 10).
a(30) = 77 = 7*11, since p = 7, q = 11, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[c = 0; q = 2; Times @@ Reap[While[c < 2, While[Divisible[n, q], q = NextPrime[q]]; Sow[q]; q = NextPrime[q]; c++] ][[-1, 1]], {n, 120}]
  • PARI
    a(n) = my(k=2); while (isprime(k) || !issquarefree(k) || (gcd(k, n) != 1) , k++); k; \\ Michel Marcus, Apr 01 2025

Formula

a(n) = A053669(n) * A380539(n) = A382248(n)/A020639(n).
For k and m such that rad(k) = rad(m), a(k) = a(m), where rad = A007947.
n < a(n) for n in A051250, a finite sequence whose largest term is 60.

A382767 Smallest number k that is powerful but not a prime power that is also coprime to n.

Original entry on oeis.org

36, 225, 100, 225, 36, 1225, 36, 225, 100, 441, 36, 1225, 36, 225, 196, 225, 36, 1225, 36, 441, 100, 225, 36, 1225, 36, 225, 100, 225, 36, 5929, 36, 225, 100, 225, 36, 1225, 36, 225, 100, 441, 36, 3025, 36, 225, 196, 225, 36, 1225, 36, 441, 100, 225, 36, 1225
Offset: 1

Views

Author

Michael De Vlieger, Apr 04 2025

Keywords

Comments

Let p be the smallest prime that is coprime to n and let q be the second smallest prime that is coprime to n. Then a(n) = p^2 * q^2.
Records in this sequence are set by n in A002110.

Examples

			a(1) = 36 = (2*3)^2, since p = 2, q = 3.
a(2) = 225 = (3*5)^2, since p = 3, q = 5.
a(3) = 100 = (2*5)^2, since p = 2, q = 5.
a(4) = 225 = (3*5)^2, since p = 3, q = 5, a(2^i) = 225 for i > 0.
a(6) = 1225 = (5*7)^2, since p = 5, q = 7.
a(9) = 400 = (2*5)^2, since p = 2, q = 5, a(3^i) = 100 for i > 0.
a(10) = 441 = (3*7)^2, since p = 3, q = 7.
a(12) = 1225 = (5*7)^2, since p = 5, q = 7, a(k) = 1225 for n in A033845 (i.e., n such that rad(n) = 6), where rad = A007947.
a(20) = 441 = (3*7)^2, since p = 3, q = 7, a(k) = 441 for n in A033846 (i.e., n such that rad(n) = 10).
a(30) = 5929 = (7*11)^2, since p = 7, q = 11, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[c = 0; q = 2; Times @@ Reap[While[c < 2, While[Divisible[n, q], q = NextPrime[q]]; Sow[q^2]; q = NextPrime[q]; c++] ][[-1, 1]], {n, 120}]

Formula

a(n) = A053669(n)^2 * A380539(n)^2.
a(n) = A381805(n)^2.
a(n) = (A382248(n)/A020639(n))^2.
For k and m such that rad(k) = rad(m), a(k) = a(m), where rad = A007947.
Showing 1-7 of 7 results.