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-10 of 15 results. Next

A251723 First differences of A054272, A250473 and A250474: a(n) = A054272(n+1) - A054272(n).

Original entry on oeis.org

1, 4, 5, 14, 8, 21, 10, 26, 46, 15, 56, 43, 19, 45, 79, 77, 31, 89, 65, 29, 105, 74, 113, 162, 88, 41, 86, 41, 99, 353, 98, 164, 48, 298, 57, 181, 185, 127, 197, 194, 75, 355, 76, 143, 74, 462, 478, 167, 81, 165, 269, 89, 437, 274, 273, 291, 90, 291, 198, 98, 511, 734, 219, 106, 214, 783, 340, 578, 124, 240, 362, 488, 380, 379, 251, 393, 529, 261, 530, 669, 150, 708, 150
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2014

Keywords

Crossrefs

One less than A050216, the first differences of A000879.

Formula

a(n) = A054272(n+1) - A054272(n).
a(n) = A256447(n) + A256448(n). [Cf. also A256449.]

A249747 a(n) = floor((A002110(n) * A054272(n)) / A001248(n)).

Original entry on oeis.org

1, 2, 8, 51, 496, 6041, 97155, 1746481, 38377034, 1053921489, 31722366805, 1127475187757, 45429396874080, 1910408631449923, 87682336584597009, 4571067440374822934, 260160909199262899454, 15823372061924831882182, 1034588557961336117180784, 72606463908572608290939197, 5235472173106695729625747152, 407296805992490241506213234700
Offset: 1

Views

Author

Antti Karttunen, Dec 08 2014

Keywords

Crossrefs

Programs

  • PARI
    default(primelimit, 2^31 + 2^30);
    A002110(n) = prod(i=1, n, prime(i));
    A054272(n) = 1 + primepi(prime(n)^2) - n;
    A249747(n) = (A054272(n)*A002110(n))\(prime(n)^2);
    for(n=1, 100, write("b249747.txt", n, " ", A249747(n)));

Formula

a(n) = floor((A002110(n) * A054272(n)) / A001248(n)).
The ratio a(n) / A005867(n) seems to stay near 1. Note that A005867(n) = A000010(A002110(n)). See also formulas in A054272.

A078898 Number of times the smallest prime factor of n is the smallest prime factor for numbers <= n; a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 4, 11, 1, 12, 2, 13, 5, 14, 1, 15, 1, 16, 6, 17, 3, 18, 1, 19, 7, 20, 1, 21, 1, 22, 8, 23, 1, 24, 2, 25, 9, 26, 1, 27, 4, 28, 10, 29, 1, 30, 1, 31, 11, 32, 5, 33, 1, 34, 12, 35, 1, 36, 1, 37, 13, 38, 3, 39, 1, 40, 14, 41, 1, 42, 6, 43
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

From Antti Karttunen, Dec 06 2014: (Start)
For n >= 2, a(n) tells in which column of the sieve of Eratosthenes (see A083140, A083221) n occurs in. A055396 gives the corresponding row index.
(End)

Crossrefs

Programs

  • Haskell
    import Data.IntMap (empty, findWithDefault, insert)
    a078898 n = a078898_list !! n
    a078898_list = 0 : 1 : f empty 2 where
       f m x = y : f (insert p y m) (x + 1) where
               y = findWithDefault 0 p m + 1
               p = a020639 x
    -- Reinhard Zumkeller, Apr 06 2015
  • Maple
    N:= 1000: # to get a(0) to a(N)
    Primes:= select(isprime, [2,seq(2*i+1,i=1..floor((N-1)/2))]):
    A:= Vector(N):
    for p in Primes do
      t:= 1:
      A[p]:= 1:
      for n from p^2 to N by p do
        if A[n] = 0 then
           t:= t+1:
           A[n]:= t
        fi
      od
    od:
    0,1,seq(A[i],i=2..N); # Robert Israel, Jan 04 2015
  • Mathematica
    Module[{nn=90,spfs},spfs=Table[FactorInteger[n][[1,1]],{n,nn}];Table[ Count[ Take[spfs,i],spfs[[i]]],{i,nn}]] (* Harvey P. Dale, Sep 01 2014 *)
  • PARI
    \\ Not practical for computing, but demonstrates the sum moebius formula:
    A020639(n) = { if(1==n,n,vecmin(factor(n)[, 1])); };
    A055396(n) = { if(1==n,0,primepi(A020639(n))); };
    A002110(n) = prod(i=1, n, prime(i));
    A078898(n) = { my(k,p); if(1==n, n, k = A002110(A055396(n)-1); p = A020639(n); sumdiv(k, d, moebius(d)*(n\(p*d)))); };
    \\ Antti Karttunen, Dec 05 2014
    
  • Scheme
    ;; With memoizing definec-macro.
    (definec (A078898 n) (if (< n 2) n (+ 1 (A078898 (A249744 n)))))
    ;; Much better for computing. Needs also code from A249738 and A249744. - Antti Karttunen, Dec 06 2014
    

