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.

A237413 Number of ways to write n = k + m with k > 0 and m > 0 such that p(k)^2 - 2, p(m)^2 - 2 and p(p(m))^2 - 2 are all prime, where p(j) denotes the j-th prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 07 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This conjecture was motivated by the "Super Twin Prime Conjecture".
See A237414 for primes q with q^2 - 2 and p(q)^2 - 2 both prime.

Examples

			a(7) = 1 since 7 = 6 + 1 with p(6)^2 - 2 = 13^2 - 2 = 167, p(1)^2 - 2 = 2^2 - 2 = 2 and p(p(1))^2 - 2 = p(2)^2 - 2 = 3^2 - 2 = 7 are all prime.
a(516) = 1 since 516 = 473 + 43 with p(473)^2 - 2 = 3359^2 - 2 = 11282879, p(43)^2 - 2 = 191^2 - 2 = 36479 and p(p(43))^2 - 2 = p(191)^2 - 2 = 1153^2 - 2 = 1329407 all prime.
		

Crossrefs

Programs

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

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