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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 10 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) For each n > 9, there is a positive integer k < prime(n)/2 such that pi(k*n) is a triangular number.
See also A237612 for the least k > 0 with pi(k*n) a square.

Examples

			a(3) = 1 since pi(3*3) = 2^2 with 3 < prime(3) = 5.
a(6) = 2 since pi(4*6) = 3^2 with 4 < prime(6) = 13, and pi(9*6) =  4^2 with 9 < prime(6) = 13.
a(15) = 1 since pi(28*15) = 9^2 with 28 < prime(15) = 47.
a(62) = 1 since pi(68*62) = 24^2 with 68 < prime(62) = 293.
a(459) = 1 since pi(2544*459) = 301^2 with 2544 < prime(459) = 3253.
		

Crossrefs

Programs

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

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

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

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

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 19 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1.
(ii) For any integer n > 4, the sequence pi(k*n)^(1/k) (k = 1, ..., n) is strictly decreasing.
See also A238224 for a refinement of part (i) of this conjecture.

Examples

			a(5) = 3 since pi(1*5) = 3 divides both pi(3*5) = 6 and pi(5*5) = 9, and pi(2*5) = 4 divides pi(4*5) = 8.
a(7) = 1 since pi(1*7) = 4 divides pi(3*7) = 8.
		

Crossrefs

Programs

  • Mathematica
    m[k_,j_]:=Mod[PrimePi[k],PrimePi[j]]==0
    a[n_]:=Sum[If[m[k*n,j*n],1,0],{k,2,n},{j,1,k-1}]
    Do[Print[n," ",a[n]],{n,1,70}]
Showing 1-8 of 8 results.