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-6 of 6 results.

A038107 Number of primes < n^2.

Original entry on oeis.org

0, 0, 2, 4, 6, 9, 11, 15, 18, 22, 25, 30, 34, 39, 44, 48, 54, 61, 66, 72, 78, 85, 92, 99, 105, 114, 122, 129, 137, 146, 154, 162, 172, 181, 191, 200, 210, 219, 228, 240, 251, 263, 274, 283, 295, 306, 319, 329, 342, 357, 367, 378, 393, 409, 421, 434, 445, 457, 474
Offset: 0

Views

Author

Joe K. Crump (joecr(AT)carolina.rr.com)

Keywords

Comments

Also number of primes <= n^2 since n^2 is not prime.
Also the number of primes contained within an n X n square spiral. - William A. Tedeschi, Mar 03 2008
For large n, these numbers closely approximate the sum of primes less than n. For example, n = 10^10, sum of primes < n = 2220822432581729238. The number of primes < (10^10)^2 = 10^20 = 2220819602560918840. The error is 0.0000012743... The derivation of this is in the link Sum of Primes. - Cino Hilliard, Jun 09 2008
a(n) - A000720(n) = A073882(n) - A010051(n) = A117490(n). - Reinhard Zumkeller, May 20 2010
A061265(a(n)) = 1 for n > 1. - Reinhard Zumkeller, Apr 15 2013
From Zhi-Wei Sun, Feb 17 2014: (Start)
Conjecture:
(i) The sequence a(n)^(1/n) (n = 3, 4, ...) is strictly decreasing (to the limit 1).
(ii) If n > 0 is not among 25, 35, 44, 46, 105, then the interval [a(n), a(n+1)] contains at least one prime. (End)
A classical conjecture of Legendre asserts that a(n) < a(n+1) for all n > 0.
Conjecture: All the numbers Sum_{i=j,...,k} 1/a(i) with 1 < j <= k have pairwise distinct fractional parts. - Zhi-Wei Sun, Sep 24 2015

Examples

			a(2)=2 because the only primes < 4 are 2 and 3.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187. (See Conjectures 2.14-2.16.)

Crossrefs

Cf. A014085 (first differences), A111208, A194189, A262408, A262443, A262447, A262462.

