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 71-80 of 114 results. Next

A076956 Smallest k^2 such that there are exactly n primes between k^2 and (k+1)^2.

Original entry on oeis.org

1, 16, 36, 100, 225, 256, 625, 576, 961, 1521, 1444, 2025, 4096, 2304, 2704, 3249, 5625, 6724, 6561, 4900, 5776, 6241, 11236, 12544, 21025, 12321, 14641, 13689, 15129, 17956, 20736, 19321, 21316, 23716, 26569, 36864, 28561, 30976, 32041
Offset: 2

Views

Author

Amarnath Murthy, Oct 20 2002

Keywords

Crossrefs

Formula

a(n) = A076957(n)^2. - David W. Wilson, Jan 08 2017

Extensions

More terms from Sascha Kurz, Jan 22 2003
Name edited by David W. Wilson, Jan 08 2017

A078763 List primes between (2n-1)^2 and (2n)^2.

Original entry on oeis.org

2, 3, 11, 13, 29, 31, 53, 59, 61, 83, 89, 97, 127, 131, 137, 139, 173, 179, 181, 191, 193, 227, 229, 233, 239, 241, 251, 293, 307, 311, 313, 317, 367, 373, 379, 383, 389, 397, 443, 449, 457, 461, 463, 467, 479, 541, 547, 557, 563, 569, 571, 631, 641, 643, 647
Offset: 1

Views

Author

Donald S. McDonald, Jan 09 2003

Keywords

Comments

Primes are on adjacent sides of the Ulam square prime-spiral.

Examples

			The 2 primes between 3^2=9 (odd) and 4^2=16 (even) are just a(3)=11 and a(4)=13.
		

Crossrefs

Programs

  • Maple
    2,seq(op(select(isprime, [seq(i,i=(2*n-1)^2..(2*n)^2,2)])),n=1..20); # Robert Israel, Oct 28 2020
  • Mathematica
    f[n_] := Select[Range[(2n - 1)^2, (2n)^2], PrimeQ];Flatten@Array[f, 13] (* Ray Chandler, May 03 2007 *)

Extensions

Extended by Ray Chandler, May 03 2007

A087952 Smallest prime == 1 (mod n) and > n^2.

Original entry on oeis.org

2, 5, 13, 17, 31, 37, 71, 73, 109, 101, 199, 157, 313, 197, 241, 257, 307, 379, 419, 401, 463, 617, 599, 577, 701, 677, 757, 953, 929, 991, 1117, 1153, 1123, 1259, 1471, 1297, 1481, 1483, 1873, 1601, 1723, 1933, 1979, 2069, 2161, 2347, 2351, 2593, 2549, 2551
Offset: 1

Views

Author

Ray Chandler, Sep 16 2003

Keywords

Comments

Primes arising in A087554.
Since A014085(n) ~ n/log(n) one may conjecture that a(n) < 2*n^2 for all n > 1. Numerically we find a(n) = n^2*(1 + O(1/sqrt(n))). - M. F. Hasler, Feb 27 2020

Examples

			For n=1, a(1) = 2, because 2 == 1 mod 1 and 2 > 1^2.
For n=2, a(2) = 5, because 5 == 1 mod 2 and 5 > 2^2.
		

Crossrefs

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

Programs

  • Mathematica
    spr[n_]:=Module[{p=NextPrime[n^2]},While[Mod[p,n]!=1,p=NextPrime[p]];p]; Join[ {2},Array[spr,50,2]] (* Harvey P. Dale, Jun 21 2021 *)
  • PARI
    apply( {A087952(n)=forprime(p=n^2+1,,(p-1)%n||return(p))}, [1..66]) \\ M. F. Hasler, Feb 27 2020

Extensions

Examples added by N. J. A. Sloane, Jun 21 2021

A104477 Number of successive squarefree intervals between primes.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 2, 0, 3, 0, 2, 0, 4, 0, 3, 0, 4, 0, 4, 0, 3, 0, 5, 0, 6, 0, 4, 0, 5, 0, 5, 0, 6, 0, 6, 0, 6, 0, 5, 0, 8, 0, 7, 0, 6, 0, 7, 0, 8, 0, 7, 0, 7, 0, 9, 0, 8, 0, 9, 0, 8, 0, 9, 0, 8, 0, 8, 0, 11, 0, 10, 0, 11, 0, 10, 0, 8, 0, 11, 0, 10, 0, 12, 0, 9, 0, 12, 0, 14, 0, 9, 0, 10, 0
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 18 2005

