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 19 results. Next

A089609 Prime number of primes between squares of consecutive primes; or, primes occurring in A050216.

Original entry on oeis.org

2, 5, 11, 47, 163, 89, 463, 479, 199, 107, 241, 151, 709, 151, 599, 313, 547, 211, 613, 859, 863, 241, 1217, 1091, 827, 311, 967, 1327, 691, 1109, 1123, 829, 389, 821, 857, 431, 1301, 433, 1451, 1933, 3449, 5701, 1753, 4663, 563, 3557, 4253, 1867, 4447
Offset: 0

Views

Author

Cino Hilliard, Dec 30 2003

Keywords

Comments

For small values of n, these numbers exhibit higher and lower values as n increases. Conjecture: There exists an n such that seq(n1) is < seq(n1+1) for all n1 >= n.

Crossrefs

Programs

  • Mathematica
    Select[PrimePi[#[[2]]]-PrimePi[#[[1]]]&/@Partition[Prime[Range[500]]^2,2,1],PrimeQ] (* Harvey P. Dale, May 15 2022 *)
  • PARI
    \ prime number of primes between squares. pbetweensq(n) = { for(x=1,n, c=0; for(y=prime(x)^2, prime((x+1))^2, if(isprime(y),c++) ); if(isprime(c),print1(c",")) ) }

Extensions

Edited by Ray Chandler, Jan 05 2004

A000430 Primes and squares of primes.

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Also numbers n such that the product of proper divisors is < n.
See A050216 for lengths of blocks of consecutive primes. - Reinhard Zumkeller, Sep 23 2011
Numbers q > 1 such that d(q) < 4. Numbers k such that the number of ways of writing k = m + t is equal to the number of ways of writing k = r*s, where m|t and r|s. - Juri-Stepan Gerasimov, Oct 14 2017
Called multiplicatively deficient numbers by Chau (2004). - Amiram Eldar, Jun 29 2022

References

  • F. Smarandache, Definitions solved and unsolved problems, conjectures and theorems in number theory and geometry, edited by M. Perez, Xiquan Publishing House 2000
  • F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.

Crossrefs

Programs

  • Haskell
    a000430 n = a000430_list !! (n-1)
    a000430_list = m a000040_list a001248_list where
       m (x:xs) (y:ys) | x < y = x : m xs (y:ys)
                       | x > y = y : m (x:xs) ys
    -- Reinhard Zumkeller, Sep 23 2011
    
  • Mathematica
    nn = 223; t = Union[Prime[Range[PrimePi[nn]]], Prime[Range[PrimePi[Sqrt[nn]]]]^2] (* T. D. Noe, Apr 11 2011 *)
    Module[{upto=250,prs},prs=Prime[Range[PrimePi[upto]]];Select[Join[ prs,prs^2], #<=upto&]]//Sort (* Harvey P. Dale, Oct 08 2016 *)
  • PARI
    is(n)=isprime(n) || (issquare(n,&n) && isprime(n)) \\ Charles R Greathouse IV, Sep 04 2013
    
  • Python
    from math import isqrt
    from sympy import primepi
    def A000430(n):
        def f(x): return n+x-primepi(x)-primepi(isqrt(x))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return int(m) # Chai Wah Wu, Aug 09 2024

Formula

A084114(a(n)) = 0, see also A084110. - Reinhard Zumkeller, May 12 2003
A109810(a(n)) = 2. - Reinhard Zumkeller, May 24 2010
A010051(a(n)) + A010055(a(n))*A064911(a(n)) = 1;
A056595(a(n)) = 1. - Reinhard Zumkeller, Aug 15 2011
A032741(a(n)) = A046951(a(n)); A293575(a(n)) = 0. - Juri-Stepan Gerasimov, Oct 14 2017
The number of terms not exceeding x is N(x) ~ (x + 2*sqrt(x))/log(x) (Chau, 2004). - Amiram Eldar, Jun 29 2022

A000879 Number of primes < prime(n)^2.

Original entry on oeis.org

2, 4, 9, 15, 30, 39, 61, 72, 99, 146, 162, 219, 263, 283, 329, 409, 487, 519, 609, 675, 705, 811, 886, 1000, 1163, 1252, 1294, 1381, 1423, 1523, 1877, 1976, 2141, 2190, 2489, 2547, 2729, 2915, 3043, 3241, 3436, 3512, 3868, 3945, 4089, 4164, 4627, 5106
Offset: 1

Views

Author

gandalf(AT)hrn.office.ssi.net (James D. Ausfahl)

Keywords

Comments

a(n) is the least index i such that A052180(i) = prime(n). - Labos Elemer, May 14 2003
Number of primes determined at the n-th step of the sieve of Eratosthenes. - Jean-Christophe Hervé, Oct 21 2013
There are only 3 squares in the current data: 4, 9, 7745089. - Michel Marcus, Apr 07 2018
There are no other squares up to a(780000). - Giovanni Resta, Apr 09 2018

Crossrefs

Cf. A050216 (first differences), A089609, A052180, A000720, A001248, A000885, A054270 (primes of rank a(n)).

Programs

  • Mathematica
    PrimePi[Prime[Range[50]]^2] (* Harvey P. Dale, Jan 16 2013 *)
  • PARI
    a(n) = primepi(prime(n)^2); \\ Michel Marcus, Oct 28 2013

Formula

a(n) = A000720(A001248(n)). - Michel Marcus, Apr 07 2018

Extensions

Edited by Ralf Stephan, Aug 24 2004

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.

A256470 a(n) = A256469(n) - A256468(n).

Original entry on oeis.org

0, 1, 2, 3, 1, 6, 1, 3, 3, 0, 3, 2, -2, 0, 4, 6, 0, 4, 4, 0, 2, 3, 10, 13, -1, -2, 3, 4, 4, 34, 5, 3, 5, 17, 6, 2, 8, -2, -6, 3, -4, -4, -3, -2, -1, 9, 25, -2, -6, -4, 12, 4, 6, 9, -6, 18, 1, -2, -11, 7, -8, 27, -10, 3, -1, 12, 11, 13, -3, 5, 3, 5, -13, -8, 10, 16, -4, 14, 3, 12, -3, 23, 5, 4, 6, -8, 19, -13, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Mar 30 2015

Keywords

Comments

a(n) = Difference between the number of primes occurring in range [prime(n)*prime(n+1), prime(n+1)^2] and the number of primes occurring in range [prime(n)^2, prime(n)*prime(n+1)].
In other words, a(n) tells how many more primes there are in the latter part of the range prime(n)^2 .. prime(n+1)^2 (after the geometric mean of its limits), than in its first part (before the geometric mean of its limits).

Crossrefs

Positions of zeros: A256471. Cf. also A256472, A256473.
Positions of nonnegative terms: A256474, negative terms: A256475.
Positions of strictly positive terms: A256476, terms less than or equal to zero: A256477.

Programs

Formula

a(n) = A256469(n) - A256468(n).
a(n) = 3 - A256449(n).

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.]

A256448 a(n) = A250474(n+1) - A250477(n).

Original entry on oeis.org

-1, 1, 2, 7, 3, 12, 4, 13, 23, 6, 28, 21, 7, 21, 40, 40, 14, 45, 33, 13, 52, 37, 60, 86, 42, 18, 43, 21, 50, 192, 50, 82, 25, 156, 30, 90, 95, 61, 94, 97, 34, 174, 35, 69, 35, 234, 250, 81, 36, 79, 139, 45, 220, 140, 132, 153, 44, 143, 92, 51, 250, 379, 103, 53, 105, 396, 174, 294, 59, 121, 181, 245, 182, 184, 129, 203, 261, 136, 265, 339, 72
Offset: 1

Views

Author

Antti Karttunen, Mar 29 2015

Keywords

Comments

a(n) tells how many more positive integers there are <= prime(n+1)^2 whose smallest prime factor is at least prime(n+1), as compared to how many positive integers there are <= (prime(n) * prime(n+1)) whose smallest prime factor is at least prime(n).
Conjecture 1: for n >= 2, a(n) > 0.
Conjecture 2: ratio a(n)/A256447 converges towards 1. See the associated plots in A256447 and A256449 and comments in A050216.
As what comes to the second conjecture, it's not necessarily true. See the plots linked into A256468. - Antti Karttunen, Mar 30 2015

Examples

			For n=1, the respective primes are prime(1) = 2 and prime(2) = 3, and the ranges in question are [1, 9] and [1, 6]. The former range contains 4 such numbers whose lpf (A020639) is at least 3, namely {3, 5, 7, 9}, while the latter range contains 5 such numbers whose lpf is at least 2, namely {2, 3, 4, 5, 6}, thus a(1) = 4 - 5 = -1.
For n=2, the respective primes are prime(2) = 3 and prime(3) = 5, and the ranges in question are [1, 25] and [1, 15]. The former range contains 8 such numbers whose lpf is at least 5, namely {5, 7, 11, 13, 17, 19, 23, 25}, while the latter range contains 7 such numbers whose lpf is at least 3, namely {3, 5, 7, 9, 11, 13, 15}, thus a(2) = 8 - 7 = 1.
For n=3, the respective primes are prime(3) = 5 and prime(4) = 7, and the ranges in question are [1, 49] and [1, 35]. The former range contains 13 such numbers whose lpf is at least 7, namely {7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49}, while the latter range contains 11 such numbers whose lpf is at least 5, namely {5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35}, thus a(3) = 13 - 11 = 2.
		

Crossrefs

Programs

Formula

a(n) = A256469(n) - 2.
a(n) = A250474(n+1) - A250477(n).
a(n) = A251723(n) - A256447(n).
a(n) = A256446(n) - A256447(n+1).
a(n) = A256447(n) - A256449(n).

A256468 Number of primes between prime(n)^2 and prime(n)*prime(n+1).

Original entry on oeis.org

1, 2, 2, 6, 4, 8, 5, 12, 22, 8, 27, 21, 11, 23, 38, 36, 16, 43, 31, 15, 52, 36, 52, 75, 45, 22, 42, 19, 48, 160, 47, 81, 22, 141, 26, 90, 89, 65, 102, 96, 40, 180, 40, 73, 38, 227, 227, 85, 44, 85, 129, 43, 216, 133, 140, 137, 45, 147, 105, 46, 260, 354, 115, 52, 108, 386, 165, 283, 64
Offset: 1

Views

Author

Antti Karttunen, Mar 30 2015

Keywords

Crossrefs

One less than A256447.

Programs

  • Mathematica
    Table[Abs@ Subtract[PrimePi[Prime[n]^2], PrimePi[Prime[n] Prime[n + 1]]], {n, 69}] (* Michael De Vlieger, Mar 30 2015 *)
    PrimePi[Times@@#]-PrimePi[#[[1]]^2]&/@Partition[Prime[Range[70]],2,1] (* Harvey P. Dale, Mar 31 2025 *)
  • PARI
    allocatemem(234567890);
    default(primelimit,4294965247);
    A256468(n) = (primepi(prime(n)*prime(n+1)) - primepi(prime(n)^2));
    for(n=1, 6542, write("b256468.txt", n, " ", A256468(n)));
    
  • Scheme
    (define (A256468 n) (let* ((p (A000040 n)) (p2 (* p p))) (let loop ((s 0) (k (* p (A000040 (+ 1 n))))) (cond ((= k p2) s) (else (loop (+ s (if (prime? k) 1 0)) (- k 1)))))))

Formula

a(n) = A256447(n)-1.
a(n) = A050216(n) - A256469(n).
a(n) = A256469(n) - A256470(n).

A256469 Number of primes between prime(n)*prime(n+1) and prime(n+1)^2.

Original entry on oeis.org

1, 3, 4, 9, 5, 14, 6, 15, 25, 8, 30, 23, 9, 23, 42, 42, 16, 47, 35, 15, 54, 39, 62, 88, 44, 20, 45, 23, 52, 194, 52, 84, 27, 158, 32, 92, 97, 63, 96, 99, 36, 176, 37, 71, 37, 236, 252, 83, 38, 81, 141, 47, 222, 142, 134, 155, 46, 145, 94, 53, 252, 381, 105, 55, 107, 398, 176, 296, 61
Offset: 1

Views

Author

Antti Karttunen, Mar 30 2015

Keywords

Examples

			For n=1, there is only one prime in range prime(1)*prime(2) .. prime(2)^2, [6 .. 9], namely 7, thus a(1) = 1.
For n=2, the primes in range prime(2)*prime(3) .. prime(3)^2, [15 .. 25] are {17, 19, 23}, thus a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[Range[Prime[n] Prime[n + 1], Prime[n + 1]^2], ?PrimeQ], {n, 69}] (* _Michael De Vlieger, Mar 30 2015 *)
    Table[PrimePi[Prime[n+1]^2]-PrimePi[Prime[n]Prime[n+1]],{n,70}] (* Harvey P. Dale, Jul 31 2021 *)
  • PARI
    allocatemem(234567890);
    default(primelimit,4294965247);
    A256469(n) = (primepi(prime(n+1)^2) - primepi(prime(n)*prime(n+1)));
    for(n=1, 6541, write("b256469.txt", n, " ", A256469(n)));
    
  • Scheme
    (define (A256469 n) (let* ((p (A000040 n)) (q (A000040 (+ 1 n))) (q2 (* q q))) (let loop ((s 0) (k (* p q))) (cond ((= k q2) s) (else (loop (+ s (if (prime? k) 1 0)) (+ k 1)))))))

Formula

a(n) = A256448(n)+2.
a(n) = A050216(n) - A256468(n).
a(n) = A256468(n) + A256470(n).

A079047 Number of primes between prime(n) and prime(n)^2.

Original entry on oeis.org

1, 2, 6, 11, 25, 33, 54, 64, 90, 136, 151, 207, 250, 269, 314, 393, 470, 501, 590, 655, 684, 789, 863, 976, 1138, 1226, 1267, 1353, 1394, 1493, 1846, 1944, 2108, 2156, 2454, 2511, 2692, 2877, 3004, 3201, 3395, 3470, 3825, 3901, 4044, 4118, 4580, 5058, 5225
Offset: 1

Views

Author

Jose R. Brox (tautocrona(AT)terra.es), Feb 01 2003

Keywords

Comments

I conjecture that 25 and 64 are the only terms that are also square numbers.
The next squares are 564001 and 774400, which occur at positions 419 and 481. There are no other squares in the first 10000 terms. - T. D. Noe, Sep 11 2013

Examples

			a(1)=1 because between prime(1)=2 and 2^2=4 there's one prime (3). a(3)=6 because between prime(3)=5 and 5^2=25 there are 6 primes (7, 11, 13, 17, 19, 23).
		

Crossrefs

Programs

  • Magma
    [#PrimesInInterval(NthPrime(n), NthPrime(n)^2)-1: n in [1..70]]; // Vincenzo Librandi, Jul 23 2019
  • Mathematica
    Table[p = Prime[n]; PrimePi[p^2] - n, {n, 100}] (* T. D. Noe, Sep 11 2013 *)
  • PARI
    forprime(p=2,500,res=0; forprime(q=p+1,p^2,res=res+1); print1(res","))
    

Extensions

Data corrected by T. D. Noe, Oct 25 2006
Edited (removing comment & correction about irrelevant property) by Peter Munn, Jan 24 2023
Showing 1-10 of 19 results. Next