Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #67 Oct 12 2024 14:58:14
%S 15,27,32,35,36,39,51,55,60,63,64,75,84,87,91,95,96,99,100,108,111,
%T 115,119,123,128,132,135,140,143,144,147,155,156,159,160,171,175,180,
%U 183,187,192,195,196,203,204,207,215,219,220,224,228,231,235,240,243,247,252,255
%N Numbers that can be written in more than one way in the form (j+2k)^2-(j+k)^2-j^2 with j,k>0.
%H Project Euler, <a href="https://projecteuler.net/problem=135">Problem 135: Same Differences</a>.
%e 27 is a term since (6+2*3)^2 - (6+3)^2 - 6^2 = (20+2*7)^2 - (20+7)^2 - 20^2 = 27.
%o (Python)
%o from sympy import divisors
%o def isok(n):
%o s = 0
%o for d in divisors(n):
%o t = n // d + d
%o if ((q:=t >> 2) << 2) == t and q < d:
%o s += 1
%o return s > 1
%o print([n for n in range(1,256) if isok(n)])
%Y Cf. A000290, A027750, A000005.
%K nonn
%O 1,1
%A _DarĂo Clavijo_, Jul 12 2023