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!)
A285898 Triangle read by row: T(n,k) = number of partitions of n into exactly k consecutive parts (1 <= k <= n). 11
1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
To partition n into k parts, we see if m exists such that m + (m + 1) + ... + (m + k - 1) = k*m + binomial(k, 2) = n exists. a(n) = 1 if and only if (n - binomial(k, 2)) / k is integer and larger than 0. - David A. Corneth, Apr 28 2017
It appears that this a full version of the irregular triangle A237048. - Omar E. Pol, Apr 28 2017
The value of a(n) can never exceed 1, since that would imply the existence of distinct equal-length ranges of consecutive integers that add up to the same number, which is impossible. - Sidney Cadot, Jan 22 2023
LINKS
FORMULA
A000203(n) = Sum_{k=1..n} (-1)^(k-1) * ((Sum_{j=k..n} T(j,k))^2 - (Sum_{j=k..n} T(j-1,k))^2), assuming that T(k-1,k) = 0. - Omar E. Pol, Oct 10 2018
EXAMPLE
Triangle begins:
1;
1, 0;
1, 1, 0;
1, 0, 0, 0;
1, 1, 0, 0, 0;
1, 0, 1, 0, 0, 0;
1, 1, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0, 0, 0;
1, 1, 1, 0, 0, 0, 0, 0, 0;
1, 0, 0, 1, 0, 0, 0, 0, 0, 0;
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
...
For n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. These partitions are formed by 1, 2, 3 and 5 consecutive parts respectively, so the 15th row of the triangle is [1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].
MAPLE
A285898 := proc(n)
corn := (n-binomial(k, 2))/k ;
if type(corn, 'integer') then
if corn > 0 then
1 ;
else
0;
end if;
else
0 ;
end if;
end proc: # R. J. Mathar, Apr 30 2017
MATHEMATICA
Table[Function[t, Function[s, ReplacePart[s, Map[# -> 1 &, t]]]@ ConstantArray[0, n]]@ Map[Length, Select[IntegerPartitions@ n, Length@ # == 1 || Union@ Differences@ # == {-1} &]], {n, 15}] // Flatten (* Michael De Vlieger, Apr 28 2017 *)
PROG
(PARI) T(n, k) = n-=binomial(k, 2); if(n>0, n%k==0) \\ David A. Corneth, Apr 28 2017
(Python)
from sympy import binomial
def T(n, k):
n=n - binomial(k, 2)
if n>0:
return 1 if n%k==0 else 0
return 0
for n in range(1, 21): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Apr 28 2017
CROSSREFS
Row sums give A001227.
Sequence in context: A131377 A364639 A342991 * A077049 A124895 A089885
KEYWORD
nonn,tabl,easy
AUTHOR
Omar E. Pol and N. J. A. Sloane, Apr 28 2017
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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)