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

A261281 Least positive integer k with prime(k)^2-2 and prime(prime(k))^2-2 both prime such that prime(k*n)^2-2 and prime(prime(k*n))^2-2 are all prime.

Original entry on oeis.org

1, 1, 319, 134, 34, 62, 2, 536, 5215, 15, 3965, 2168, 34, 1, 1, 737, 2, 7075, 3699, 419, 132, 372, 14, 2, 34, 2, 52, 1, 668, 36561, 2, 48, 1239, 1, 401, 1613, 1646, 2472, 43, 31361, 134, 1103, 1, 5374, 6201, 466, 1, 1, 2118, 2, 1646, 1, 1343, 856, 28, 1868, 10324, 360, 2845, 6571, 65, 1, 419, 43, 1, 2, 2, 1, 889, 202
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 14 2015

Keywords

Comments

Conjecture: a(n) exists for any n > 0. In general, any positive rational number r can be written as m/n with m and n in the set {k>0: prime(k)^2-2 and prime(prime(k))^2-2 are both prime}.
This implies that the sequence A237414 has infinitely many terms.

Examples

			a(2) = 1 since prime(1)^2-2 = 2^2-2 = 2, prime(prime(1))^2-2 = prime(2)^2-2 = 3^2-2 = 7, prime(1*2)^2-2 = 3^2-2 = 7, and prime(prime(1*2))^2-2 = prime(3)^2-2 = 5^2-2 = 23 are all prime.
a(3) = 319 since prime(319)^2-2 = 2113^2-2 = 4464767, prime(prime(319))^2-2 = prime(2113)^2-2 = 18443^2-2 = 340144247, prime(319*3)^2-2 = 7547^2-2 = 56957207, and prime(prime(3*319))^2-2 = prime(7547)^2-2 = 76757^2-2 = 5891637047 are all 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
    f[n_]:=Prime[n]
    q[n_]:=PrimeQ[f[n]^2-2]&&PrimeQ[f[f[n]]^2-2]
    Do[k=0;Label[bb];k=k+1;If[q[k]&&q[k*n],Goto[aa],Goto[bb]];Label[aa];Print[n," ", k];Continue,{n,1,70}]
  • PARI
    a(n) = my(k=1); while (!isprime(prime(k)^2-2) || !isprime(prime(prime(k))^2-2) || !isprime(prime(k*n)^2-2) || !isprime(prime(prime(k*n))^2-2), k++); k; \\ Michel Marcus, Aug 14 2015

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

A238701 Number of primes p < n with q = floor((n-p)/4) and q^2 - 2 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n with q = floor((n-p)/m) and q^2 - 2 both prime.
In the case m = 1, this is a refinement of Goldbach's conjecture. In the case m = 2, this is stronger than Lemoine's conjecture (cf. A046927). The conjecture for m > 2 seems completely new. We view the conjecture as a natural extension of Goldbach's conjecture.

Examples

			a(11) = 2 since 2, floor((11-2)/4)= 2 and 2^2 - 2 are all prime, and 3, floor((11-3)/4) = 2 and 2^2 - 2 are all prime.
		

Crossrefs

Programs

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

A261354 Primes p such that prime(p)^2 - 2 = prime(q) for some prime q.

Original entry on oeis.org

31, 191, 541, 809, 1153, 1301, 2221, 3037, 3847, 4049, 4159, 5441, 8243, 10177, 12277, 13681, 14783, 15619, 17903, 19463, 20897, 22697, 24517, 25163, 25847, 25849, 26633, 26647, 27329, 27407, 28051, 32653, 35059, 35747, 36341, 36527, 37369, 37811, 38609, 40949, 42737, 46679, 51061, 51607, 54443, 54679, 56113, 57637, 60887, 61493
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 15 2015

Keywords

Comments

Conjecture: The sequence has infinitely many terms. In general, for any integers a,b,c with a>0 and gcd(a,b,c)=1, if b^2-4*a*c is not a square, a+b+c is odd, and gcd(b,a+c) is not divisible by 3, then there are infinitely many prime pairs {p,q} such that a*prime(p)^2+b*prime(p)+c = prime(q).

