|
|
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.
|
|
339
|
|
|
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, 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, 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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
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
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
Number of terms in partition of n with greatest number of distinct terms. - Amarnath Murthy, May 20 2001
Summation table for (x+y) = (0+0),(0+1),(1+0),(0+2),(1+1),(2+0), ...
Also the number of triangular numbers less than or equal to n, not counting 0 as triangular. - Robert G. Wilson v, Oct 21 2005
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
Fan, Yang, and Yu (2012) prove a conjecture of Amdeberhan on the generating function of a(n). - Jonathan Sondow, Dec 17 2012
Also the number of partitions of n into distinct parts p such that max(p) - min(p) <= length(p). - Clark Kimberling, Apr 18 2014
Also the maximum number of occurrences of any single value among the previous terms. - Ivan Neretin, Sep 20 2015
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
|
|
LINKS
|
|
|
FORMULA
|
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
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
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
a(n+1) = a(n-a(n)) + 1, a(0) = 0. - Rok Cestnik, Dec 29 2020
|
|
EXAMPLE
|
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 + ...
As triangle, the sequence starts
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, 7, 7;
8, 8, 8, 8, 8, 8, 8, 8, 8;
...
|
|
MAPLE
|
a := [ 0 ]: for i from 1 to 15 do for j from 1 to i+1 do a := [ op(a), i ]; od: od: a;
floor((sqrt(1+8*n)-1)/2) ;
|
|
MATHEMATICA
|
f[n_] := Floor[(Sqrt[1 + 8n] - 1)/2]; Table[ f[n], {n, 0, 87}] (* Robert G. Wilson v, Oct 21 2005 *)
Table[x, {x, 0, 13}, {y, 0, x}] // Flatten
T[ n_, k_] := If[ n >= k >= 0, n, 0]; (* Michael Somos, Dec 22 2016 *)
Flatten[Table[PadRight[{}, n+1, n], {n, 0, 12}]] (* Harvey P. Dale, Jul 03 2021 *)
|
|
PROG
|
(PARI) t1(n)=floor(-1/2+sqrt(2+2*n)) /* A003056 */
(PARI) t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)), 2) /* A002262 */
(Haskell)
a003056 = floor . (/ 2) . (subtract 1) .
sqrt . (+ 1) . (* 8) . fromIntegral
a003056_row n = replicate (n + 1) n
a003056_tabl = map a003056_row [0..]
a003056_list = concat $ a003056_tabl
(Python)
from math import isqrt
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|