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

A237706 Number of primes p < n with pi(n-p) a square, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 11 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 5, 6, 7, 8, 16, 17, 22, 23, 148, 149.
(ii) For any integer n > 2, there is a prime p < n with pi(n-p) a triangular number.
We have verified that a(n) > 0 for every n = 3, ..., 1.5*10^7. See A237710 for the least prime p < n with pi(n-p) a square.
See also A237705, A237720 and A237721 for similar conjectures.

Examples

			a(8) = 1 since 7 is prime with pi(8-7) = 0^2.
a(16) = 1 since 7 is prime with pi(16-7) = 2^2.
a(149) = 1 since 139 is prime with pi(149-139) = pi(10) = 2^2.
a(637) = 2 since 409 is prime with pi(637-409) = pi(228) = 7^2, and 613 is prime with pi(637-613) = pi(24) = 3^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    q[n_]:=SQ[PrimePi[n]]
    a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,70}]

A237612 Least positive integer k such that A000720(k*n) is a square, or 0 if such a number k does not exist.

Original entry on oeis.org

1, 1, 3, 2, 2, 4, 1, 1, 1, 1, 5, 2, 2, 2, 28, 34, 9, 3, 3, 5, 20, 7, 1, 1, 1, 1, 1, 1, 2, 14, 5, 17, 3, 16, 12, 23, 18, 4, 4, 30, 46, 10, 50, 23, 36, 18, 40, 14, 2, 2, 3, 3, 1, 1, 1, 1, 1, 1, 32, 7, 11, 68, 19, 79, 29, 267, 10, 8, 12, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

According to the conjecture in A237598, we should always have 0 < a(n) < prime(n).

Examples

			a(3) = 3 since A000720(3*3) = 4 is a square, but neither A000720(1*3) = 2  nor A000720(2*3) = 3 is a square.
		

Crossrefs

Programs

  • Mathematica
    sq[n_]:=IntegerQ[Sqrt[PrimePi[n]]]
    Do[Do[If[sq[k*n],Print[n," ",k];Goto[aa]],{k,1,Prime[n]-1}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]

A237597 a(n) = |{0 < k < prime(n): n divides pi(k*n)}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
See also A237614 for the least k > 0 with pi(k*n) divisible by n.

Examples

			a(6) = 1 since pi(11*6) = 3*6 with 11 < prime(6) = 13.
a(19) = 1 since pi(33*19) = 6*19 with 33 < prime(19) = 67.
a(759) = 1 since pi(2559*759) = 191*759 with 2559 < prime(759) = 5783.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[Mod[PrimePi[k*n],n]==0,1,0],{k,1,Prime[n]-1}]
    Table[a[n],{n,1,80}]

A237614 Least positive integer k with A000720(k*n) divisible by n, or 0 if such a number k does not exist.

Original entry on oeis.org

1, 2, 2, 2, 6, 11, 11, 7, 3, 3, 3, 8, 13, 13, 8, 14, 14, 14, 33, 33, 9, 15, 9, 4, 4, 42, 22, 22, 43, 4, 36, 99, 10, 10, 10, 10, 38, 38, 38, 38, 31, 24, 17, 17, 17, 62, 24, 194, 55, 80, 11, 40, 11, 11, 11, 11, 11, 57, 11, 11, 33, 18, 18, 83, 164, 5, 5, 5, 156, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

According to the conjecture in A237597, we should always have 0 < a(n) < prime(n).

Examples

			a(3) = 2 since pi(2*3) = 3 is divisible by 3, but pi(1*3) = 2 is not.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[Mod[PrimePi[k*n],n]==0,Print[n," ",k];Goto[aa]],{k,1,Prime[n]-1}];
    Print[n," ",0];Label[aa];Continue,{n,1,70}]

A238277 a(n) = |{0 <= k < n: the number of primes in the interval (k*n, (k+1)*n] is a square}|.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 3, 1, 3, 2, 4, 1, 5, 3, 3, 10, 11, 8, 7, 10, 6, 13, 11, 13, 8, 12, 10, 8, 7, 7, 6, 4, 5, 5, 6, 3, 4, 7, 3, 7, 7, 8, 7, 7, 9, 8, 12, 8, 5, 12, 11, 14, 11, 14, 11, 8, 11, 9, 9, 13, 12, 5, 14, 15, 12, 15, 12, 15, 14, 15, 16, 13, 10, 18, 20, 12, 7, 17, 13
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 22 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
We have verified this for n up to 10^5.
See also A238278 and A238281 for related conjectures.

Examples

			a(9) = 1 since the interval (0, 9] contains exactly 2^2 = 4 primes.
a(13) = 1 since the interval (9*13, 10*13] contains exactly 1^2 = 1 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    d[k_,n_]:=PrimePi[(k+1)*n]-PrimePi[k*n]
    a[n_]:=Sum[If[SQ[d[k,n]],1,0],{k,0,n-1}]
    Table[a[n],{n,1,80}]

A237615 a(n) = |{0 < k < n: k^2 + k - 1 and pi(k*n) are both prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) For each n = 4, 5, ..., there is a positive integer k < n with k^2 + k - 1 and pi(k*n) + 1 both prime. Also, for any integer n > 6, there is a positive integer k < n with k^2 + k - 1 and pi(k*n) - 1 both prime.
(iii) For every integer n > 15, there is a positive integer k < n such that pi(k) - 1 and pi(k*n) are both prime.
Note that part (i) is a refinement of the first assertion in the comments in A237578.

Examples

			a(8) = 1 since 4^2 + 4 - 1 = 19 and pi(4*8) = 11 are both prime.
