OFFSET
1,1
COMMENTS
Conjecture: The sequence contains infinitely many terms. In other words, there are infinitely many prime numbers p such that {p-1, p, p+1} and {prime(p)-1, prime(p), prime(p)+1} are both "sandwiches of the first kind" (A210479).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..2000
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) = 3 since 3 is prime with 3-1, 3+1, prime(3)-1 = 4 and prime(3)+1 = 6 all practical.
a(3) = 31 since 31 is prime with 31-1, 31+1, prime(31)-1 = 126 and prime(31)+1 = 128 all 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[pr[Prime[k]-1]&&pr[Prime[k]+1]&&pr[Prime[Prime[k]]-1]&&pr[Prime[Prime[k]]+1], n=n+1; Print[n, " ", Prime[k]]], {k, 1, 30201}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jul 13 2015
STATUS
approved