The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350550 a(n) is the least prime q such that there exists a prime p with p^2 + n = (n+1)*q^2, or 0 if there is no such q. 2
5, 3, 0, 5, 3, 5, 2, 0, 13, 7, 5, 2911343369048029930623841, 11, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(16) > 10^1000 if it is not 0.
If it is not 0, then a(16) = A199772(k) where k is the smallest index such that both q = A199772(k) and p = A199773(k) are prime. If such an index exists, a(16) > 10^10000. - Jon E. Schoenfield, Jan 11 2022
LINKS
Robert Israel, Table of n, a(n) for n = 1..179 with conjectured 0 values as -1.
FORMULA
A350544(n)^2 + n = (n+1)*a(n)^2 if a(n) > 0.
EXAMPLE
a(3) = 0 as the only positive integer solution of p^2 + 3 = 4*q^2 is p=1, q=1, and 1 is not prime.
a(4) = 5 as 11^2 + 4 = 125 = (4+1)*5^2 with 11 and 5 prime.
MAPLE
# Returned values of -1 indicate that either a(n) = 0 or a(n) > 10^1000.
f:= proc(n) local m, x, y, S, cf, i, c, a, b, A, M, Sp;
m:= n+1;
if issqr(m) then
S:= [isolve(x^2+n=m*y^2)];
S:= map(t -> subs(t, [x, y]), S);
S:= select(t -> andmap(isprime, t), S);
if S = [] then return 0
else return min(map(t -> t[2], S))
fi;
fi;
cf:= NumberTheory:-ContinuedFraction(sqrt(m));
for i from 1 do
c:= Convergent(cf, i);
if numer(c)^2 - m*denom(c)^2 = 1 then break fi
od;
a:= numer(c); b:= denom(c);
A:= <<a, b>|<m*b, a>>;
M:= floor(sqrt(n)*(1+sqrt(a+b*sqrt(m)))/(2*sqrt(m)));
S:= select(t -> issqr(m*t^2-m+1), [$0..M]);
S:= select(t -> igcd(t[1], t[2])=1, map(t -> <sqrt(m*t^2-m+1), t>, S));
S:= map(t -> (t, <-t[1], t[2]>), S);
if nops(S) = 0 then return 0 fi;
for i from 0 do
Sp:= select(t -> isprime(t[1]) and isprime(t[2]), S);
if nops(Sp)>0 then return min(map(t -> t[2], Sp)) fi;
S:= map(t -> A.t, S);
if min(map(t -> t[2], S))>10^1000 then break fi;
od;
-1
end proc:
map(f, [$1..20]);
CROSSREFS
Sequence in context: A238008 A193547 A144481 * A232225 A365075 A200126
KEYWORD
nonn,hard,more
AUTHOR
J. M. Bergot and Robert Israel, Jan 04 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 01:38 EDT 2024. Contains 372768 sequences. (Running on oeis4.)