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.

A238576 Number of odd primes p < 2*n with prime(n*(p-1)/2)^2 - 2 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 7, 23, 61, 73.
(ii) For any integer n > 1, there is an odd prime p < 2*n with prime(n*(p+1)/2)^2 - 2 prime.
Clearly, either part of the conjecture implies that there are infinitely many primes of the form p^2 - 2 with p prime.

Examples

			a(2) = 1 since 2 and prime(2*(3-1)/2)^2 - 2 = 3^2 - 2 = 7 are both prime.
a(7) = 1 since 5 and prime(7*(5-1)/2)^2 - 2 = 43^2 - 2 = 1847 are both prime.
a(23) = 1 since 29 and prime(23*(29-1)/2)^2 - 2 = 2137^2 - 2 = 4566767 are both prime.
a(61) = 1 since 43 and prime(61*(43-1)/2)^2 - 2 = 10463^2 - 2 = 109474367 are both prime.
a(73) = 1 since 7 and prime(73*(7-1)/2)^2 - 2 = 1367^2 - 2 = 1868687 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_,n_]:=PrimeQ[Prime[(Prime[k]-1)/2*n]^2-2]
    a[n_]:=Sum[If[p[k,n],1,0],{k,2,PrimePi[2n-1]}]
    Table[a[n],{n,1,80}]

A259731 Least positive integer k such that prime(k*n)-1 is a square, or 0 if no such k exists.

Original entry on oeis.org

1, 6, 1, 3, 9, 2, 1, 181, 5, 459, 5, 1, 2, 18, 3, 421, 35, 14, 183, 3274, 12, 143, 501, 422, 1407, 1, 170, 9, 55, 153, 2044, 426, 274, 74, 17, 7, 68, 452, 1084, 1637, 3, 6, 43, 1141, 1, 8218, 1860, 211, 42, 1582, 53, 813, 2, 85, 1, 5714, 61, 1379, 296, 1457, 57, 1022, 4, 213, 1331, 137, 525, 37, 167, 1130
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 04 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is stronger than the well-known conjecture that there are infinitely many primes of the form x^2+1 with x an integer.

Examples

			a(1) = 1 since prime(1*1)-1 = 2-1 = 1^2.
a(2) = 6 since prime(6*2)-1 = 37-1 = 6^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
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[k=0;Label[bb];k=k+1;If[SQ[Prime[k*n]-1],Goto[aa],Goto[bb]];Label[aa];Print[n," ",k];Continue,{n,1,70}]
    lpi[n_]:=Module[{k=1},While[!IntegerQ[Sqrt[Prime[k*n]-1]],k++];k]; Array[ lpi,70] (* Harvey P. Dale, Apr 18 2019 *)

A238878 a(n) = |{0 < k <= n: prime(prime(k)) - prime(k) + 1 and prime(prime(k*n)) - prime(k*n) + 1 are both prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 4, 5, 19, 77.
(ii) For any integer n > 0, there is a number k among 1, ..., n such that 2*k + 1 and prime(prime(k^2*n)) - prime(k^2*n) + 1 are both prime.

Examples

			a(5) = 1 since prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 and prime(prime(4*5)) - prime(4*5) + 1 = prime(71) - 71 + 1 = 353 - 70 = 283 are both prime.
a(77) = 1 since prime(prime(3)) - prime(3) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 and prime(prime(3*77)) - prime(3*77) + 1 = prime(1453) - 1453 + 1 = 12143 - 1452 = 10691 are both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]-n+1]
    p[k_,n_]:=PQ[Prime[k]]&&PQ[Prime[k*n]]
    a[n_]:=Sum[If[p[k,n],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A238881 Number of odd primes p < 2*n with prime(n*(p+1)/2) + n*(p+1)/2 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5, and a(n) = 1 only for n = 2, 3, 7, 9, 23. Moreover, for any r = 1,-1 and n > 5*(2+r) there is a positive integer k < n such that 2*k+r and prime(k*n)+k*n are both prime.
(ii) If n > 1 is not equal to 13, then prime(k*n) - k*n is prime for some k = 1, ..., n.
This conjecture implies that there are infinitely many positive integers m with prime(m) + m (or prime(m) - m) prime.

Examples

			a(7) = 1 since 11 and prime(7*(11+1)/2) + 7*(11+1)/2 = prime(42) + 42 = 181 + 42 = 223 are both prime.
a(23) = 1 since 7 and prime(23*(7+1)/2) + 23*(7+1)/2 = prime(92) + 92 = 479 + 92 = 571 are 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. (See Conjecture 3.21(i) and note that the typo 2k+1 there should be 2k-1.)

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]+n]
    p[k_,n_]:=PQ[(Prime[k]+1)/2*n]
    a[n_]:=Sum[If[p[k,n],1,0],{k,2,PrimePi[2n-1]}]
    Table[a[n],{n,1,80}]
  • PARI
    a(n) = {my(nb = 0); forprime(p=3, 2*n, if (isprime(prime(n*(p+1)/2) + n*(p+1)/2), nb++);); nb;} \\ Michel Marcus, Sep 21 2015

A238890 a(n) = |{0 < k <= n: prime(k*n) - pi(k*n) is prime}|, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 for no n > 28.
(ii) If n > 7 is not equal to 34, then prime(k*n) + pi(k*n) is prime for some k = 1, ..., n.
The conjecture implies that there are infinitely many primes p with p - pi(pi(p)) (or p + pi(pi(p))) prime.

Examples

			a(5) = 1 since prime(3*5) - pi(3*5) = 47 - 6 = 41 is prime.
a(28) = 1 since prime(18*28) - pi(18*28) = prime(504) - pi(504) = 3607 - 96 = 3511 is prime.
		

Crossrefs

Programs

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

A239579 a(n) = |{0 < k <= n: prime(prime(prime(k*n))) - 2 is prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 21 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 9.
(ii) If n > 0 is not equal to 5, then prime(prime(k*n)) + 2 is prime for some k = 1, ..., n.

Examples

			a(3) = 1 since prime(prime(prime(1*3))) - 2 = prime(prime(5)) - 2 = prime(11) - 2 = 31 - 2 = 29 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[Prime[Prime[Prime[n]]]-2]
    a[n_]:=Sum[If[p[k*n],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]
Showing 1-6 of 6 results.