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!)
A003056 n appears n+1 times. Also the array A(n,k) = n+k (n >= 0, k >= 0) read by antidiagonals. Also inverse of triangular numbers. 349

%I #201 Apr 24 2024 12:57:04

%S 0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,

%T 7,7,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,

%U 10,10,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12

%N n appears n+1 times. Also the array A(n,k) = n+k (n >= 0, k >= 0) read by antidiagonals. Also inverse of triangular numbers.

%C Also triangle read by rows: T(n,k), n>=0, k>=0, in which n appears n+1 times in row n. - _Omar E. Pol_, Jul 15 2012

%C The PARI functions t1, t2 can be used to read a triangular array T(n,k) (n >= 0, 0 <= k <= n-1) by rows from left to right: n -> T(t1(n), t2(n)). - _Michael Somos_, Aug 23 2002

%C Number of terms in partition of n with greatest number of distinct terms. - _Amarnath Murthy_, May 20 2001

%C Summation table for (x+y) = (0+0),(0+1),(1+0),(0+2),(1+1),(2+0), ...

%C Also the number of triangular numbers less than or equal to n, not counting 0 as triangular. - _Robert G. Wilson v_, Oct 21 2005

%C Permutation of A116939: a(n) = A116939(A116941(n)), a(A116942(n)) = A116939(n). - _Reinhard Zumkeller_, Feb 27 2006

%C Maximal size of partitions of n into distinct parts, see A000009. - _Reinhard Zumkeller_, Jun 13 2009

%C Also number of digits of A000462(n). - _Reinhard Zumkeller_, Mar 27 2011

%C Also the maximum number of 1's contained in the list of hook-lengths of a partition of n. E.g., a(4)=2 because hooks of partitions of n=4 comprise {4,3,2,1}, {4,2,1,1}, {3,2,2,1}, {4,1,2,1}, {4,3,2,1} where the number of 1's in each is 1,2,1,2,1. Hence the maximum is 2. - _T. Amdeberhan_, Jun 03 2012

%C Fan, Yang, and Yu (2012) prove a conjecture of Amdeberhan on the generating function of a(n). - _Jonathan Sondow_, Dec 17 2012

%C Also the number of partitions of n into distinct parts p such that max(p) - min(p) <= length(p). - _Clark Kimberling_, Apr 18 2014

%C Also the maximum number of occurrences of any single value among the previous terms. - _Ivan Neretin_, Sep 20 2015

%C Where records occur gives A000217. - _Omar E. Pol_, Nov 05 2015

%C Also number of peaks in the largest Dyck path of the symmetric representation of sigma(n), n >= 1. Cf. A237593. - _Omar E. Pol_, Dec 19 2016

%H Vincenzo Librandi, <a href="/A003056/b003056.txt">Table of n, a(n) for n = 0..10000</a>

%H Anna R. B. Fan, Harold R. L. Yang, and Rebecca T. Yu, <a href="http://arxiv.org/abs/1212.3505">On the Maximum Number of k-Hooks of Partitions of n</a>, arXiv:1212.3505 [math.CO], 2012.

%H Michael Somos, <a href="/A073189/a073189.txt">Sequences used for indexing triangular or square arrays</a>.

%F a(n) = floor((sqrt(1+8*n)-1)/2). - _Antti Karttunen_

%F a(n) = floor(-1/2 + sqrt(2*n+b)) with 1/4 <= b < 9/4 or a(n) = floor((sqrt(8*n+b)-1)/2) with 1 <= b < 9. - Michael A. Childers (childers_moof(AT)yahoo.com), Nov 11 2001

%F a(n) = f(n,0) with f(n,k) = k if n <= k, otherwise f(n-k-1, k+1). - _Reinhard Zumkeller_, May 23 2009

%F a(n) = 2*n + 1 - A001614(n+1) = n + 1 - A122797(n+1). - _Reinhard Zumkeller_, Feb 12 2012

%F a(n) = k if k*(k+1)/2 <= n < (k+1)*(k+2)/2. - _Jonathan Sondow_, Dec 17 2012

