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!)
A239071 Numbers k such that k+x+y is a triangular number (A000217), where x and y are the two triangular numbers nearest to k. 2
0, 2, 6, 11, 19, 39, 53, 84, 104, 122, 146, 195, 225, 285, 321, 352, 392, 434, 470, 516, 605, 657, 757, 815, 864, 926, 990, 1044, 1112, 1241, 1315, 1455, 1535, 1602, 1686, 1844, 1934, 2103, 2199, 2279, 2379, 2481, 2566, 2672, 2870, 2982, 3191, 3309, 3407, 3529 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
If k is a triangular number then y=k.
The sequence of terms that are triangular numbers begins: 0, 6, 990, 189420, 36709596, 7120958130, 1381422007290, 267988648725336, 51988415041636920, 10085484510081574110.
Those are the triangular numbers with indices from A011916. - Ivan Neretin, May 31 2015
LINKS
EXAMPLE
The two triangular numbers nearest to 11 are 10 and 15. Because 10+11+15=36 is a triangular number, 11 is in the sequence.
MATHEMATICA
Module[{nn=3600, trnos}, trnos=Accumulate[Range[100]]; Join[{0}, Select[ Range[ nn], OddQ[Sqrt[8(Total[Nearest[trnos, #, 2]]+#) +1]]&]]] (* Harvey P. Dale, Dec 19 2020 *)
PROG
(Python)
def isqrt(a):
sr = 1 << (int.bit_length(int(a)) >> 1)
while a < sr*sr: sr>>=1
b = sr>>1
while b:
s = sr + b
if a >= s*s: sr = s
b>>=1
return sr
def isTriang(x):
x+=x
r = isqrt(x)
return r*(r+1)==x
print('0', end=', ')
for n in range(777):
tn = n*(n+1)//2
tn1 = (n+1)*(n+2)//2
for t in range(tn+1, tn1+1):
if isTriang(tn+t+tn1): print(str(t), end=', ')
(PARI) isok(k) = {my(x = k-1); while (! ispolygonal(x, 3), x--); my(y = k); while (! ispolygonal(y, 3), y++); ispolygonal(k+x+y, 3); } \\ Michel Marcus, May 31 2015
CROSSREFS
Sequence in context: A048204 A259411 A058760 * A085573 A171516 A081691
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 10 2014
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 April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)