OFFSET
1,1
COMMENTS
Conjecture: No term is zero.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 5 since A001359(3) = 11, 11 and 13 are twin primes, (11 - 5^2)^2 - 5 = 191, and 191 and 193 are also twin primes.
MAPLE
a135 := [] : f := fopen("b001359.txt", READ) : while nops(a135) < 200 do l := fscanf(f, "%d %d") : if l = [] then break : else a135 := [op(a135), l[2]] : fi ; od : for n from 1 to nops(a135) do a := op(n, a135) : B := 0 : while true do srch := (a-B^2)^2-B ; if isprime(srch) and isprime(srch+2) and srch > a then printf("%d, ", B) ; break ; fi ; B := B+1 : od : od: # R. J. Mathar, Aug 06 2007
MATHEMATICA
f[p_] := Module[{b = 1}, While[(pb = (p - b^2)^2 - b) <= p || ! And @@ PrimeQ[pb + {0, 2}], b++]; b]; seq = {}; Do[If[And @@ PrimeQ[p + {0, 2}], AppendTo[seq, f[p]]], {p, 2, 3000}]; seq (* Amiram Eldar, Dec 30 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ray G. Opao, Nov 07 2004
EXTENSIONS
Corrected and extended by R. J. Mathar, Aug 06 2007
Data corrected by Amiram Eldar, Dec 30 2019
STATUS
approved