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.

Previous Showing 11-19 of 19 results.

A368460 a(n) = card(k: prime(n)^2 <= k < prime(n + 1)^2 and k term of A368458).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 3, 2, 5, 3, 3, 4, 5, 4, 3, 9, 5, 4, 7, 5, 6, 14, 6, 4, 7, 3, 5, 22, 6, 6, 4, 16, 5, 12, 12, 8, 15, 13, 5, 19, 5, 10, 4, 30, 26, 10, 6, 12, 11, 5, 28, 19, 15, 20, 8, 19, 9, 7, 22
Offset: 1

Views

Author

Peter Luschny, Dec 26 2023

Keywords

Comments

If A368458 is written as an irregular triangle for n >= 3, then a(n) is the length of row n.
Conjecture: For all n >= 5, there is at least one j such that b(j) = 2 * (Bacher(j) - sigma(j)) + j + 1 is > 0 and prime(n)^2 < b(j) < prime(n + 1)^2. In other words, a(n) > 1 for n >= 5.

Examples

			a(11) = 5 because 31^2 = 961, 1073, 1147, 1271, 1333, 1369 = 37^2 and all the terms are in that order in A368458.
		

Crossrefs

Cf. A000203, A001248, A050216 (Brocard's Conjecture), A368207 (Bacher), A368457, A368458.

Programs

  • SageMath
    # using A368207
    def A368460(n):
        pn = nth_prime(n); pn1 = nth_prime(n + 1)
        A368457 = lambda n: 2 * (A368207(n) - sigma(n)) + n + 1
        return sum(1 for n in range(pn ** 2, pn1 ** 2) if A368457(n) > 0)
    print([A368460(n) for n in range(1, 25)])

A380136 Positions of high water marks for the numbers of primes between prime(n)^2 and prime(n+1)^2.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 11, 15, 18, 21, 23, 24, 30, 42, 46, 47, 61, 62, 66, 91, 97, 99, 137, 146, 150, 154, 180, 189, 217, 327, 367, 429, 462, 574, 590, 650, 708, 738, 842, 890, 928, 985, 1006, 1051, 1059, 1183, 1409, 1457, 1532, 1663, 1831, 2191, 2225, 2810
Offset: 1

Views

Author

Eric W. Weisstein, Jan 13 2025

Keywords

Crossrefs

Cf. A380135 (High water marks for the numbers).
Cf. A050216 (Number of primes between (prime(n))^2 and (prime(n+1))^2).

Programs

  • Maple
    A050216 := proc(n)
        option remember ;
        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:
    A380136 := proc(n)
        option remember ;
        if n = 1 then
            1;
        else
            for a from  procname(n-1)+1 do
                if A050216(a) > A050216(procname(n-1)) then
                    return a ;
                end if;
            end do:
        end if;
    end proc:
    seq(A380136(n),n=1..30) ; # R. J. Mathar, Jan 27 2025

A217019 First differences of A128301.

Original entry on oeis.org

2, 6, 8, 23, 16, 34, 24, 50, 89, 36, 115, 80, 49, 101, 149, 190, 58, 202, 140, 79, 231, 159, 270, 371, 193, 103, 216, 113, 212, 804, 260, 391, 151, 667, 148, 431, 472, 318, 486, 507, 153, 870, 169, 365, 185, 1145, 1214, 405, 207, 434, 614, 218, 1135, 703, 721
Offset: 1

Views

Author

Zak Seidov, Sep 24 2012

Keywords

Comments

The sequence is of chaotic behavior and unbound. Exactly as in A050216 (see comment by T. D. Noe over there), the lines in the graph correspond to prime gaps of 2, 4, 6,...

Crossrefs

Cf. A001248 (primes squared), A001358 (semiprimes).

Formula

a(n) = A165144(n) + 1. - Flávio V. Fernandes, Nov 19 2020

A230774 Number of primes less than first prime above square root of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 01 2013

Keywords

Comments

Or repeat k (prime(k)^2 - prime(k-1)^2) times, with prime(0) set to 0 for k = 1.
This sequence is useful to compute A055399 for prime numbers.

Examples

			a(5) = a(6) = a(7) = a(8) = a(9) = 2 because prime(1) = 2 < sqrt(5 to 9) <= prime(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[1 + PrimePi[Sqrt[n-1]], {n, 100}] (* Alonso del Arte, Nov 01 2013 *)
  • Python
    from math import isqrt
    from sympy import primepi
    def A230774(n): return primepi(isqrt(n-1))+1 # Chai Wah Wu, Nov 04 2024

Formula

Repeat 1 prime(1)^2 = 4 times; for k>1, repeat k (prime(k)^2-prime(k-1)^2) = A050216(k-1) times.
a(n) - A056811(n) = characteristic function of squares of primes.

A230775 Smallest prime number greater than or equal to the square root of n.

Original entry on oeis.org

2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 01 2013

Keywords

Comments

Or repeat prime(k) (prime(k)^2-prime(k-1)^2) times, with prime(0) set to 0 for k=1.

Examples

			a(5)=a(6)=a(7)=a(8)=a(9)=3 because prime(1)= 2 < sqrt(5 to 9) <= prime(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    spn[n_]:=Module[{s=Sqrt[n]},If[PrimeQ[s],s,NextPrime[s]]]; Array[spn,90] (* Harvey P. Dale, Feb 10 2019 *)
  • Python
    from math import isqrt
    from sympy import nextprime
    def A230775(n): return nextprime(isqrt(n-1)) # Chai Wah Wu, Nov 04 2024

Formula

a(n) = A000040(A230774(n)).
Repeat prime(1) prime(1)^2 times; for k>1, repeat A000040(k) A050216(k-1) times (that is, repeat prime(k) (prime(k)^2 - prime(k-1)^2) times).

A380135 High water marks for number of primes between prime(n)^2 and prime(n+1)^2.

Original entry on oeis.org

2, 5, 6, 15, 22, 27, 47, 57, 80, 90, 106, 114, 163, 354, 356, 463, 479, 512, 735, 784, 934, 995, 1513, 1652, 1772, 1808, 2648, 2821, 3551, 6357, 6815, 8280, 10424, 11328, 12113, 15399, 17121, 18692, 20769, 22358, 23404, 24561, 26123, 26764, 27871, 31916, 37558
Offset: 1

Views

Author

Eric W. Weisstein, Jan 13 2025

Keywords

Crossrefs

Cf. A380136 (Positions of high water marks for the numbers of primes between prime(n)^2 and prime(n+1)^2).
Cf. A050216 (Number of primes between (prime(n))^2 and (prime(n+1))^2).

A175037 Sum of primes between successive squares of primes.

Original entry on oeis.org

12, 83, 228, 1265, 1321, 5068, 3617, 11993, 32245, 14404, 65873, 67182, 35224, 93088, 201244, 245920, 115246, 369144, 315080, 155560, 612264, 492069, 844778, 1414099, 871855, 436812, 959459, 490218, 1232476, 5122720, 1649231, 2961709
Offset: 1

Views

Author

Zak Seidov, Nov 12 2009

Keywords

Examples

			a(1)=12 because between (prime(1))^2=2^2=4 and (prime(2))^2=3^2=9 there are 2 primes {5,7} which sum to 12
a(2)=83 because between (prime(2))^2=9 and (prime(3))^2=25 there are 5 primes {11,13,17,19,23} which sum to 83
a(3)=228 because between 5^2=25 and 7^2=49 there are 6 primes {29,31,37,41,43,47} which sum to 228
a(4)=1265 because between 49 and 121 there are 15 primes {53..113} which sum to 1265
a(5)=1321 because between 121 and 169 there are 9 primes {127..167} which sum to 1321.
		

Crossrefs

Cf. A050216 (number of primes between (prime(n))^2 and (prime(n+1))^2).

Programs

  • Mathematica
    Table[Total[Select[Range[Prime[n]^2,Prime[n+1]^2],PrimeQ]],{n,60}]
    Total[Select[Range[#[[1]],#[[2]]],PrimeQ]]&/@ Partition[Prime[ Range[ 40]]^2,2,1] (* Harvey P. Dale, Jul 13 2015 *)

Formula

a(n) = sum of primes between (prime(n))^2 and (prime(n+1))^2.

A365767 a(n) is the number of primes between (prime(n))^3 and (prime(n+1))^3.

Original entry on oeis.org

5, 21, 38, 149, 110, 329, 226, 575, 1250, 521, 1966, 1656, 939, 2127, 3830, 4665, 1768, 5883, 4535, 2387, 8007, 5968, 9965, 15293, 8508, 4457, 9513, 4974, 10458, 42153, 13671, 21959, 7750, 41767, 9007, 28180, 30226, 21322, 33813, 35899, 12506, 66241, 14003, 28809, 14848, 94735
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Sep 18 2023

Keywords

Examples

			a(2) = 21 because there are 21 primes between prime(2)^3 = 27 and prime(3)^3 = 125.
		

Crossrefs

First differences of A086688.

Programs

  • Maple
    A:= [seq(numtheory:-pi(ithprime(i)^3),i=1..30)]:
    A[2..-1] - A[1..-2];

Formula

a(n) = A038098(A000040(n+1)) - A038098(A000040(n)).

A370796 Number of primes between (prime(n)+1)^2 and (prime(n+1)-1)^2.

Original entry on oeis.org

2, 0, 0, 7, 0, 10, 0, 14, 32, 0, 38, 23, 0, 24, 51, 53, 0, 62, 30, 0, 71, 33, 76, 124, 44, 0, 42, 0, 51, 301, 48, 114, 0, 233, 0, 122, 126, 59, 135, 133, 0, 283, 0, 66, 0, 386, 396, 77, 0, 86, 173, 0, 349, 177, 187, 198, 0, 199, 100, 0, 412, 636, 113, 0, 114, 668, 224, 463, 0, 119, 236, 359
Offset: 1

Views

Author

Rafik Khalfi, Mar 02 2024

Keywords

Comments

If (prime(n),prime(n+1)) is a twin prime pair, then a(n)=0.

Examples

			For n=1, (prime(1+1)-1)^2 = 4, (prime(1)+1)^2 = 9 and we have two primes between 4 and 9, so a(1)=2.
		

Crossrefs

Cf. A050216.

Programs

  • Maple
    A370796:= proc (n)
    local count, a, b, p:
    count := 0:
    a := (ithprime(n)+1)^2:
    b := (ithprime(n+1)-1)^2:
    p := n:
    while ithprime(p) <= b do if a <= ithprime(p) then count := count+1 end if:
    p := p+1 end do:
    return count end proc:
    A370796(1) := 2:
    map(A370796, [$1 .. 100]);
  • Mathematica
    Table[Abs[ PrimePi[(Prime[n+1]-1)^2]- PrimePi[(Prime[n]+1)^2]],{n,72}] (* James C. McMahon, Mar 02 2024 *)
  • Python
    from sympy import primepi, prime, nextprime
    def A370796(n): return -primepi(((p:=prime(n))+1)**2)+primepi((nextprime(p)-1)**2) if n>1 else 2 # Chai Wah Wu, Mar 27 2024

Formula

a(n) = A038107(A000040(n+1)-1) - A038107(A000040(n)+1) for all n > 1;
a(n) = A038107(A000040(n)+1) - A038107(A000040(n+1)-1) for n=1.
Previous Showing 11-19 of 19 results.