OFFSET
1,1
COMMENTS
Conjecture: If the condition holds, prime(n-1) and prime(n) are twin primes of the form 10k+1 and 10k+3. I.e., the last digits of the primes are 1 and 3. The 1 ending is evident in the entries here.
The conjecture is true: For p = prime(n-1) > 2 in this sequence we know that {p+1, p+3, p+5} are all even, p+6 = prime(n+1), p+5 = r^2 is a square, and p+4 = r^2-1 = (r-1)*(r+1) is composite. So p+2 = prime(n). Then p mod 10 = 1 because no prime > 5 has rightmost digit 5 and no square has rightmost digit 2. - Alois P. Heinz, Sep 07 2016
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
S. M. Ruiz, Integer then equal.
Sebastian Martin Ruiz and others, Integers then Equals, digest of 7 messages in primenumbers Yahoo group, Mar 14 - Mar 20, 2009.
FORMULA
a(n) = prime(A158460(n)-1). - R. J. Mathar, Sep 07 2016
EXAMPLE
For n = 6, prime(6-1)=11,11+5=16;prime(6+1)=17,17-1=16. So prime(6-1)=11 is the first entry in the sequence.
MATHEMATICA
Transpose[Select[Partition[Prime[Range[7400000]], 3, 1], Last[#]-First[#] == 6 && IntegerQ[Sqrt[First[#]+5]]&]][[1]] (* Harvey P. Dale, Dec 22 2013 *)
PROG
(PARI) integerequal(m, n, a, b) =
{
local(x, p1, p2);
for(x=m, n,
p1=prime(x-1);
if(issquare(p1+a),
p2=prime(x+1); if((p1+a)==(p2-b),
print(x", "p1", "prime(x))
)
)
)
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Mar 20 2009
STATUS
approved