a(33) = 1 since 28^2 + 28 - 1 = 811 and pi(28*33) = 157 are both prime.
		

Crossrefs

Programs

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

A237840 a(n) = |{0 < k <= n: the number of twin prime pairs not exceeding k*n is a square}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 14 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 for no n > 159.
(ii) For every n = 1, 2, 3, ..., there is a positive integer k <= n such that the number |{{p, 2*p+1}: both p and 2*p + 1 are primes not exceeding k*n}| is a square.
We have verified that a(n) > 0 for all n = 1, ..., 22000.
See also A237879 for the least k among 1, ..., n such that the number of twin prime pairs not exceeding k*n is a square.

Examples

			a(4) = 1 since the number of twin prime pairs not exceeding 1*4 = 4 is 0^2.
a(9) = 1 since there are exactly 2^2 twin prime pairs not exceeding 3*9 = 27 (namely, they are {3, 5}, {5, 7}, {11, 13} and {17, 19}).
a(18055) > 0 since there are exactly 675^2 = 455625 twin prime pairs not exceeding 5758*18055 = 103960690.
a(18120) > 0 since there are exactly 729^2 = 531441 twin prime pairs not exceeding 6827*18120 = 123705240.
a(18307) > 0 since there are exactly 681^2 = 463761 twin prime pairs not exceeding 5792*18307 = 106034144.
a(18670) > 0 since there are exactly 683^2 = 466489 twin prime pairs not exceeding 5716*18670 = 106717720.
a(19022) > 0 since there are exactly 737^2 = 543169 twin prime pairs not exceeding 6666*19022 = 126800652.
a(19030) > 0 since there are exactly 706^2 = 498436 twin prime pairs not exceeding 6045*19030 = 115036350.
a(19805) > 0 since there are exactly 717^2 = 514089 twin prime pairs not exceeding 6015*19805 = 119127075.
a(19939) > 0 since there are exactly 1000^2 = 10^6 twin prime pairs not exceeding 12660*19939 = 252427740.
a(20852) > 0 since there are exactly 747^2 = 558009 twin prime pairs not exceeding 6268*20852 = 130700336.
a(21642) > 0 since there are exactly 724^2 = 524176 twin prime pairs not exceeding 5628*21642 = 121801176.
		

Crossrefs

Programs

  • Mathematica
    tw[0]:=0
    tw[n_]:=tw[n-1]+If[PrimeQ[Prime[n]+2],1,0]
    SQ[n_]:=IntegerQ[Sqrt[tw[PrimePi[n]]]]
    a[n_]:=Sum[If[SQ[k*n-2],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A237643 Least positive integer m such that {A000720(k*n): 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, 2, 3, 8, 8, 12, 13, 14, 27, 25, 32, 25, 16, 23, 94, 41, 46, 67, 38, 60, 77, 55, 84, 46, 88, 79, 85, 113, 82, 155, 114, 141, 178, 132, 124, 176, 155, 96, 135, 176, 146, 148, 126, 125, 183, 191, 185, 194, 166, 261, 378, 230, 278, 203, 199, 161, 293, 286, 175, 274
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: a(n) is always positive. Moreover, a(n) <= 2*prime(n) for all n > 0.
Note that a(15) = 94 = 2*prime(15).

Examples

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

Crossrefs

Programs

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

A238224 Number of pairs {j, k} with 0 < j < k <= n and k == 1 (mod j) such that pi(j*n) divides pi(k*n), where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 20 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This is a refinement of part (i) of the conjecture in A238165.
We have verified the conjecture for n up to 21500.

Examples

			a(18) = 1 since 6 == 1 (mod 1), and pi(1*18) = 7 divides pi(6*18) = 28.
a(50) = 1 since 7 == 1 (mod 3), and pi(3*50) = 35 divides pi(7*50) = 70.
a(379) = 1 since 353 == 1 (mod 4), and pi(4*379) = 240 divides pi(353*379) = 12480.
		

Crossrefs

Programs

  • Mathematica
    m[k_,j_,n_]:=Mod[PrimePi[k*n],PrimePi[j*n]]==0
    a[n_]:=Sum[If[m[j*q+1,j,n],1,0],{j,1,n-1},{q,1,(n-1)/j}]
    Table[a[n],{n,1,80}]

A237879 Least positive integer k <= n such that the number of twin prime pairs not exceeding k*n is a square, or 0 if such a number k does not exist.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 3, 3, 2, 2, 2, 2, 2, 2, 15, 14, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 17, 7, 7, 3, 3, 15, 14, 6, 6, 13, 13, 13, 12, 12, 5, 5, 5, 11, 11, 11, 2, 2, 2, 10, 10, 10, 4, 4, 4, 9, 9, 9, 16, 46, 8, 8, 8, 8, 8, 8, 65, 14, 52, 7, 7, 3, 3, 3, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 14 2014

Keywords

Comments

According to the conjecture in A237840, a(n) should be always positive.

Examples

			a(7) = 3 since there are exactly 2^2 = 4 twin prime pairs not exceeding 3*7 = 21 (namely, {3, 5}, {5, 7}, {11, 13} and {17, 19}), but the number of twin prime pairs not exceeding 1*7 and the number of twin prime pairs not exceeding 2*7 are 2 and 3 respectively, none of which is a square.
		

Crossrefs

Programs

  • Mathematica
    tw[0]:=0
    tw[n_]:=tw[n-1]+If[PrimeQ[Prime[n]+2],1,0]
    SQ[n_]:=IntegerQ[Sqrt[tw[PrimePi[n]]]]
    Do[Do[If[SQ[k*n-2],Print[n," ",k];Goto[aa]],{k,1,n}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]
Showing 1-10 of 12 results. Next