OFFSET
1,1
COMMENTS
Sequence of corresponding m's begins: 9, 105, 135, 525, 2100, 1890, 225, 3417, 14994, 23445, 15192, 26334, 19635, 40467, 1764, 142725, 171054, 382755, 366795, 998865, 8100, ...
Conjectures:
1. The sequence is infinite.
2. There is only one m for each n (this is true for n < 2^26).
EXAMPLE
The following three are triangular numbers:
271-135 = 136,
271+135 = 406,
271*135 = 36585.
So 271 is in the sequence.
MATHEMATICA
pnmQ[n_]:=Length[Select[Table[{n-m, n+m, n m}, {m, n}], AllTrue[ Sqrt[ 8#+1], OddQ]&]]>0; Select[Range[20000], pnmQ] (* The program generates the first nine terms of the sequence. To generate more, increase the Range constant, but the program may take a long time to run. *) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 08 2021 *)
PROG
(Java)
public class A224935 {
public static long sr0 = 1;
public static boolean[] isTriang = new boolean[5 << 25];
public static boolean isTriangular(long a) {
long b, s, sr = sr0;
while (a < sr*(sr+1)/2) sr>>=1;
b = sr>>1;
while (b!=0) {
s = sr+b;
if (a >= s*(s+1)/2) sr = s;
b>>=1;
}
if (a == sr*(sr+1)/2) return true;
return false;
}
public static void main (String[] args) {
for (int i=0; i*(i+1) < 5 << 26; ++i) isTriang[i*(i+1)/2] = true;
for (long a = 0; a < 5 << 24; ++a) {
long s = 1L << 30, tn = 0, count = 0, lastTn = 0;
while (a*a < s*(s+1)/2) s>>=1;
sr0 = s;
for (long i = 1; tn < a; ++i) {
long b = a - tn;
if (isTriang[(int)(a*2-tn)])
if (isTriangular(a*(a-tn))) { ++count; lastTn = tn; }
tn += i;
}
if (count>0) System.out.printf("\n%d %d %d ", a, a-lastTn, count);
if ((a & 0x3fff)==0) System.out.printf(".");
}
}
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Apr 20 2013
STATUS
approved