login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A077672
a(1) = 1; for n > 1, a(n) = smallest triangular number which is n times another triangular number > 1, or -1 if no such number exists.
1
1, 6, 45, -1, 15, 36, 21, 120, -1, 210, 66, 36, 78, 210, 45, -1, 1326, 378, 190, 120, 210, 66, 1035, 4560, -1, 78, 1485, 1540, 435, 300, 465, 902496, 1485, 3570, 105, -1, 17205, 4560, 2145, 120, 861, 630, 903, 157080, 4095, 276, 9870, 41328, -1, 300, 153, 780, 5565, 1185030
OFFSET
1,2
COMMENTS
a(b^2) = -1 for b > 1 because (2*b*m + b - 1)^2 < 1 + 4*b^2*m^2 + 4*b^2*m < (2*b*m + b)^2. - Sascha Kurz, Jan 27 2003
LINKS
EXAMPLE
a(5) = 15 = 5*3, a(6) = 630 = 105*6.
MAPLE
f:= proc(n) local eq, X, Y, S, i, Si, XY, y;
if issqr(n) then return -1 fi;
eq:= n*(X^2-1)=Y^2-1;
S:= map(t -> subs(t, [X, Y]), [isolve(eq)]);
for i from 0 do
Si:= select(t -> t[1] > 3 and t[1]::odd and t[2]>0, expand(subs(_Z1=i, S)));
if Si <> [] then
XY:= Si[min[index](map(t -> t[1], Si))];
y:= (XY[2]-1)/2;
return y*(y+1)/2;
fi
od
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Aug 15 2017
MATHEMATICA
With[{s = Map[# (# + 1)/2 &, Range[10^4]]}, Table[2 Boole[n == 1] + If[IntegerQ[Sqrt@ n], -1, SelectFirst[n Rest@ s, MemberQ[s, #] &]], {n, 54}]] (* Michael De Vlieger, Aug 15 2017 *)
PROG
(PARI) isok(k, n) = {my(t = k*(k+1)/2); !(t % n) && (t/n != 1) && ispolygonal(t/n, 3); }
a(n) = {if (n == 1, return (1)); if (issquare(n), return (-1)); my(k = 1); while (!isok(k, n), k++); k*(k+1)/2; } \\ Michel Marcus, Aug 15 2017
CROSSREFS
Cf. A000217 (triangular numbers), A000290 (squares).
Sequence in context: A271963 A065783 A158460 * A119202 A367561 A286325
KEYWORD
sign
AUTHOR
Amarnath Murthy, Nov 16 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 27 2003
More terms from Michel Marcus, Aug 15 2017
STATUS
approved