Examples

			a(1) = 31 since 31 is a prime, and prime(31)^2-2 = 127^2-2 = 16127 = prime(1877) with 1877 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
    PQ[n_]:=PrimeQ[n]&&PrimeQ[PrimePi[n]]
    f[k_]:=Prime[Prime[k]]^2-2
    n=0;Do[If[PQ[f[k]],n=n+1;Print[n," ",Prime[k]]],{k,1,6200}]

A237414 Primes p with p^2 - 2 and prime(p)^2 - 2 both prime.

Original entry on oeis.org

2, 3, 43, 47, 107, 139, 191, 211, 223, 239, 293, 313, 337, 541, 743, 757, 863, 1013, 1153, 1231, 1619, 2113, 2137, 2287, 2297, 2423, 2543, 2729, 2749, 2897, 3079, 3089, 3313, 3863, 3947, 4241, 4271, 4583, 4649, 4993, 5581, 6571, 6637, 6911, 7547, 8629, 8849, 8867, 9049, 9661
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 07 2014

Keywords

Comments

According to the conjecture in A237413, this sequence should have infinitely many terms.

Examples

			a(1) = 2 since 2^2 - 2 = 2 and prime(2)^2 - 2 = 3^2 - 2 = 7 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n^2-2]
    n=0;Do[If[p[Prime[k]]&&p[Prime[Prime[k]]],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]
    Select[Prime[Range[1200]],AllTrue[{#^2-2,Prime[#]^2-2},PrimeQ]&] (* Harvey P. Dale, Apr 06 2022 *)

A238756 Number of ordered ways to write n = k + m (k > 0 and m > 0) such that 2*k + 1, prime(prime(k)) - prime(k) + 1 and prime(prime(m)) - prime(m) + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
We have verified this for n up to 10^7.
The conjecture suggests that there are infinitely many primes p with 2*pi(p) + 1 and prime(p) - p + 1 both prime.

Examples

			a(6) = 2 since 6 = 2 + 4 with 2*2 + 1 = 5, prime(prime(2)) - prime(2) + 1 = prime(3) - 3 + 1 = 3 and prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 all prime, and 6 = 3 + 3 with 2*3 + 1 = 7 and prime(prime(3)) - prime(3) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 both prime.
		

Crossrefs

Programs

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

A253257 Least positive integer k such that prime(k*n) has the form p^2 - 2 with p prime, or 0 if no such k exists.

Original entry on oeis.org

1, 2, 3, 1, 3, 12, 47, 9, 1, 100, 502, 6, 3, 1817, 1, 362, 3141, 4, 104, 50, 14157, 251, 222, 3, 27, 76, 25, 5423, 416, 73, 28764, 181, 488, 3860, 1249, 2, 138, 52, 1, 25, 8734, 65719, 7089, 214, 15, 111, 7, 990, 6254, 20, 1047, 38, 367, 880, 435, 3712, 3287, 208, 5194, 598
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 05 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is stronger than the conjecture that there are infinitely many primes of the form p^2-2 with p prime.
I also conjecture that for any positive integer n there is a positive integer k such that prime(k*n) has the form 2*p^2-1 (or 4*p^2+1, or p^2+p+1) with p prime.

Examples

			a(1) = 1 since prime(1*1) = 2 = 2^2-2 with 2 prime.
a(6) = 12 since prime(12*6) = 359 = 19^2-2 with 19 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
    SQ[n_]:=IntegerQ[Sqrt[n]]&&PrimeQ[Sqrt[n]]
    Do[k=0;Label[bb];k=k+1;If[SQ[Prime[k*n]+2],Goto[aa],Goto[bb]];Label[aa];Print[n, " ", k];Continue,{n,1,60}]
  • Perl
    use ntheory ":all"; use Math::Prime::Util::PrimeArray qw/$probj/; my %v; forprimes { undef $v{$*$-2} } 4e7; for my $n (1..800) { my $k=1; $k++ until exists $v{$probj->FETCH($k*$n-1)}; say "$n $k"; } # Dana Jacobsen, Dec 15 2015
Showing 1-7 of 7 results.