%F G.f.: (1-x)^(-1)*Sum_{n>=1} x^(n*(n+1)/2) = (Theta_2(0,x^(1/2)) - 2*x^(1/8))/(2*x^(1/8)*(1-x)) where Theta_2 is a Jacobi Theta function. - _Robert Israel_, May 21 2015

%F a(n) = floor((A000196(1+8*n)-1)/2). - _Pontus von Brömssen_, Dec 10 2018

%F a(n+1) = a(n-a(n)) + 1, a(0) = 0. - _Rok Cestnik_, Dec 29 2020

%F a(n) = A001227(n) + A238005(n), n >= 1. - _Omar E. Pol_, Sep 30 2021

%F Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2 (cf. A016655). - _Amiram Eldar_, Sep 24 2023

%F G.f. as array: (x + y - 2*x*y)/((1 - x)^2*(1 - y)^2). - _Stefano Spezia_, Dec 20 2023 [corrected by _Stefano Spezia_, Apr 22 2024]

%e G.f. = x + x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 3*x^8 + 3*x^9 + 4*x^10 + ...

%e As triangle, the sequence starts

%e 0;

%e 1, 1;

%e 2, 2, 2;

%e 3, 3, 3, 3;

%e 4, 4, 4, 4, 4;

%e 5, 5, 5, 5, 5, 5;

%e 6, 6, 6, 6, 6, 6, 6;

%e 7, 7, 7, 7, 7, 7, 7, 7;

%e 8, 8, 8, 8, 8, 8, 8, 8, 8;

%e ...

%p A003056 := (n,k) -> n: # _Peter Luschny_, Oct 29 2011

%p a := [ 0 ]: for i from 1 to 15 do for j from 1 to i+1 do a := [ op(a),i ]; od: od: a;

%p A003056 := proc(n)

%p floor((sqrt(1+8*n)-1)/2) ;

%p end proc: # _R. J. Mathar_, Jul 10 2015

%t f[n_] := Floor[(Sqrt[1 + 8n] - 1)/2]; Table[ f[n], {n, 0, 87}] (* _Robert G. Wilson v_, Oct 21 2005 *)

%t Table[x, {x, 0, 13}, {y, 0, x}] // Flatten

%t T[ n_, k_] := If[ n >= k >= 0, n, 0]; (* _Michael Somos_, Dec 22 2016 *)

%t Flatten[Table[PadRight[{},n+1,n],{n,0,12}]] (* _Harvey P. Dale_, Jul 03 2021 *)

%o (PARI) A003056(n)=(sqrtint(8*n+1)-1)\2 \\ _M. F. Hasler_, Oct 08 2011

%o (PARI) t1(n)=floor(-1/2+sqrt(2+2*n)) /* A003056 */

%o (PARI) t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)),2) /* A002262 */

%o (Haskell)

%o a003056 = floor . (/ 2) . (subtract 1) .

%o sqrt . (+ 1) . (* 8) . fromIntegral

%o a003056_row n = replicate (n + 1) n

%o a003056_tabl = map a003056_row [0..]

%o a003056_list = concat $ a003056_tabl

%o -- _Reinhard Zumkeller_, Aug 02 2014, Oct 17 2010

%o (Magma) [Floor((Sqrt(1+8*n)-1)/2): n in [0..80]]; // _Vincenzo Librandi_, Oct 23 2011

%o (Python)

%o from math import isqrt

%o def A003056(n): return (k:=isqrt(m:=n+1<<1))+int((m<<2)>(k<<2)*(k+1)+1)-1 # _Chai Wah Wu_, Jul 26 2022

%Y a(n) = A002024(n+1)-1.

%Y Cf. A000196, A000217, A000462, A001227, A001462, A001614, A004247 (multiplication table), A006463 (partial sums), A016655, A050600, A050602, A048645, A122797, A131507, A238005.

%Y Partial sums of A073424.

%Y Cf. A116939, A116941, A116942,

%K nonn,easy,nice,tabl,changed

%O 0,4

%A _N. J. A. Sloane_

%E Definition clarified by _N. J. A. Sloane_, Dec 08 2020

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 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)