The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333529 Number of triples [n,k,m] with n <= k <= m satisfying T_n + T_k = T_m, where T_i = i*(i+1)/2 are the triangular numbers. 4
0, 1, 1, 1, 2, 2, 1, 2, 3, 2, 3, 3, 2, 5, 3, 1, 4, 4, 3, 5, 5, 2, 3, 4, 4, 5, 5, 3, 6, 6, 1, 3, 5, 6, 7, 5, 2, 5, 6, 3, 6, 6, 3, 8, 9, 2, 3, 4, 6, 8, 6, 3, 6, 11, 5, 6, 5, 2, 7, 7, 2, 9, 5, 3, 11, 6, 3, 6, 11, 6, 5, 5, 2, 9, 9, 6, 11, 6, 3, 7, 7, 2, 7, 12, 6, 5, 7, 3, 10, 16, 6, 6, 5, 6, 6, 3, 4, 12, 12, 5, 6, 6, 3, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
a(n)=1 if n is in A068194. - Robert Israel, Apr 03 2020
LINKS
EXAMPLE
There is a list of all triples (including those with 0 < k < n) with n <= 16 in A309507.
MAPLE
with(numtheory):
A:=[]; M:=150; ct:=Array(0..M, 0):
for n from 1 to M do
TT:=n*(n+1);
dlis:=divisors(TT);
for d in dlis do
if (d mod 2) = 1 then e := TT/d;
mi:=min(d, e); ma:=max(d, e);
k:=(ma-mi-1)/2; m:=(ma+mi-1)/2;
# skip if k<n
if k>=n then
ct[n]:=ct[n]+1;
lprint(n, k, m);
fi;
fi;
od:
od:
[seq(ct[n], n=1..M)];
# alternative:
f:= proc(n) local t, t0, r, dmax, divs;
t:= n*(n+1);
r:= padic:-ordp(t, 2);
t0:= t/2^r;
dmax:= floor((sqrt(8*t+1)-1)/2-n);
divs:= numtheory:-divisors(t0);
nops(select(`<=`, divs, dmax)) + nops(select(`<=`, divs, dmax/2^r))
end proc:
map(f, [$1..200]); # Robert Israel, Apr 03 2020
MATHEMATICA
T[n_] := n(n+1)/2;
r[n_] := Reduce[n <= k <= m && T[n] + T[k] == T[m], {k, m}, Integers];
a[n_] := Module[{rn = r[n], r0}, r0 = rn[[0]]; Which[r0 === Or, Length[rn], r0 === And, 1, rn === False, 0, True, Print["error ", n, " ", rn]]];
Array[a, 100] (* Jean-François Alcover, Jun 08 2020 *)
CROSSREFS
A309507 counts all triples with k>0.
Sequence in context: A219644 A193676 A029291 * A369363 A022872 A091423
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Mar 31 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 10:20 EDT 2024. Contains 372594 sequences. (Running on oeis4.)