Programs

  • Haskell
    a038107 0 = 0
    a038107 n = a000720 $ a000290 n
    -- Reinhard Zumkeller, Apr 15 2013, Nov 01 2011
    
  • Maple
    A038107 := proc(n) numtheory[pi]( n^2) ; end: seq(A038107(n),n=0..100) ; # R. J. Mathar, Jun 22 2009
  • Mathematica
    Table[PrimePi[n^2], {n, 0, 100}] (* Ray Chandler, Oct 22 2005 *)
  • PARI
    a(n)=primepi(n^2) \\ Charles R Greathouse IV, Apr 26 2012
  • Sage
    [prime_pi(n^2) for n in range(0, 59)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = A000720(A000290(n)).
a(n) ~ 1/2 * n^2/log n. - Charles R Greathouse IV, Apr 26 2012

Extensions

Extended by Ray Chandler, Oct 22 2005

A262698 Positive integers m such that pi(k^3) + pi(m^3) is a cube for some k = 1,...,m, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

1, 2, 4, 24, 41, 51, 88, 95, 99, 179, 183, 663, 782, 829, 1339, 2054, 2816, 7918, 8474, 13264, 16664, 27415, 39514, 48606, 51145, 187222, 200906, 261980, 353209, 375162, 396967, 400469
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 27 2015

Keywords

Comments

Conjecture: (i) There are infinitely many distinct primes p,q,r such that pi(p^2) + pi(q^2) = r^2.
(ii) The Diophantine equation pi(x^3) + pi(y^3) = z^3 with 0 < x <= y and z >= 0 only has the following 17 solutions: (x,y,z) = (1,1,0), (2,2,2), (3,4,3), (16,24,13), (3,41,19), (37,51,26), (53,88,41), (18,95,41), (45,99,44), (108,179,79), (149,183,87), (8,663,251), (243,782,297), (803,829,385), (100,1339,489), (674,2054,745), (1519,2816,1047).
(iii) The Diophantine equation pi(x^n) + pi(y^n) = z^n with n > 3 and x,y,z > 0 has no solution.
a(26) > 10^5, if it exists. Conjecture (ii) above is false since these further solutions exist: (1339, 7918, 2682), (3360, 8474, 2922), (8443, 13264, 4764), (15590, 16664, 6696), (15883, 27415, 9431), (9719, 39514, 12689), (22265, 48606, 15933), (38606, 51145, 18297). - Giovanni Resta, Jun 14 2020
Further solutions: (79522, 187222, 58554), (65281, 200906, 61833), (222863, 261980, 92917), (226465, 353209, 114585), (41559, 375162, 112168), (244967, 396967, 127399), (291034, 400469, 133443) - Chai Wah Wu, Apr 13 2021

Examples

			a(4) = 24 since pi(16^3) + pi(24^3) = pi(4096) + pi(13824) = 564 + 1633 = 2197 = 13^3.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimePi[n^3]
    CQ[n_]:=IntegerQ[n^(1/3)]
    n=0;Do[Do[If[CQ[f[x]+f[y]],n=n+1;Print[n," ",y];Goto[aa]],{x,1,y}];Label[aa];Continue,{y,1,3000}]
  • PARI
    lista(nn) = {my(c=0, v=vector(nn)); for(m=1, nn, forprime(p=(m-1)^3+1, m^3, c++); v[m]=c; if(sum(k=1, m, ispower(v[k]+v[m], 3)), print1(m, ", "))); } \\ Jinyuan Wang, Jun 13 2020

Extensions

a(18)-a(25) from Giovanni Resta, Jun 14 2020
a(26)-a(29) from Chai Wah Wu, Apr 05 2021
a(30)-a(32) from Chai Wah Wu, Apr 09 2021

A262746 Number of ordered ways to write n as x^2 + y^2 + pi(z^2) with 0 <= x <= y and z > 0 such that 2*x*y + 3 is prime, where pi(m) denotes the number of primes not exceeding m.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Sep 29 2015

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 21, 37, 117, 184. Also, any integer n > 8 can be written as x^2 + y^2 + pi(z^2), where x, y and z are integers with x+y (or z) odd.
(ii) Each n = 8,9,... can be written as p^2 + pi(x^2) + pi(y^2), where p is prime, and x and y are positive integers.
(iii) Every n = 8,9,... can be written as pi(p^2) + pi(x^2) + pi(y^2), where p is prime, and x and y are positive integers.
Note that pi(x^2) > n if x > n > 0. We have verified that a(n) > 0 for all n = 1,...,10^6.

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + pi(1^2) with 2*0*1 + 3 = 3 prime.
a(2) = 2 since 2 = 0^2 + 0^2 + pi(2^2) = 1^2 + 1^2 + pi(1^2) with 2*0*0 + 3 = 3 and 2*1*1 + 3 = 5 both prime.
a(3) = 1 since 3 = 0^2 + 1^2 + pi(2^2) with 2*0*1 + 3 = 3 prime.
a(21) = 1 since 21 = 1^2 + 4^2 + pi(3^2) with 2*1*4 + 3 = 11 prime.
a(37) = 1 since 37 = 1^2 + 5^2 + pi(6^2) with 2*1*5 + 3 = 13 prime.
a(117) = 1 since 117 = 0^2 + 5^2 + pi(22^2) with 2*0*5 + 3 = 3 prime.
a(184) = 1 since 184 = 0^2 + 13^2 + pi(7^2) with 2*0*13 + 3 = 3 prime.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    pi[n_]:=PrimePi[n^2]
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[pi[z]>n,Goto[aa]];Do[If[SQ[n-pi[z]-y^2]&&PrimeQ[2y*Sqrt[n-pi[z]-y^2]+3],r=r+1],{y,0,Sqrt[(n-pi[z])/2]}];Continue,{z,1,n}];Label[aa];Print[n," ",r];Continue,{n,1,100}]

A262707 Positive integers m such that pi(k^2)*pi(m^2) is a square for some 1 < k < m, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

5, 8, 10, 14, 16, 19, 23, 31, 35, 39, 45, 63, 65, 66, 68, 71, 74, 82, 87, 92, 94, 115, 130, 145, 151, 162, 172, 204, 250, 279, 292, 304, 334, 391, 413, 415, 418, 449, 451, 454, 461, 499, 514, 524, 552, 557, 626, 664, 676, 683, 691, 706, 708, 724, 763, 766, 846, 848, 858, 866
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 27 2015

