[go: up one dir, main page]

login
Revision History for A229909 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Triangular numbers t such that the following are three triangular numbers: x, y, x+y, where x and y are distances from t to the two nearest squares.
(history; published version)
#23 by N. J. A. Sloane at Wed Oct 16 21:21:12 EDT 2024
STATUS

proposed

approved

#22 by Robert C. Lyons at Wed Oct 16 14:08:22 EDT 2024
STATUS

editing

proposed

Discussion
Wed Oct 16
15:09
Andrew Howroyd: Rather n*(n+1)//2
Also a*(a+1)/2 should be //2 then should not need to cast to 'int'.
15:10
Andrew Howroyd: Also sr = int(math.sqrt(a)) I think can be math.isqrt(a)
#21 by Robert C. Lyons at Wed Oct 16 14:08:16 EDT 2024
PROG

for n in range(1, 1000000000L 1000000000):

tn = int(n*(n+1)/2 ) # = x+y = distance between squares

print (int(t))

if (n&0xfffff)==0: print ('.', end='')

STATUS

approved

editing

#20 by N. J. A. Sloane at Sat Dec 07 12:18:26 EST 2019
PROG

for n in xrangerange(1, 1000000000L):

Discussion
Sat Dec 07
12:18
OEIS Server: https://oeis.org/edit/global/2837
#19 by Harvey P. Dale at Sat May 30 09:41:54 EDT 2015
STATUS

editing

approved

#18 by Harvey P. Dale at Sat May 30 09:41:41 EDT 2015
MATHEMATICA

ttnQ[n_]:=Module[{s=Sqrt[n], x, y}, x=If[IntegerQ[s], n-(s-1)^2, n- Floor[ s]^2]; y=If[IntegerQ[s], (s+1)^2-n, Ceiling[s]^2-n]; AllTrue[ {Sqrt[ 8x+1], Sqrt[8y+1], Sqrt[8(x+y)+1]}, OddQ]]; Join[{1}, Select[Accumulate[ Range[10000]], ttnQ]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 30 2015 *)

STATUS

approved

editing

#17 by Alois P. Heinz at Sun Feb 09 10:51:34 EST 2014
STATUS

proposed

approved

#16 by Jon E. Schoenfield at Sun Feb 09 10:39:53 EST 2014
STATUS

editing

proposed

#15 by Jon E. Schoenfield at Sun Feb 09 10:39:40 EST 2014
COMMENTS

No more terms through 10^34. - Jon E. Schoenfield, Feb 09 2014

STATUS

approved

editing

#14 by Ralf Stephan at Wed Dec 25 02:51:21 EST 2013
STATUS

editing

approved