OFFSET
1,1
COMMENTS
Conjecture: The sequence contains infinitely many terms. In other words, there are infinitely many positive integers n such that {prime(n)-1, prime(n), prime(n)+1} is a "sandwich of the first kind" (A210479) and {n-1, n, n+1} is a "sandwich of the second kind" (A258838).
This implies that there are infinitely many sandwiches of the first kind and also there are infinitely many sandwiches of the second kind.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Sandwiches with primes and practical numbers, a message to Number Theory List, Jan. 13, 2013.
Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
EXAMPLE
a(1) = 4 since 4 is paractical with 4-1 and 4+1 twin prime, and prime(4)-1 = 6 and prime(4)+1 = 8 are both practical.
a(2) = 522 since 522 is paractical with 522-1 and 522+1 twin prime, and prime(522)-1 = 3738 and prime(522)+1 = 3740 are both practical.
MATHEMATICA
f[n_]:=FactorInteger[n]
Pow[n_, i_]:=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
Con[n_]:=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]
pr[n_]:=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
n=0; Do[If[PrimeQ[Prime[k]+2]&&pr[Prime[k]+1]&&pr[Prime[Prime[k]+1]-1]&&pr[Prime[Prime[k]+1]+1], n=n+1; Print[n, " ", Prime[k]+1]], {k, 1, 24962}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jul 12 2015
STATUS
approved