Keywords

Comments

Conjecture: The sequence has infinitely many terms.
See also A262700 for a related conjecture.

Examples

			a(2) = 8 since pi(8^2)*pi(2^2) = 18*2 = 6^2.
a(3) = 10 since pi(10^2)*pi(3^2) = 25*4 = 10^2.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimePi[n^2]
    SQ[n_]:=IntegerQ[Sqrt[n]]
    n=0;Do[Do[If[SQ[f[x]*f[y]],n=n+1;Print[n," ",y];Goto[aa]],{x,2,y-1}];Label[aa];Continue,{y,1,870}]

A262731 Primes p in the form pi(q^2)+pi(r^2) with q and r both prime, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

11, 13, 17, 19, 41, 43, 101, 103, 223, 293, 313, 331, 359, 401, 409, 439, 491, 521, 523, 571, 613, 677, 709, 821, 883, 947, 1009, 1039, 1061, 1193, 1283, 1291, 1303, 1373, 1409, 1427, 1453, 1471, 1487, 1543, 1553, 1609, 1669, 1697, 1811, 1861, 1879, 1907, 1949, 1999, 2039, 2063, 2143, 2213, 2239, 2251, 2267, 2287, 2309, 2381
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 29 2015

Keywords

Comments

Conjecture: The sequence has infinitely many terms. In general, for each n = 2,3,4,... there are infinitely many primes p in the form pi(q^n)+pi(r^n) with q and r both prime.
Compare this conjecture with the well-known result that there are infinitely many primes p in the form x^2+y^2 with x and y positive integers (such a prime p is either 2 or congruent to 1 modulo 4).

Examples

			a(1) = 11 since 11 = 2 + 9 = pi(2^2) + pi(5^2) with 11, 2 and 5 all prime.
a(60) = 2381 since 2381 = 1000 + 1381 = pi(89^2) + pi(107^2) with 2381, 89 and 107 all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimePi[Prime[n]^2]
    T[1]:={f[1]}
    T[n_]:=Union[T[n-1],{f[n]}]
    n=0;Do[Do[If[f[x]>Prime[y],Goto[aa]];If[MemberQ[T[y],Prime[y]-f[x]],n=n+1;Print[n," ",Prime[y]];Goto[aa]];Continue,{x,1,y}];
    Label[aa];Continue,{y,1,353}]

A262700 Primes p such that pi(p^2)*pi(q^2) is a square for some prime q < p, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

5, 19, 31, 151, 691, 1181, 1489, 1511, 1601, 2579, 3037, 7297, 9661, 10993, 11699, 20407, 25657, 33937, 65099, 96419, 102911, 133157, 251789, 411841, 417271, 670729, 808211, 1179907, 1671277
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 27 2015

Keywords

Comments

Conjecture: (i) The sequence has infinitely many terms.
(ii) The Diophantine equation pi(x^n)*pi(y^n) = z^n with n > 2 and x,y,z > 0 has no solution.

Examples

			a(1) = 5 since pi(5^2)*pi(3^2) = 9*4 = 6^2 with 5 and 3 both prime.
a(2) = 19 since pi(19^2)*pi(2^2) = 72*2 = 12^2 with 19 and 2 both prime.
a(21) = 102911 since pi(102911^2)*pi(919^2) = pi(10590673921)*pi(844561) = 480670430*67230 = 32315473008900 = 5684670^2 with 102911 and 919 both prime.
a(22) = 133157 since pi(133157^2)*pi(19^2) = pi(17730786649)*pi(361) = 786299168*72 = 56613540096 = 237936^2 with 133157 and 19 both prime.
a(23) = 251789 since pi(251789^2)*pi(10513^2) = pi(63397700521)*pi(110523169) = 2660789341*6331444 = 16846638708338404 = 129794602^2 with 251789 and 10513 both prime.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimePi[Prime[n]^2]
    SQ[n_]:=IntegerQ[Sqrt[n]]
    n=0;Do[Do[If[SQ[f[k]*f[m]],n=n+1;Print[n, " ", Prime[m]];Goto[aa]],{k,1,m-1}];Label[aa];Continue,{m,2,22200}]

Extensions

a(24)-a(29) from Chai Wah Wu, Aug 21 2019
Showing 1-6 of 6 results.