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-20 of 43 results. Next

A221056 Numbers k such that there is no square between prime(k) and prime(k+1).

Original entry on oeis.org

1, 3, 5, 7, 8, 10, 12, 13, 14, 16, 17, 19, 20, 21, 23, 24, 26, 27, 28, 29, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 43, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 86
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 15 2013

Keywords

Comments

A061265(a(n)) = 0;
a(n) = A049084(A224363(n)); A000040(a(n)) = A224363(n).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a221056 n = a221056_list !! (n-1)
    a221056_list = map (+ 1) $ elemIndices 0 a061265_list
    
  • Mathematica
    Select[Range[86], Ceiling[Sqrt[Prime[#]]]^2 > Prime[# + 1] &] (* Zak Seidov, Apr 16 2013 *)
  • PARI
    {for (n = 1, 86, ceil (sqrt (prime (n)))^2 > prime (n + 1) && print1 (n ","))} \\ Zak Seidov, Apr 16 2013

A237656 Least positive integer m such that {A000720(k^2): k = 1, ..., m} contains a complete system of residues modulo n, or 0 if such a number m does not exist.

Original entry on oeis.org

1, 5, 3, 6, 8, 10, 18, 17, 30, 41, 28, 43, 29, 33, 43, 27, 66, 47, 98, 105, 155, 114, 113, 100, 49, 62, 118, 146, 85, 125, 80, 117, 74, 101, 167, 137, 168, 282, 176, 287, 129, 178, 151, 140, 163, 139, 262, 267, 277, 234, 285, 188, 203, 163, 192, 239, 188, 241, 252, 252
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: a(n) is always positive. Moreover, a(n) < 2*prime(n+1) - 2 for all n > 0.
Note that a(21) = 155 = 2*prime(22) - 3.

Examples

			a(5) = 8 since {A000720(k^2): k = 1, ..., 8} = {0, 2, 4, 6, 9, 11, 15, 18} contains a complete system of residues modulo 5, but {A000720(k^2): k = 1, ..., 7} contains no integer congruent to 3 modulo 5.
		

Crossrefs

Programs

  • Mathematica
    q[m_,n_]:=Length[Union[Table[Mod[PrimePi[k^2],n],{k,1,m}]]]
    Do[Do[If[q[m,n]==n,Print[n," ",m];Goto[aa]],{m,n,2*Prime[n+1]-3}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]

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

A262999 Number of ordered pairs (k, m) with k > 0 and m > 0 such that n = pi(k*(k+1)/2) + pi(m^2), where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 07 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 3, 5, 7, 35, 37, 217, 7439, 10381.
We have verified this for n up to 120000.
See also A262995, A263001 and A263020 for similar conjectures.

Examples

			a(2) = 2 since 2 = pi(1*2/2) + pi(2^2) = pi(2*3/2) + pi(1^2).
a(3) = 1 since 3 = pi(3*4/2) + pi(1^2).
a(5) = 1 since 5 = pi(3*4/2) + pi(2^2).
a(7) = 1 since 7 = pi(3*4/2) + pi(3^2).
a(35) = 1 since 35 = pi(13*14/2) + pi(6^2).
a(37) = 1 since 37 = pi(3*4/2) + pi(12^2).
a(217) = 1 since 217 = pi(17*18/2) + pi(33^2).
a(590) = 1 since 590 = 58 + 532 = pi(23*24/2) + pi(62^2).
a(7439) = 1 since 7439 = 3854 + 3585 = pi(269*270/2) + pi(183^2).
a(10381) = 1 since 10381 = 1875 + 8506 = pi(179*180/2) + pi(296^2).
		

Crossrefs

Programs

  • Mathematica
    s[n_]:=s[n]=PrimePi[n^2]
    t[n_]:=t[n]=PrimePi[n(n+1)/2]
    Do[r=0;Do[If[s[k]>n,Goto[bb]];Do[If[t[j]>n-s[k],Goto[aa]];If[t[j]==n-s[k],r=r+1];Continue,{j,1,n-s[k]+1}];Label[aa];Continue,{k,1,n}];Label[bb];Print[n," ",r];Continue,{n,1,100}]

A038098 Number of primes < n^3.

Original entry on oeis.org

0, 4, 9, 18, 30, 47, 68, 97, 129, 168, 217, 269, 327, 400, 476, 564, 656, 765, 882, 1007, 1147, 1298, 1457, 1633, 1821, 2020, 2227, 2460, 2707, 2961, 3228, 3512, 3817, 4137, 4483, 4821, 5194, 5579, 5995, 6413, 6850, 7308, 7789, 8293
Offset: 1

Views

Author

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

Keywords

Comments

From Zhi-Wei Sun, Oct 17 2015: (Start)
Conjecture: (i) For any integer k > 2 the sequence pi(n^k)/n^k (n = 2,3,...) is strictly decreasing, where pi(x) denotes the number of primes not exceeding x.
(ii) All the numbers pi(n^2)/n^2 (n = 1,2,3,...) are pairwise distinct. Moreover, we have pi(n^2)/n^2 > pi((n+1)^2)/(n+1)^2 for all n > 15646.
(End)

Examples

			a(2)=4 because the only primes < 8 are 2,3,5 and 7.
		

Crossrefs

Cf. A014085, A038107, A060199 (first differences).

Programs

  • PARI
    vector(100, n, primepi(n^3)) \\ Altug Alkan, Oct 17 2015
  • Sage
    [prime_pi(n^3) for n in range(1, 45)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = A000720(A000578(n)). - Michel Marcus, Sep 02 2013

A117490 Number of primes between n and n^2 (with n and n^2 excluded).

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 11, 14, 18, 21, 25, 29, 33, 38, 42, 48, 54, 59, 64, 70, 77, 84, 90, 96, 105, 113, 120, 128, 136, 144, 151, 161, 170, 180, 189, 199, 207, 216, 228, 239, 250, 261, 269, 281, 292, 305, 314, 327, 342, 352, 363, 378, 393, 405, 418, 429, 441, 458, 470
Offset: 1

Views

Author

Keywords

Comments

A famous Japanese mathematics book states that this sequence is nonzero (for n>1) if the Riemann Hypothesis is true, but this statement seems to be false.
If the n-th prime is denoted by p(n) then a(j) = number of nonzero values of floor (j^2/p(n)), over all n >= 1, (derived from A165974). - Christopher Hunt Gribble, Oct 03 2009

Examples

			For n = 5: between 5+1 = 6 and 5^2-1 = 24 there are the following six primes: 7, 11, 13, 17, 19, 23.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,j,np; for i from 1 by 1 to n do np:=0; for j from i+1 by 1 to i^2-1 do if isprime(j) then np:=np+1; fi; od; print(np); od; end: P(100);
  • Mathematica
    a[n_] := PrimePi[n^2 - 1] - PrimePi[n]; Array[a, 59] (* Robert G. Wilson v, Apr 06 2006 *)

Formula

a(n) = pi(n^2) - pi(n), cf. A000720.
a(n) = A038107(n) - A000720(n) = A073882(n) - A010051(n). - Reinhard Zumkeller, May 20 2010

A237657 a(n) = |{n < m < 2*n: pi(m) and pi(m^2) are both prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 8.
(ii) For any integer n > 1 there is a prime p <= n such that n + pi(p) is prime. Also, for n > 5 there is a prime p with n < p < 2*n such that pi(p) is prime.
(iii) For each n > 20, there is a prime p with n < p < 2*n such that pi(p^2) is prime.

Examples

			a(4) = 1 since pi(6) = 3 and pi(6^2) = 11 are both prime.
a(10) = 1 since pi(17) = 7 and pi(17^2) = 61 are both prime.
a(17) = 1 since pi(33) = 11 and pi(33^2) = 181 are both prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[PrimePi[n]]&&PrimeQ[PrimePi[n^2]]
    a[n_]:=Sum[If[q[m],1,0],{m,n+1,2n-1}]
    Table[a[n],{n,1,70}]

A278114 Number of primes <= 2n^2.

Original entry on oeis.org

1, 4, 7, 11, 15, 20, 25, 31, 37, 46, 53, 61, 68, 77, 87, 97, 106, 118, 128, 139, 152, 163, 177, 190, 204, 217, 231, 247, 263, 278, 293, 309, 326, 344, 363, 377, 399, 418, 436, 452, 474, 492, 516, 536, 558, 580, 600, 623, 647, 669, 692, 713, 738, 765, 789, 816, 842, 867
Offset: 1

Views

Author

Jason Kimberley, Feb 09 2017

Keywords

Comments

This is the row length sequence for both A278113 and A278115.

Crossrefs

Programs

Formula

a(n) = A000720(A001105(n)).

A344316 Number of primes appearing along the border of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 7, 8, 8, 10, 9, 13, 12, 13, 12, 12, 13, 20, 14, 17, 17, 19, 16, 22, 18, 22, 19, 23, 19, 31, 18, 26, 24, 26, 25, 31, 18, 27, 28, 30, 22, 39, 25, 30, 31, 37, 26, 41, 29, 37, 32, 42, 28, 44, 31, 39, 30, 41, 32, 51, 33, 39, 40, 41, 36, 52, 35, 44, 39, 50, 39, 52, 39
Offset: 1

Views

Author

Wesley Ivan Hurt, May 14 2021

Keywords

Examples

			                                                      [1   2  3  4  5]
                                      [1   2  3  4]   [6   7  8  9 10]
                            [1 2 3]   [5   6  7  8]   [11 12 13 14 15]
                   [1 2]    [4 5 6]   [9  10 11 12]   [16 17 18 19 20]
           [1]     [3 4]    [7 8 9]   [13 14 15 16]   [21 22 23 24 25]
------------------------------------------------------------------------
  n         1        2         3            4                 5
------------------------------------------------------------------------
  a(n)      0        2         3            4                 5
------------------------------------------------------------------------
  primes   {}      {2,3}    {2,3,7}    {2,3,5,13}       {2,3,5,11,23}
------------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[n] + PrimePi[n^2 - 1] - PrimePi[n*(n - 1)] + Sum[PrimePi[n*k + 1] - PrimePi[n*k], {k, n - 2}], {n, 100}]

Formula

a(n) = pi(n) + pi(n^2-1) - pi(n^2-n) + Sum_{k=1..n-2} (pi(n*k+1) - pi(n*k)).

A078435 Number of composites <= n^2.

Original entry on oeis.org

1, 2, 5, 10, 16, 25, 34, 46, 59, 75, 91, 110, 130, 152, 177, 202, 228, 258, 289, 322, 356, 392, 430, 471, 511, 554, 600, 647, 695, 746, 799, 852, 908, 965, 1025, 1086, 1150, 1216, 1281, 1349, 1418, 1490, 1566, 1641, 1719, 1797, 1880, 1962, 2044, 2133, 2223
Offset: 1

Views

Author

John E. Lenz (jel5010(AT)yahoo.com), Dec 30 2002

Keywords

Examples

			a(3)=5 because the only composites <= 9 are 1, 4, 6, 8 and 9.
		

Programs

  • Maple
    NumComposites := proc(N::posint) local count, i:count := 0:for i from 1 to N do if not isprime(i) then count := count + 1 fi:od: count;end:seq(NumComposites(k^2), k=1..51); # Zerinvary Lajos, May 26 2008
    A038107 := proc(n) numtheory[pi]( n^2) ; end: A078435 := proc(n) n^2-A038107(n) ; end: seq(A078435(n),n=1..100) ; # R. J. Mathar, Jun 22 2009
  • Mathematica
    a[n_] := n^2 - PrimePi[n^2];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 20 2024, after R. J. Mathar *)

Formula

a(n) = n^2 - A038107(n). - R. J. Mathar, Jun 22 2009
Previous Showing 11-20 of 43 results. Next