Formula

Ordinal transform of A020639 (Lpf). - Franklin T. Adams-Watters, Aug 28 2006
From Antti Karttunen, Dec 05-08 2014: (Start)
a(0) = 0, a(1) = 1, a(n) = 1 + a(A249744(n)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(n / (A020639(n)*d)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(A032742(n) / d).
[Instead of Moebius mu (A008683) one could use Liouville's lambda (A008836) in the above formulas, because all primorials (A002110) are squarefree. A020639(n) gives the smallest prime dividing n, and A055396 gives its index].
a(0) = 0, a(1) = 1, a(2n) = n, a(2n+1) = a(A250470(2n+1)). [After a similar recursive formula for A246277. However, this cannot be used for computing the sequence, unless a definition for A250470(n) is found which doesn't require computing the value of A078898(n).]
For n > 1: a(n) = A249810(n) - A249820(n).
(End)
Other identities:
a(2*n) = n.
For n > 1: a(n)=1 if and only if n is prime.
For n > 1: a(n) = A249808(n, A055396(n)) = A249809(n, A055396(n)).
For n > 1: a(n) = A246277(A249818(n)).
From Antti Karttunen, Jan 04 2015: (Start)
a(n) = 2 if and only if n is a square of a prime.
For all n >= 1: a(A251728(n)) = A243055(A251728(n)) + 2. That is, if n is a semiprime of the form prime(i)*prime(j), prime(i) <= prime(j) < prime(i)^2, then a(n) = (j-i)+2.
(End)
a(A000040(n)^2) = 2; a(A000040(n)*A000040(n+1)) = 3. - Reinhard Zumkeller, Apr 06 2015
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{k>=1} (A038110(k)/A038111(k))^2 = 0.2847976823663... . - Amiram Eldar, Oct 26 2024

Extensions

a(0) = 0 prepended for recurrence's sake by Antti Karttunen, Dec 06 2014

A050216 Number of primes between (prime(n))^2 and (prime(n+1))^2, with a(0) = 2 by convention.

Original entry on oeis.org

2, 2, 5, 6, 15, 9, 22, 11, 27, 47, 16, 57, 44, 20, 46, 80, 78, 32, 90, 66, 30, 106, 75, 114, 163, 89, 42, 87, 42, 100, 354, 99, 165, 49, 299, 58, 182, 186, 128, 198, 195, 76, 356, 77, 144, 75, 463, 479, 168, 82, 166, 270, 90, 438, 275, 274, 292, 91, 292, 199, 99
Offset: 0

Views

Author

Keywords

Comments

The function in Brocard's Conjecture, which states that for n >= 2, a(n) >= 4.
The lines in the graph correspond to prime gaps of 2, 4, 6, ... . - T. D. Noe, Feb 04 2008
Lengths of blocks of consecutive primes in A000430 (union of primes and squares of primes). - Reinhard Zumkeller, Sep 23 2011
In the n-th step of the sieve of Eratosthenes, all multiples of prime(n) are removed. Then a(n) gives the number of new primes obtained after the n-th step. - Jean-Christophe Hervé, Oct 27 2013
More precisely, after the n-th step, one is sure to have eliminated all composites less than prime(n+1)^2, since any composite N has a prime factor <= sqrt(N). It is in exactly this (restricted) sense that a(n) yields the number of "new primes" (additional numbers known to be prime) after the n-th step. But one knows after the n-th step also that all remaining numbers between prime(n+1)^2 and prime(n+1)*(prime(n+1)+2) are prime: By construction they don't have a factor less than prime(n+1) and they don't have a factor prime(n+1) so the least prime factor could be prime(n+2) >= prime(n+1)+2. For example, after eliminating multiples of 3 in the 2nd step, one has (2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 31, 35, ...) and one knows that all remaining numbers strictly in between 5^2=25 and 5*(5+2)=35 are prime, too. - M. F. Hasler, Dec 31 2014
Numerically, the slope of the lowest "ray" m(n) = min {a(k); k>n}, seems to converge to a value somewhere in the range 1.75 < m(n)/n < 1.8; with m(n)/n > 1.7 for n > 900, m(n)/n > 1.75 for n > 2700. - M. F. Hasler, Dec 31 2014
Legendre's conjecture (see A014085) would imply that a(n) >= 2 for all n and that sequences A054272, A250473 and A250474 were thus strictly increasing (see the Wikipedia article about Brocard's conjecture). - Antti Karttunen, Jan 01 2015
a(n) >= 4 up to at least n = 4*10^5. - Eric W. Weisstein, Jan 13 2025

Examples

			There are 2 primes less than 2^2, there are 2 primes between 2^2 and 3^2, 5 primes between 3^2 and 5^2, etc. [corrected by Jonathan Sperry, Aug 30 2013]
		

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 183.

Crossrefs

First differences of A000879.
One more than A251723.
Cf. A380135 (High water marks for number of primes between prime(n)^2 and prime(n+1)^2).
Cf. A380136 (Positions of the high water marks for number of primes between prime(n)^2 and prime(n+1)^2).

Programs

  • Haskell
    import Data.List (group)
    a050216 n = a050216_list !! (n-1)
    a050216_list =
       map length $ filter (/= [0]) $ group $ map a010051 a000430_list
    -- Reinhard Zumkeller, Sep 23 2011
    
  • Maple
    A050216 := proc(n)
        local p,pn ;
        if n = 0 then
            2;
        else
            p := ithprime(n) ;
            pn := nextprime(p) ;
            numtheory[pi](pn^2)-numtheory[pi](p^2) ;
        end if;
    end proc:
    seq(A050216(n),n=0..40) ; # R. J. Mathar, Jan 27 2025
  • Mathematica
    -Subtract @@@ Partition[PrimePi[Prime[Range[20]]^2], 2, 1] (* Eric W. Weisstein, Jan 10 2025 *)
  • PARI
    a(n)={n||return(2);primepi(prime(n+1)^2)-primepi(prime(n)^2)} \\ M. F. Hasler, Dec 31 2014

Formula

For all n >= 1, a(n) = A256468(n) + A256469(n). - Antti Karttunen, Mar 30 2015
Limit_{N->oo} (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} prime(n)) = 1. - Alain Rocchelli, Sep 30 2023

Extensions

Edited by N. J. A. Sloane, Nov 15 2009

A250474 Number of times prime(n) occurs as the least prime factor among numbers 1 .. prime(n)^3: a(n) = A078898(A030078(n)).

Original entry on oeis.org

4, 5, 9, 14, 28, 36, 57, 67, 93, 139, 154, 210, 253, 272, 317, 396, 473, 504, 593, 658, 687, 792, 866, 979, 1141, 1229, 1270, 1356, 1397, 1496, 1849, 1947, 2111, 2159, 2457, 2514, 2695, 2880, 3007, 3204, 3398, 3473, 3828, 3904, 4047, 4121, 4583, 5061, 5228, 5309, 5474, 5743, 5832, 6269, 6543, 6816, 7107, 7197, 7488, 7686, 7784, 8295, 9029, 9248, 9354, 9568, 10351
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2014

Keywords

Comments

Position of the first composite number (which is always 4) on row n of A249821. The fourth column of A249822.
Position of the first nonfixed term on row n of arrays of permutations A251721 and A251722.
According to the definition, this is the number of multiples of prime(n) below prime(n)^3 (and thus, the number of numbers below prime(n)^2) which do not have a smaller factor than prime(n). That is, the numbers remaining below prime(n)^2 after deleting all multiples of primes less than prime(n), as is done by applying the first n-1 steps of the sieve of Eratosthenes (when the first step is elimination of multiples of 2). This explains that the first differences are a(n+1)-a(n) = A050216(n)-1 for n>1, and a(n) = A054272(n)+2. - M. F. Hasler, Dec 31 2014

Examples

			prime(1) = 2 occurs as the least prime factor in range [1,8] for four times (all even numbers <= 8), thus a(1) = 4.
prime(2) = 3 occurs as the least prime factor in range [1,27] for five times (when n is: 3, 9, 15, 21, 27), thus a(2) = 5.
		

Crossrefs

One more than A250473. Two more than A054272.
Column 4 of A249822.
Cf. also A250477 (column 6), A250478 (column 8).

Programs

  • Mathematica
    f[n_] := Count[Range[Prime[n]^3], x_ /; Min[First /@ FactorInteger[x]] == Prime@ n]; Array[f, 16] (* Michael De Vlieger, Mar 30 2015 *)
  • PARI
    A250474(n) = 3 + primepi(prime(n)^2) - n; \\ Fast implementation.
    for(n=1, 5001, write("b250474.txt", n, " ", A250474(n)));
    \\ The following program reflects the given sum formula, but is far from the optimal solution:
    allocatemem(234567890);
    A002110(n) = prod(i=1, n, prime(i));
    A020639(n) = if(1==n,n,vecmin(factor(n)[,1]));
    A055396(n) = if(1==n,0,primepi(A020639(n)));
    A250474(n) = { my(p2 = prime(n)^2); sumdiv(A002110(n-1), d, moebius(d)*(p2\d)); };
    for(n=1, 23, print1(A250474(n),", "));
    
  • Scheme
    (define (A250474 n) (let loop ((k 2)) (if (not (prime? (A249821bi n k))) k (loop (+ k 1))))) ;; This is even slower. Code for A249821bi given in A249821.

Formula

a(n) = 3 + A000879(n) - n = A054272(n) + 2 = A250473(n) + 1.
a(n) = A078898(A030078(n)).
a(1) = 1, a(n) = Sum_{d|A002110(n-1)} moebius(d)*floor(prime(n)^2/d). [Follows when A030078(n), prime(n)^3 is substituted to the similar formula given for A078898(n). Here A002110(n) gives the product of the first n primes. Because the latter is always squarefree, one could use also Liouville's lambda (A008836) instead of Moebius mu (A008683)].
Other identities. For all n >= 1:
A249821(n, a(n)) = 4.

A138511 Semiprimes where the larger prime factor is greater than the square of the smaller prime factor, short: semiprimes p*q, p^2 < q.

Original entry on oeis.org

10, 14, 22, 26, 33, 34, 38, 39, 46, 51, 57, 58, 62, 69, 74, 82, 86, 87, 93, 94, 106, 111, 118, 122, 123, 129, 134, 141, 142, 145, 146, 155, 158, 159, 166, 177, 178, 183, 185, 194, 201, 202, 205, 206, 213, 214, 215, 218, 219, 226, 235, 237, 249, 254, 262, 265, 267, 274, 278, 291, 295, 298, 302, 303, 305
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 21 2008

Keywords

Comments

From Antti Karttunen, Dec 17 2014, further edited Jan 01 & 04 2014: (Start)
Semiprimes p*q, p < q, such that the smallest r for which r^k <= p and q < r^(k+1) [for some k >= 0] is q+1, and thus k = 0. In other words, semiprimes whose both prime factors do not fit (simultaneously) between any two consecutive powers of any natural number r less than or equal to the larger prime factor. This condition forces the larger prime factor q to be greater than the square of the smaller prime factor because otherwise the opposite condition given in A251728 would hold.
Assuming that A054272(n), the number of primes in interval [prime(n), prime(n)^2], is nondecreasing (implied for example if Legendre's or Brocard's conjecture is true), these are also "unsettled" semiprimes that occur in a square array A083221 constructed from the sieve of Eratosthenes, "above the line A251719", meaning that if and only if row < A251719(col) then a semiprime occurring at A083221(row, col) is in this sequence, and conversely, all the semiprimes that occur at any position A083221(row, col) where row >= A251719(col) are in the complementary sequence A251728.
(End)
Semiprimes p*q, p < q, such that b = q+1 is the minimal base with the property that p and q have equal length representations in base b. This was the original definition, which is based primarily on A138510: A138510(A174956(a(n))) = A084127(A174956(a(n))) + 1.

Examples

			See A138510.
		

Crossrefs

Cf. A138510.
Complement of A251728 in A001358.
Subsequence of A088381.
An intersection of A001358 (semiprimes) and A251727.
Also an intersection of A001358 and A253569, from the latter which this sequence differs for the first time at n=60, where A253569(60) = 290, while here a(60) = 291.
Also an intersection A001358 and A245729.

Programs

Formula

Other identities. For all n >= 1 it holds that:
A138510(A174956(a(n))) = A084127(A174956(a(n))) + 1.

Extensions

Wrong comment corrected by Reinhard Zumkeller, Dec 16 2014
New definition by Antti Karttunen, Jan 01 2015; old definition moved to comment.
More terms from Antti Karttunen, Jan 09 2015

A251728 Semiprimes p*q for which p <= q < p^2.

Original entry on oeis.org

4, 6, 9, 15, 21, 25, 35, 49, 55, 65, 77, 85, 91, 95, 115, 119, 121, 133, 143, 161, 169, 187, 203, 209, 217, 221, 247, 253, 259, 287, 289, 299, 301, 319, 323, 329, 341, 361, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 529, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2014

Keywords

Comments

Semiprimes p*q for which there exists r <= q such that r^k <= p <= q < r^(k+1), for some k >= 1, i.e., semiprimes whose both prime factors fit inside a semiopen range of two consecutive powers of some natural number r which itself is not greater than the larger prime factor. If such r exists, then it must be <= p (the smaller prime factor of n), which forces q to be less than p^2. On the other hand, when p <= q < p^2, then setting r = p and k = 1 satisfies the equation r^k <= p <= q < r^(k+1).
Assuming that A054272(n), the number of primes in interval [p(n), p(n)^2], is nondecreasing (implied for example if Legendre's or Brocard's conjecture is true), it follows that for any a(n), A003961(a(n)) is also in sequence. In other words, whenever prime(i)*prime(j) is in the sequence, then so is also prime(i+1)*prime(j+1).
From above would follow also that these are all the "settled semiprimes" that occur in a square array A083221 constructed from the sieve of Eratosthenes, from the level A251719 downward. Furthermore, this sequence would then be an infinite disjoint union of sequences of A003961-iterates starting from the initial values given in A251724.
See also the comments in the complementary sequence of semiprimes, A138511.
Composite numbers n with all prime factors greater than the cube root of n. - Doug Bell, Oct 27 2015
If "p <= q" in the definition were changed to "p < q" then the squares of primes (A001248) would be removed, yielding A138109. - Jon E. Schoenfield, Dec 27 2022

Crossrefs

An intersection of A251726 and A001358 (semiprimes).
Complement of A138511 in A001358.
A251724 after the initial 2 is a subsequence.

Programs

  • Haskell
    a251728 n = a251728_list !! (n-1)
    a251728_list = filter f [1..] where
                          f x = q < p ^ 2 && a010051' q == 1
                                where q = div x p; p = a020639 x
    -- Reinhard Zumkeller, Jan 06 2015
    
  • Mathematica
    fQ[n_] := Block[{pf = FactorInteger@ n, p, q}, p = pf[[1, 1]]; q = pf[[-1, 1]]; And[p <= q < p^2, PrimeOmega@ n == 2]]; Select[Range@ 720, fQ] (* Michael De Vlieger, Oct 27 2015 *)
  • PARI
    lista(nn) = forcomposite(n=1, nn, my(f = factor(n));if (#select(x->(x > n^(1/3)), f[,1]) == #f~, print1(n, ", "))); \\ Michel Marcus, Oct 27 2015
    
  • PARI
    list(lim)=my(v=List()); forprime(q=2,sqrtnint((lim\1)^2,3), forprime(p=sqrtint(q)+1,min(q,lim\q), listput(v,p*q))); Set(v) \\ Charles R Greathouse IV, Oct 27 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A251728(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(min(x//p,p**2)) for p in primerange(s+1)))
        return bisection(f,n,n) # Chai Wah Wu, Mar 05 2025

Formula

For all n >= 1, A078898(a(n)) = A243055(a(n)) + 2.
Limit_{n->oo} n*log(a(n))/a(n) = log(2). - Alain Rocchelli, Nov 10 2022

A250473 Length of the maximal prefix of noncomposite numbers on row n of A249821.

Original entry on oeis.org

3, 4, 8, 13, 27, 35, 56, 66, 92, 138, 153, 209, 252, 271, 316, 395, 472, 503, 592, 657, 686, 791, 865, 978, 1140, 1228, 1269, 1355, 1396, 1495, 1848, 1946, 2110, 2158, 2456, 2513, 2694, 2879, 3006, 3203, 3397, 3472, 3827, 3903, 4046, 4120, 4582, 5060, 5227, 5308, 5473, 5742, 5831, 6268, 6542, 6815, 7106, 7196, 7487, 7685, 7783, 8294, 9028, 9247, 9353, 9567, 10350
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2014

Keywords

Comments

a(n) = Length of the initial fixed portion of the permutation at row n of A251721 & A251722.
Also, for n > 1, the length of the maximal increasing prefix on row n of A249821.

Crossrefs

One more than A054272.
One less than A250474.

Formula

a(n) = A054272(n) + 1.
a(n) = A250474(n) - 1.
a(n) = 2 + A000879(n) - n.

A251724 a(1) = 2, and for n>1: a(n) = prime(A251719(n)) * prime(A251719(n) + n - 2), where prime(n) gives the n-th prime.

Original entry on oeis.org

2, 4, 6, 21, 65, 85, 95, 115, 217, 259, 287, 301, 329, 649, 671, 737, 781, 803, 869, 913, 979, 1067, 1111, 1133, 1177, 1199, 1243, 1703, 1781, 1807, 1937, 1963, 2041, 2119, 2171, 3043, 3077, 3247, 3281, 3349, 3383, 3587, 3791, 3859, 3893, 3961, 4063, 4097, 4267, 4369, 4471, 4573, 4607, 4709, 4777, 4811, 5833, 5909, 5947, 6023, 6289, 6403, 6593, 6631, 6707, 6821, 8579
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2014

Keywords

Comments

For n >= 2: a(n) = the first "settled semiprime" in the column n of the sieve of Eratosthenes: a(n) = A083221(A251719(n), n).
The "settling of semiprimes" here means that from that semiprime onward, all the other terms in the same column n of a square array A083221 (which is constructed from the sieve of Eratosthenes) are also semiprimes, obtained by successive iterations of A003961 starting from the semiprime here given as a(n). Cf. comments in A251728 which contains all such semiprimes. The "unsettled" semiprimes are in its complement A138511.
Here we assume that A054272(n), the number of primes in interval [prime(n), prime(n)^2], is nondecreasing (implied for example if Legendre's or Brocard's conjecture is true).

Crossrefs

After initial 2, a subsequence of A251728 and A001358.

Formula

a(1) = 2; and for n >= 2: a(n) = A000040(A251719(n)) * A000040(A251719(n) + n - 2).
a(n) = A083221(A251719(n), n).
Other identities implied by the definition. For all n >= 1:
A078898(a(n)) = n.
A055396(a(n)) = A251719(n).
For all n >= 2:
A243055(a(n)) = n-2.

A066883 Number of primes in the interval [p(n), p(n)^2] minus p(n), where p(n) is the n-th prime.

Original entry on oeis.org

0, 0, 2, 5, 15, 21, 38, 46, 68, 108, 121, 171, 210, 227, 268, 341, 412, 441, 524, 585, 612, 711, 781, 888, 1042, 1126, 1165, 1247, 1286, 1381, 1720, 1814, 1972, 2018, 2306, 2361, 2536, 2715, 2838, 3029, 3217, 3290, 3635, 3709, 3848, 3920, 4370, 4836
Offset: 1

Views

Author

Enoch Haga, Jan 26 2002

Keywords

Comments

Haga's conjecture (see link below) is that if the integers from 1 to p^2 (p prime) are put in a p by p square in standard order, then there's a transversal consisting of primes; i.e., a set of p primes containing exactly one number in each row and column. E.g., for p=5 the primes 5, 7, 11, 19, 23 work. Since p is needed for the p-th column, primes less than p can't be used. a(n) is the number of primes available minus the number needed for the transversal.

References

  • Paulo Ribenboim, The New Book of Prime Number Records, 3rd ed., 1995, Springer, pp. 397-398

Crossrefs

Programs

  • BASIC
    20 for Y=1 to 140 30 A=nxtprm(A):B=A^2 40 for X=A to B 50 if X=prmdiv(X) then C=C+1 60 next X 70 print A; C; C-A; "-"; 80 C=0 90 next Y
    
  • Mathematica
    a[n_] := PrimePi[(p=Prime[n])^2]-PrimePi[p-1]-p
  • PARI
    { for (n=1, 1000, a=primepi((p=prime(n))^2) - primepi(p - 1) - p; write("b066883.txt", n, " ", a) ) } \\ Harry J. Smith, Apr 04 2010

Formula

a(n) = A054272(n)-A000040(n).

Extensions

Edited by Dean Hickerson, Jun 08 2002
Showing 1-10 of 15 results. Next