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

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

A237975 Least nonnegative integer m such that for some k = 1, ..., n there are exactly m^2 twin prime pairs not exceeding k*n.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 16 2014

Keywords

Comments

The conjecture in A237840 implies that a(n) exists for any n > 0.

Examples

			a(7) = 2 since there are exactly 2^2 twin prime pairs not exceeding 3*7  = 21 (namely, {3, 5}, {5, 7}, {11, 13} and{17,19}), and the number of twin prime pairs not exceeding 1*7 or 2*7 is not a square.
a(18055) = 675 since there are exactly 675^2 = 455625 twin prime pairs not exceeding 5758*18055.
		

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," ",Sqrt[tw[PrimePi[k*n-2]]]];Goto[aa]],{k,1,n}];Print[n," ",0];Label[aa];Continue,{n,1,100}]
Showing 1-2 of 2 results.