A067721 Least number k such that k (k + n) is a perfect square, or 0 if impossible.
1, 0, 0, 1, 0, 4, 2, 9, 1, 3, 8, 25, 4, 36, 18, 1, 2, 64, 6, 81, 16, 4, 50, 121, 1, 20, 72, 9, 36, 196, 2, 225, 4, 11, 128, 1, 12, 324, 162, 13, 5, 400, 8, 441, 100, 3, 242, 529, 1, 63, 40, 17, 144, 676, 18, 9, 7, 19, 392, 841, 4, 900, 450, 1, 8, 16, 22, 1089, 256, 23, 2, 1225
Offset: 0
Keywords
Examples
a(7) = 9 because 9 (7+9) = 144 = 12^2.
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..10000 (terms 0..2000 from Carmine Suriano)
Programs
-
Mathematica
Do[k = 1; While[ !IntegerQ[ Sqrt[ k (k + n)]], k++ ]; Print[k], {n, 5, 75} ]
-
Python
from itertools import takewhile from collections import deque from sympy import divisors def A067721(n): return ((a:=next(iter(deque((d for d in takewhile(lambda d:d
>2) if n else 1 # Chai Wah Wu, Aug 21 2024
Comments