Keywords

Comments

Find the number (the "run length") of successive intervals [p, p'=nextprime(p)] (followed by [p', p''], then [p'', p'''] etc.) which do not contain a square. When a square (n+1)^2 is found in such an interval, this will result in a term a(2n) = 0, preceded by a(2n-1) = the number of intervals of primes counted before reaching that square, i.e., between n^2 and (n+1)^2. - M. F. Hasler, Oct 01 2018

Examples

			a(1)=1 because the first interval between primes (2 to 3) is free of squares.
a(2)=0 because there is a square between 3 and 5.
a(7)=2 because there are two successive squarefree intervals: 17 to 19; and 19 to 23.
a(8)=0 because between 23 and 29 there is a square: 25.
		

Crossrefs

Equals A014085 - 1 without the initial term, interleaved with 0's.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; f[n_] := If[ EvenQ[n], 0, PrimePi[ PrevPrim[(n + 3)^2/4]] - PrimePi[ NextPrim[(n + 1)^2/4]]]; Table[ f[n], {n, 100}] (* Robert G. Wilson v, Apr 23 2005 *)
  • PARI
    p=2; c=0; forprime(np=p+1, 1e4, if( sqrtint(p) < sqrtint(np), print1(c",",c=0,","), c++); p=np) \\ For illustrative purpose. Better:
    A104477(n)=if(bittest(n,0),primepi((1+n\/=2)^2)-primepi(n^2)-1,0) \\ M. F. Hasler, Oct 01 2018

Formula

a(2n) = 0: this is the interval from the greatest prime less than the (n+1)th square, through that square and up to the least prime greater than that square. - Robert G. Wilson v, Apr 23 2005
a(2n-1) = the difference between the indices of the greatest prime less than (n+1)^2 and the least prime greater than n^2. - Robert G. Wilson v, Apr 23 2005
a(2n-1) = A014085(n) - 1 = primepi((n+1)^2) - primepi(n^2) - 1. - M. F. Hasler, Oct 01 2018

Extensions

More terms from Robert G. Wilson v, Apr 23 2005
Offset corrected by M. F. Hasler, Oct 01 2018

A132657 a(n) is the product of the least prime > n^2 and the greatest prime < (n+1)^2.

Original entry on oeis.org

6, 35, 143, 391, 899, 1739, 3233, 5293, 8051, 11413, 17653, 24883, 33389, 43931, 56977, 72731, 92881, 118829, 145699, 176039, 212197, 254701, 308911, 357163, 424663, 492179, 566609, 660293, 756611, 864371, 987307, 1120697, 1257923
Offset: 1

Views

Author

Jonathan Vos Post, Nov 15 2007

Keywords

Examples

			a(1) = 6 = 2*3 = (smallest prime in [1^2,2^2]) * (largest prime in [1^2,2^2]).
a(2) = 35 = 5*7 = (smallest prime in [2^2,3^2]) * (largest prime in [2^2,3^2]).
		

Crossrefs

Programs

  • Maple
    seq(nextprime(n^2)*prevprime((n+1)^2,n=1..100); # Robert Israel, Jan 26 2020
  • Mathematica
    Table[Prime[PrimePi[n^2] + 1]*Prime[PrimePi[(n + 1)^2]], {n, 1, 40}] (* Stefan Steinerberger, Nov 20 2007 *)
    NextPrime[#[[1]]]NextPrime[#[[2]],-1]&/@Partition[Range[40]^2,2,1] (* Harvey P. Dale, Aug 27 2022 *)
  • PARI
    for(n=1,33,print1(nextprime(n^2)*precprime((n+1)^2),", ")) \\ Hugo Pfoertner, Jan 26 2020

Formula

a(n) = A007491(n) * A053001(n+1).

Extensions

More terms from Stefan Steinerberger, Nov 20 2007

A144137 Numbers n such that between n^K and (n+1)^K there are no primes, where K = sqrt(2).

Original entry on oeis.org

4, 24, 29, 33, 40, 43, 56, 59, 84, 117, 122, 128, 132, 139, 145, 156, 162, 163, 183, 190, 203, 230, 253, 257, 286, 297, 303, 306, 315, 319, 336, 371, 403, 420, 433, 447, 456, 467, 479, 537, 543, 563, 592, 595, 599, 624, 699, 746, 755, 767, 774, 782, 805, 814
Offset: 1

Views

Author

Artur Jasinski, Sep 11 2008

Keywords

Examples

			a(1)=4 because in range 4^sqrt(2) = 7.10299... and (4+1)^sqrt(2) = 9.73852... there are no primes (8 and 9 aren't primes).
		

Crossrefs

Programs

  • Mathematica
    a = {}; k = Sqrt[2]; Do[If[Length[Select[Range[Ceiling[n^k], Floor[(n + 1)^k]], PrimeQ]] == 0, AppendTo[a, n]], {n, 3000}]; a
    Select[Range[850],PrimePi[(#+1)^Sqrt[2]]-PrimePi[#^Sqrt[2]]==0&] (* or *) SequencePosition[PrimePi[Range[850]^Sqrt[2]],{x_,x_}][[All,1]] (* Harvey P. Dale, Jul 31 2021 *)

A220506 Number of primes <= n-th quarter-square.

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 13, 15, 16, 18, 20, 22, 24, 25, 29, 30, 32, 34, 36, 39, 42, 44, 46, 48, 52, 54, 58, 61, 62, 66, 68, 72, 75, 78, 81, 85, 89, 92, 96, 99, 101, 105, 109, 114, 118, 122, 126, 129, 133, 137, 141, 146, 150, 154, 158, 162, 167, 172, 177, 181, 187, 191, 195, 200
Offset: 1

Views

Author

Omar E. Pol, Feb 05 2013

Keywords

Crossrefs

Partial sums of A220492. A bisection is A038107, n >= 1.

Programs

  • Mathematica
    Table[PrimePi[n^2/4], {n, 75}] (* Alonso del Arte, Feb 05 2013 *)

Formula

a(n) = A000720(A002620(n)), n >= 1.

A222030 Primes and quarter-squares.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 16, 17, 19, 20, 23, 25, 29, 30, 31, 36, 37, 41, 42, 43, 47, 49, 53, 56, 59, 61, 64, 67, 71, 72, 73, 79, 81, 83, 89, 90, 97, 100, 101, 103, 107, 109, 110, 113, 121, 127, 131, 132, 137, 139, 144, 149, 151, 156, 157, 163, 167, 169
Offset: 0

Views

Author

Omar E. Pol, Feb 05 2013

Keywords

Comments

Union of A002620 and A000040.
It appears that there is always a prime between two consecutive quarter squares, if n >= 2. Therefore in a square spiral, or zig-zag, whose vertices are the quarter-squares, it appears that there is always a prime between two consecutive vertices, if n >= 2.
Apparently the above comment is equivalent to the Oppermann's conjecture. - Omar E. Pol, Oct 26 2013
Union of A000040 and A000290 and A002378. - Omar E. Pol, Oct 28 2013

Crossrefs

Programs

  • Mathematica
    mx = 13; Union[Prime[Range[PrimePi[mx^2]]], Floor[Range[2*mx]^2/4]] (* Alonso del Arte, Mar 03 2013 *)

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Mar 04 2013

A286090 Square matrix m read by antidiagonals. For j <= i, m[i, j] is how often sqrtint(gpf(c)) = j where i^2 <= c < (i+1)^2; for j >= i, m[i, j] is how often sqrtint(p) = i where p is a prime factor of c counted with multiplicity and i^2 <= c < (i+1)^2.

Original entry on oeis.org

3, 7, 3, 8, 2, 2, 15, 3, 3, 3, 15, 2, 2, 2, 2, 21, 6, 1, 1, 4, 2, 19, 3, 2, 3, 2, 3, 1, 27, 8, 2, 1, 1, 2, 5, 2, 29, 7, 2, 2, 2, 2, 2, 3, 2, 31, 7, 4, 2, 0, 0, 2, 4, 3, 1, 32, 9, 3, 3, 2, 4, 2, 3, 3, 4, 1, 41, 9, 3, 3, 0, 0, 0, 0, 3, 3, 4, 2, 39, 11, 6, 4, 2, 1
Offset: 1

Views

Author

David A. Corneth, May 02 2017 and May 17 2017

Keywords

Comments

The greatest prime factor (see A006530) of 1 is 1 by convention. The definitions for m[i, j] where j >= i and j <= i give no contradiction for j = i.

Examples

			Let i = 2 and sqrtint(n) = the square root of n rounded down to an integer. The integers c such that i^2 = 2^2 <= c < 3^2 = (i+1)^2 are 4, 5, 6, 7 and 8. The greatest prime factors h of these terms are 2, 5, 3, 7 and 2 respectively. sqrtint(h) are 1, 2, 1, 2 and 1 respectively. 1 occurs thrice here, 2 occurs twice, giving m[2, 1] = 3 and m[2, 2] = 2.
m[1, 2] = 7 because the prime factorizations of 4, 5, 6, 7 and 8 are 2^2, 5, 2*3, 7, 2^3. The prime 2 occurs 6 times and sqrtint(2) = 1. The prime factor 3 occurs once and sqrtint(3) = 1. Therefore m[1, 2] = 6 + 1 = 7. p = 5 and p = 7 each occur once and each have sqrtint(p) = 2. Therefore m[2, 2] = 2 as found earlier.
The first block of m of 10 by 10 is:
[3 7 8 15 15 21 19 27 29 31]
[3 2 3  2  6  3  8  7  7  9]
[2 3 2  1  2  2  2  4  3  3]
[3 2 1  3  1  2  2  3  3  4]
[2 4 2  1  2  0  2  0  2  1]
[2 3 2  2  0  4  0  1  3  1]
[1 5 2  2  2  0  3  0  0  2]
[2 3 4  3  0  1  0  4  0  0]
[2 3 3  3  2  3  0  0  3  0]
[1 4 3  4  1  1  2  0  0  5]
		

Crossrefs

Cf. A006530 (greatest prime factor, gpf), A014085.

Programs

  • PARI
    squaremat(n) = {my(m=matrix(n,n)); m[1,1] = 3; for(i=2, n, for(c = i^2, (i+1)^2-1, f=factor(c); for(j=1, matsize(f)[1], m[sqrtint(f[j,1]), i] += f[j, 2]); m[i, sqrtint(f[matsize(f)[1], 1])]++));for(i=2, n, m[i,i] = m[i,i] >> 1); m}
    \\ Diagonals m[i, j] where i + j <= n.
    upto(n) = {my(v=vector(binomial(n+1, 2)), m = squaremat(n), t = 0); for(i=1, n, for(j=0, i-1, t++; v[t] = m[j+1, i-j])); v}

Formula

for n > 1, m[n, n] = A014085(n).

A320688 Sum of the square excess A056892 of the primes between two squares.

Original entry on oeis.org

3, 4, 6, 11, 10, 24, 26, 34, 26, 33, 50, 67, 72, 46, 70, 109, 96, 132, 122, 153, 132, 145, 174, 229, 208, 175, 194, 287, 232, 244, 338, 267, 276, 345, 374, 239, 392, 396, 424, 390, 484, 373, 514, 563, 618, 424, 654, 821, 442, 557, 890, 814, 668, 741, 580, 642, 990, 811, 982, 968, 772
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Consider the primes p1,...,pK between two squares n^2 and (n+1)^2, and take the sum of the differences: (p1 - n^2) + ... + (pK - n^2). Obviously this equals (sum of these primes) - (number of these primes) * n^2.

Crossrefs

Row sums of A056892, read as a table.

Programs

  • Maple
    R:= NULL: p:= 2: n:= 1: t:= 0:
    while n <= 100 do
        t:= t + p-n^2;
        p:= nextprime(p);
        if p > (n+1)^2 then
         R:= R, t; t:= 0; n:= n+1;
        fi:
    od:
    R; # Robert Israel, Dec 17 2024
  • PARI
    a(n,s=0)={forprime(p=n^2,(n+1)^2,s+=p-n^2);s}

Formula

a(n) = A108314(n) - A014085(n)*A000290(n), where A000290(n) = n^2.
Previous Showing 71-80 of 114 results. Next