login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057944 Largest triangular number less than or equal to n; write m-th triangular number m+1 times. 9
0, 1, 1, 3, 3, 3, 6, 6, 6, 6, 10, 10, 10, 10, 10, 15, 15, 15, 15, 15, 15, 21, 21, 21, 21, 21, 21, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 36, 36, 36, 36, 36, 36, 36, 36, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 66, 66, 66, 66, 66, 66 (list; table; graph; refs; listen; history; internal format)
OFFSET

0,4

LINKS

Reinhard Zumkeller, Rows n=0..100 of triangle, flattened

FORMULA

a(n) =floor((sqrt(1+8*n)-1)/2)*floor((sqrt(1+8*n)+1)/2)/2 =(trinv(n)*(trinv(n)-1))/2 =A000217(A003056(n)) =n-A002262(n)

EXAMPLE

a(35)=28 since 28 and 36 are successive triangular numbers and 28<=35<36

MAPLE

A057944 := proc(n)

        k := (-1+sqrt(1+8*n))/2 ;

        k := floor(k) ;

        k*(k+1)/2 ;

end proc; # R. J. Mathar, Nov 05 2011

MATHEMATICA

f[n_] := Block[{a = Floor@ Sqrt[1 + 8 n]}, Floor[(a - 1)/2]*Floor[(a + 1)/2]/2]; Array[f, 72, 0]

t0=0; t1=1; k=1; Table[If[n < t1, t0, k++; t0=t1; t1=t1+k; t0], {n, 0, 72}]

PROG

(Haskell)

a057944 n = a057944_list !! n          -- common flat access

a057944_list = concat a057944_tabl

a057944' n k = a057944_tabl !! n !! k  -- access when seen as a triangle

a057944_row n = a057944_tabl !! n

a057944_tabl = zipWith ($) (map replicate [1..]) a000217_list

-- Reinhard Zumkeller, Feb 03 2012

CROSSREFS

Cf. A000217, A003056, A003056, A056944, A057945.

Cf. A127739.

Sequence in context: A108581 A073080 A171601 * A080607 A013322 A177821

Adjacent sequences:  A057941 A057942 A057943 * A057945 A057946 A057947

KEYWORD

easy,nonn,tabl,changed

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Oct 05 2000

EXTENSIONS

Keyword tabl added by Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Feb 03 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 19:23 EST 2012. Contains 205945 sequences.