login
A274851
Smallest prime q larger than p=prime(n) such that (p+1)(q+1) is a square m^2; a(n)=0 if there is no such q.
1
11, 0, 23, 17, 47, 223, 31, 79, 53, 269, 71, 151, 167, 1583, 107, 149, 239, 557, 271, 97, 2663, 179, 2099, 359, 127, 2549, 233, 191, 439, 1823, 199, 1187, 2207, 1259, 293, 607, 631, 4099, 1049, 4349, 499, 727, 431, 6983, 3167, 241, 1907, 349, 911, 919, 1663, 1499, 337, 2267, 1031, 593, 479
OFFSET
1,1
EXAMPLE
n=1: p=2, q=11, (p+1)(q+1)=36=6^2, m=6;
a(2)=0 because there is no q > 3 such that (3+1)(q+1) is a square (because, for prime q >3, (q+1) cannot be a square);
n=3: p = 5, q = 23, (p + 1) (q + 1) = 144 = 12^2, m=12.
MATHEMATICA
Table[SelectFirst[Prime@ Range[n + 1, 10^4], IntegerQ@ Sqrt[(Prime@ n + 1) (# + 1)] &], {n, 102}] /. k_ /; MissingQ@ k -> 0 (* Michael De Vlieger, Jul 09 2016, Version 10.2 *)
CROSSREFS
Cf. A274848.
Sequence in context: A297873 A298136 A334370 * A075360 A256756 A087558
KEYWORD
nonn
AUTHOR
Zak Seidov, Jul 09 2016
STATUS
approved