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.

User: Jonathan Vos Post

Jonathan Vos Post's wiki page.

Jonathan Vos Post has authored 2542 sequences. Here are the ten most recent ones:

A289548 The lesser of two semiprime brothers.

Original entry on oeis.org

9, 14, 21, 26, 403, 12367, 41303, 66893, 68297, 73147, 111607, 116813, 118003, 130133, 146873, 222757, 260497, 418307, 429491, 439097, 478061, 559003, 628241, 729007, 822397, 1116707, 1239869, 1595683, 1887239, 2148589, 2225669, 2481463, 2502977, 2539553
Offset: 1

Author

Keywords

Comments

Semiprime brothers are two consecutive semiprimes (A001358) whose prime factors are consecutive primes (A000040).
The first several examples of semiprime brothers are {9, 10}, {14, 15}, {21, 22}, {26, 33} & {403, 407}.
The only square term is 9 and the only even terms are 14 and 26.
Obviously the difference between the primepi of the factors of the two consecutive semiprimes is either {-1, 1} or {1, -1}.
Number of terms < 10^n: 1, 4, 5, 5, 10, 25, 62, 143, 319, 761, 2010, 5275, etc.
Only the first three terms have as the next semiprime the next integer making them twins. - Robert G. Wilson v, Jun 21 2018

Examples

			26 is in the sequence because 26 = 2*13 and the next semiprime is 33 = 3*11 with 2 & 3 consecutive primes and 11 & 13 consecutive primes.
403 is in the sequence because 403 = 13*31 and the next semiprime is 407 = 11*37 with 11 & 13 and 31 & 37 being consecutive primes.
		

Crossrefs

