login
A067722
Least positive integer k such that n*(n + k) is a perfect square.
4
1, 3, 6, 9, 5, 15, 18, 21, 10, 7, 30, 33, 15, 39, 42, 45, 9, 51, 14, 57, 25, 63, 66, 69, 30, 11, 78, 21, 35, 87, 90, 93, 18, 99, 102, 105, 13, 111, 114, 117, 50, 123, 126, 129, 55, 35, 138, 141, 27, 15, 22, 153, 65, 159, 42, 165, 70, 171, 174, 177, 75, 183, 186, 49, 17
OFFSET
0,2
EXAMPLE
a(8) = 10 because 8*(8+10) = 144 = 12^2.
MATHEMATICA
Do[k = 1; While[ !IntegerQ[ Sqrt[ k (k + n)]], k++ ]; Print[k], {n, 0, 75} ]
PROG
(PARI) a(n) = my(k=1); while(!issquare(n*(n+k)), k++); k; \\ Michel Marcus, Feb 05 2015
(Haskell)
a067722 n = head [k | k <- [1..], a010052 (n * (n + k)) == 1]
-- Reinhard Zumkeller, Feb 07 2015
CROSSREFS
Cf. A010052.
Sequence in context: A227929 A019700 A151862 * A049341 A321943 A351189
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 05 2002
STATUS
approved