This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A285898 #61 Jan 10 2025 04:29:43 %S A285898 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, %T A285898 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, %U A285898 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 %N A285898 Triangle read by row: T(n,k) = number of partitions of n into exactly k consecutive parts (1 <= k <= n). %C A285898 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 an integer and larger than 0. - _David A. Corneth_, Apr 28 2017 %C A285898 It appears that this a full version of the irregular triangle A237048. - _Omar E. Pol_, Apr 28 2017 %C A285898 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 %F A285898 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 %e A285898 Triangle begins: %e A285898 1; %e A285898 1, 0; %e A285898 1, 1, 0; %e A285898 1, 0, 0, 0; %e A285898 1, 1, 0, 0, 0; %e A285898 1, 0, 1, 0, 0, 0; %e A285898 1, 1, 0, 0, 0, 0, 0; %e A285898 1, 0, 0, 0, 0, 0, 0, 0; %e A285898 1, 1, 1, 0, 0, 0, 0, 0, 0; %e A285898 1, 0, 0, 1, 0, 0, 0, 0, 0, 0; %e A285898 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0; %e A285898 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0; %e A285898 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; %e A285898 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; %e A285898 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; %e A285898 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; %e A285898 ... %e A285898 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]. %p A285898 A285898 := proc(n) %p A285898 corn := (n-binomial(k,2))/k ; %p A285898 if type(corn,'integer') then %p A285898 if corn > 0 then %p A285898 1 ; %p A285898 else %p A285898 0; %p A285898 end if; %p A285898 else %p A285898 0 ; %p A285898 end if; %p A285898 end proc: # _R. J. Mathar_, Apr 30 2017 %t A285898 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 *) %o A285898 (PARI) T(n, k) = n-=binomial(k, 2); if(n>0,n%k==0) \\ _David A. Corneth_, Apr 28 2017 %o A285898 (Python) %o A285898 from sympy import binomial %o A285898 def T(n, k): %o A285898 n=n - binomial(k, 2) %o A285898 if n>0: %o A285898 return 1 if n%k==0 else 0 %o A285898 return 0 %o A285898 for n in range(1, 21): print([T(n, k) for k in range(1, n + 1)]) # _Indranil Ghosh_, Apr 28 2017 %Y A285898 Row sums give A001227. %Y A285898 Cf. A000203, A038547, A067742, A082647, A131576, A204217, A237048, A237593, A245579, A261699, A279387, A281009, A204217. %K A285898 nonn,tabl,easy %O A285898 1,1 %A A285898 _Omar E. Pol_ and _N. J. A. Sloane_, Apr 28 2017