login
A395626
Numbers x*y such that |x-y| is a square, with nonnegative integers x and y.
2
0, 1, 2, 4, 5, 6, 9, 10, 12, 16, 17, 20, 21, 22, 25, 26, 30, 32, 36, 37, 42, 45, 49, 50, 52, 54, 56, 57, 60, 64, 65, 70, 72, 76, 77, 80, 81, 82, 84, 90, 96, 100, 101, 102, 105, 110, 112, 116, 117, 121, 122, 132, 136, 140, 144, 145, 150, 156, 160, 161, 162, 165, 166
OFFSET
1,3
COMMENTS
Contains A000290 (the squares) and A000290 + 1.
PROG
(PARI) select( {is_A395626(n)=fordiv(n+=!n, d, d*d>n&&break; issquare(n/d-d)&&return(1))}, [0..166])
(Python)
from itertools import count, islice
from sympy import divisors
from sympy.ntheory.primetest import is_square
def A395626_gen(startvalue=0): # generator of terms >= startvalue
for k in count(max(startvalue, 0)):
if k == 0:
yield k
else:
for d in divisors(k):
if d**2>k:
break
if is_square(k//d-d):
yield k
break
A395626_list = list(islice(A395626_gen(), 30)) # Chai Wah Wu, Jun 24 2026
CROSSREFS
Cf. A000290, A218381 (same with + instead of -), A394904 (union of this and A218381), A397224.
Sequence in context: A352508 A125297 A194469 * A143072 A089648 A062861
KEYWORD
nonn,easy,new
AUTHOR
M. F. Hasler, Jun 18 2026
STATUS
approved