Programs

  • Mathematica
    p = q = 4; fp = fq = {1, 1}; lst = {}; While[p < 26000000, While[fq = Flatten[ Table[#1, {#2}] & @@@ FactorInteger@ q]; Length@ fq != 2, q++]; d = Sort[{fp, fq}]; If[ NextPrime[ d[[1, 1]]] == d[[2, 1]] && NextPrime[ d[[2, 2]]] == d[[1, 2]], AppendTo[lst, p]]; p = q; fp = fq; q++]; lst
  • PARI
    isok(p, q) = (nextprime(p+1) == q) || (nextprime(q+1) == p);
    pairp(n) = if (issquare(n), vector(2, k, sqrtint(n)), (factor(n)[,1])~);
    lista(nn) = {na = 2; while (na < nn, if (bigomega(na) != 2, na++, nb = na + 1; while (bigomega(nb) != 2, nb++); fpa = pairp(na); fpb = pairp(nb); if (isok(fpa[1], fpb[1]) && isok(fpa[2], fpb[2]), print1(na, ", ")); na = nb;););} \\ Michel Marcus, Jul 11 2017
    
  • Python
    from sympy import factorint, nextprime
    def is_semiprime(n):
        return sum(e for e in factorint(n).values()) == 2
    def next_semiprime(n):
        nxt = n + 1
        while not is_semiprime(nxt): nxt += 1
        return nxt
    def are_consecutive(p, q):
        return max(p, q) == nextprime(min(p, q))
    def ok(n):
        if not is_semiprime(n): return False
        nextsp = next_semiprime(n)
        fn, fm = factorint(n, multiple=True), factorint(nextsp, multiple=True)
        return are_consecutive(fn[0], fm[0]) and are_consecutive(fn[1], fm[1])
    print(list(filter(ok, range(150000)))) # Michael S. Branicky, Sep 14 2021

A272607 Possible single line scores, not counting multiples, in duplicate bridge.

Original entry on oeis.org

50, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 230, 240, 250, 260, 270, 280, 300, 340, 350, 360, 380, 400, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660
Offset: 1

Author

Keywords

Comments

Not the same as rubber bridge. The difference is in what is scored above and below "the line".
There are only 204 possible scores in duplicate bridge.
Multiples of ten not present: 10, 20, 30, 40, 60, 220, 290, 310, 320, 330, 370, 390, 410, 820, ..., .
a(i) can be made k ways: 1, 1, 1, 3, 3, 5, 2, 4, 5, 7, 2, 7, 6, 4, 7, 2, 5, 3, 1, 4, 2, 2, 3, 2, ..., .

Examples

			50 is in the sequence because if opponents, "They", bid something and are down by one, "We" score 50.
70 is in the sequence because if "We" bid one minor suit, either Clubs or Diamonds, "We" score 70.
100 is possible three different ways: Down one vulnerable, down one not vulnerable doubled and down two not vulnerable.
		

Crossrefs

Cf. A114959.

A278351 Least number that is the start of a prime-semiprime gap of size n.

Original entry on oeis.org

2, 7, 26, 97, 341, 241, 6091, 3173, 2869, 2521, 16022, 26603, 114358, 41779, 74491, 39343, 463161, 104659, 248407, 517421, 923722, 506509, 1930823, 584213, 2560177, 4036967, 4570411, 4552363, 7879253, 4417813, 27841051, 5167587, 13683034, 9725107, 47735342, 25045771, 63305661
Offset: 1

Keywords

Comments

A prime-semiprime gap of n is defined as the difference between p & q, p being either a prime, A000040, or a semiprime, A001358, and q being the next greater prime or semiprime, see examples.
The corresponding numbers at the end of the prime-semiprime gaps, i.e., a(n)+n, are in A278404.
In the first 52 terms, 19 are primes and the remaining 33 are semiprime. Of the end-of-gap terms a(n)+n, 20 are primes and 32 are not. There are only 6 pairs of p and q that are both primes, and 19 pairs that are both semiprime.

Examples

			a(1) = 2 since there is a gap of 1 between 2 and 3, both of which are primes.
a(2) = 7 since there is a gap of 2 between 7 and 9, the first is a prime and the second is a semiprime.
a(3) = 26 since there is a gap of 3 between 26, a semiprime, and 29, a prime.
a(6) = 241 because the first prime-semiprime gap of size 6 is between 241 and 247.
		

Programs

  • Mathematica
    nxtp[n_] := Block[{m = n + 1}, While[ PrimeOmega[m] > 2, m++]; m]; gp[_] = 0; p = 2; While[p < 1000000000, q = nxtp[p]; If[ gp[q - p] == 0, gp[q -p] = p; Print[{q -p, p}]]; p = q]; Array[gp, 40]
  • Perl
    use ntheory ":all";
    my($final,$p,$nextn,@gp) = (40,2,1);  # first 40 values in order
    forfactored {
      if (scalar(@) <= 2) { my $q = $;
        if (!defined $gp[$q-$p]) {
          $gp[$q-$p] = $p;
          while ($nextn <= $final && defined $gp[$nextn]) {
            print "$nextn $gp[$nextn]\n";
            $nextn++;
          }
          lastfor if $nextn > $final;
        }
        $p = $q;
      }
    } 3,10**14; # Dana Jacobsen, Sep 10 2018

A278404 Greater number in the least prime-semiprime gap of size n.

Original entry on oeis.org

3, 9, 29, 101, 346, 247, 6098, 3181, 2878, 2531, 16033, 26615, 114371, 41793, 74506, 39359, 463178, 104677, 248426, 517441, 923743, 506531, 1930846, 584237, 2560202, 4036993, 4570438, 4552391, 7879282, 4417843, 27841082, 5167619, 13683067, 9725141, 47735377, 25045807, 63305698
Offset: 1

Keywords

Comments

A prime-semiprime gap of n is defined as the difference between p & q, p being either a prime, A000040, or a semiprime, A001358, and q being the next greater prime or semiprime, see examples.
The corresponding numbers at the start of the prime-semiprime gaps, i.e., a(n)-n, are in A278351.

Examples

			a(1) = 3 since there is a gap of 1 between 2 and 3, both of which are primes.
a(2) = 9 since there is a gap of 2 between 7 and 9, the first is a prime and the second is a semiprime.
a(3) = 29 since there is a gap of 3 between 26, a semiprime, and 29, a prime.
a(6) = 247 because the first prime-semiprime gap of size 6 is between 241 and 247.
		

Crossrefs

A276176 Consider the race between primes, semiprimes, 3-almost primes, ... k-almost primes; sequence indicates when one overtakes another to give a new race leader.

Original entry on oeis.org

2, 26, 31, 34, 15526, 151165506068, 151165506073, 151165506089, 151165506093, 151165506295, 151165506410, 151165506518, 151165506526, 151165506658, 151165506665, 151165506711, 151165506819, 151165506970, 151165506994, 151165507256, 151165507259, 151165507265
Offset: 1

Author

Keywords

Comments

A "k-almost prime" is a number which is the product of exactly k primes.
Let pi_k(n) be the number of k-almost primes less than or equal to n. In 1909, on page 211 of the Handbuch, Edmund G. H. Landau stated that pi_k(n) ~ (n/log n)*(log log n^(k-1))/(k-1)! for all k >= 0.
Because of this fact, eventually the semiprimes will outnumber the primes; they do starting at 34. Likewise the 3-almost primes will outnumber the semiprimes and they do starting at 15526.
The terms from a(6) = 151165506068 to a(170) = 151165607026 correspond to counts of 4-almost and 3-almost primes overtaking each other multiple times. - Giovanni Resta, Aug 17 2018

Examples

			a(1) = 2 since beginning with the natural numbers (A000027) the race is even with no group in the lead. But at 2, we encounter our first member (1 is unity and is not a member of any group here) which is a prime and therefore the primes take the lead with 2.
a(2) = 34 which is a semiprime. pi_1(34) = 11 and pi_2(34) = 12. This is the first time that the semiprimes overtake the primes.
		

References

  • Edmund Georg Hermann Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Band I, B. G. Teubner, Leipzig u. Berlin, or Chelsea Publishing, NY 1953, or Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York 1974.

Crossrefs

Cf. A243906, A273381, A274123, A358677, A359242 (restricted to squarefree numbers).

Programs

  • Mathematica
    k = 1; lst = {}; tf = 0; p1 = 0; p2 = 0; While[k < 100001, If[PrimeOmega@k == 1, p1++]; If[PrimeOmega@k == 2, p2++]; If[p1 > p2 && tf == 0, tf++; AppendTo[lst, k]]; If[p2 > p1 && tf == 1, tf--; AppendTo[lst, k]]; k++]; lst
    (* cross check using *) AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[ Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]] ]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    (* as an example *) AlmostPrimePi[2, 15526] => 3986 whereas AlmostPrimePi[3, 15526] => 3987.

Formula

It seems plausible that 0.8 * log(A284411(m) - 1) <= log(a(n)) <= log(A284411(m)) in the instances where the overtaking concerns m-almost-primes and (m-1)-almost-primes. - Peter Munn, Aug 03 2023

Extensions

a(6)-a(22) from Giovanni Resta, Aug 17 2018
Name clarified by Peter Munn, Dec 31 2022

A274949 Complete list of prime powers arising in classification of modular curves of prime-power level and genus 0 with infinitely many rational points.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 13, 16, 25, 27, 32
Offset: 1

Author

N. J. A. Sloane, Jul 29 2016, following a suggestion from Jonathan Vos Post

Keywords

A257927 Array read by antidiagonals: M[i,j] = j-th decimal digit of (i+1)/(i-1) for i, j = 1,2,3,4,5,... or 0 if undefined.

Original entry on oeis.org

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

Author

Jonathan Vos Post, Jul 13 2015

Keywords

Comments

Main diagonal M[n.n] = 0,0,0,6,0,0,3,2,0,2,...

Examples

			============================================================
i \ j    .1. |.2. |.3. |.4. |.5. |.6. |.7. |.8. |.9. |.10.|.
============================================================
i=1.......0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.
i=2.......3. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.
i=3.......2. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.
i=4.......1. |.6. |.6. |.6. |.6. |.6. |.6. |.6. |.6. |.6. |.
i=5.......1. |.5. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.
i=6.......1. |.4. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.
i=7.......1. |.3. |.3. |.3. |.3. |.3. |.3. |.3. |.3. |.3. |.
i=8.......1. |.2. |.8. |.5. |.7. |.1. |.4. |.2. |.8. |.5. |.
i=9.......1. |.2. |.5. |.0. |.0. |.0. |.0. |.0. |.0. |.0. |.
i=10......1. |.2. |.2. |.2. |.2. |.2. |.2. |.2. |.2. |.2. |.
============================================================
		

A259528 n-th number with exactly n n's in base 10.

Original entry on oeis.org

1, 122, 2333, 34444, 455555, 5666666, 67777777, 788888888, 8999999999, 101010101010101010010, 11111111110111111111111, 1212121121212121212121212, 131313013131313131313131313, 14141241414141414141414141414
Offset: 1

Author

Jonathan Vos Post, Jun 29 2015

Keywords

Comments

Main diagonal M[n,n,n] of M[i,j,k] = k-th natural number such that number of i's in base 10 is j, for i,j,k = 1,2,3,4,5,....
M[1,1,n] = A043493 Numbers that contain a single 1.
M[2,2,n] = A043498 Numbers n such that number of 2's in base 10 is 2.
M[3,3,n] = A043503 Numbers n such that number of 3's in base 10 is 3.
M[4,4,n] = A043508 Numbers n such that number of 4's in base 10 is 4.

Examples

			First element is 1, the 1st natural number with exactly one 1 in base 10.
Second element is 122, the 2nd natural number with exactly two 2's in base 10.
Third element is 2333, the 3rd natural number with exactly three 3's in base 10.
		

Crossrefs

Programs

  • PARI
    a(n)=my(v=List(),k=10^#Str(n),d=List(digits((k^n-1)/(k-1)*n)),t); for(i=1,#d+1, t=d; listinsert(t,0,i); t=Vec(t); for(j=0,9, t[i]=j; listput(v,fromdigits(t)))); Set(v)[n] \\ Charles R Greathouse IV, Jun 29 2015

Extensions

a(5)-a(14) from Charles R Greathouse IV, Jun 29 2015

A247558 Smallest integer x > 0 such that the number of semiprimes in the interval (x/2, x] equals n.

Original entry on oeis.org

4, 6, 10, 15, 25, 26, 35, 38, 39, 57, 58, 62, 65, 86, 87, 91, 94, 95, 121, 122, 123, 134, 142, 143, 145, 146, 159, 161, 169, 202, 203, 205, 206, 209, 214, 215, 217, 218, 219, 221, 262, 265, 278, 299, 301, 302, 303, 305, 309, 326, 327, 329, 335, 341, 346, 361, 362, 365, 382, 386, 393, 394, 395, 398
Offset: 1

Author

Keywords

Comments

Analogous to A080359: the Labos Elemer primes.

Examples

			a(6) = 26 because in the interval, (13, 26], {14, 15, 21, 22, 25, 26} are six semiprimes.
		

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_] := PrimeOmega[n] == 2; mx = 1000; t = Table[0, {mx + 1}]; s = 0; Do[ If[ SemiPrimeQ[k], s++]; If[ SemiPrimeQ[k/2], s--]; If[s <= mx && t[[s + 1]] == 0, t[[s + 1]] = k], {k, 8*mx}]; Rest[t]

A242955 Decimal expansion of the constant c = lim f(n)*n^(3/2)/rho^n where f(n) = A214833(n) is the number of arithmetic formulas for n, and rho = A242970.

Original entry on oeis.org

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

Author

Jonathan Vos Post, Jun 09 2014

Keywords

Comments

This is the constant c given on page 2 of E. K. Gnang and others.
Gnang et al. find f(n) = A214833(n) ~ c*rho^n/n^(3/2) as n -> oo, with rho given in A242970, and c given by the present sequence. - M. F. Hasler, May 04 2017

Examples

			c = 0.1456918546999792945604248360579...
		

Crossrefs

The constant rho is given in A242970.
Cf. A214833.

Extensions

Offset corrected, definition improved, more terms from M. F. Hasler, May 04 2017