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!)
A249223 Triangle read by rows: row n gives partial alternating sums of row n of A237048. 64

%I #48 Apr 09 2022 17:37:48

%S 1,1,1,0,1,1,1,0,1,1,2,1,0,0,1,1,1,1,0,1,1,1,1,0,1,0,0,0,1,1,2,2,1,0,

%T 0,0,1,1,1,0,1,0,1,1,2,1,1,1,1,1,1,0,0,0,0,1,1,2,1,1,1,0,0,0,0,1,1,1,

%U 1,2,1,0,1,1,1,0,1,1,1,0,0,0,1,0,0,0,0,0,1,1,2,2,2,2

%N Triangle read by rows: row n gives partial alternating sums of row n of A237048.

%C All entries in the triangle are nonnegative since the number of 1's in odd-numbered columns of A237048 prior to column j, 1 <= j <= row(n), is at least as large as the number of 1's in even-numbered columns through column j. As a consequence:

%C (a) The two adjacent symmetric Dyck paths whose legs are defined by adjacent rows of triangle A237593 never cross each other (see also A235791 and A237591) and the rows in this triangle describe the widths between the legs.

%C (b) Let legs(n) denote the n-th row of triangle A237591, widths(n) the n-th row of this triangle, and c(n) the rightmost entry in the n-th row of this triangle (center of the Dyck path). Then area(n) = 2 * legs(n) . width(n) - c(n), where "." is the inner product, is the area between the two adjacent symmetric Dyck paths.

%C (c) For certain sequences of integers, it is known that area(n) = sigma(n); see A238443, A245685, A246955, A246956 and A247687.

%C Right border gives A067742. - _Omar E. Pol_, Jan 21 2017

%H G. C. Greubel, <a href="/A249223/b249223.txt">Table of n, a(n) for the first 150 rows, flattened</a>

%F T(n, k) = Sum_{j=1..k} (-1)^(j+1)*A237048(n, j), for n>=1 and 1 <= k <= floor((sqrt(8*n + 1) - 1)/2). - corrected by _Hartmut F. W. Hoft_, Jan 25 2018

%e Triangle begins:

%e ---------------------------

%e n \ k 1 2 3 4 5 6

%e ---------------------------

%e 1 | 1;

%e 2 | 1;

%e 3 | 1, 0;

%e 4 | 1, 1;

%e 5 | 1, 0;

%e 6 | 1, 1, 2;

%e 7 | 1, 0, 0;

%e 8 | 1, 1, 1;

%e 9 | 1, 0, 1;

%e 10 | 1, 1, 1, 0;

%e 11 | 1, 0, 0, 0;

%e 12 | 1, 1, 2, 2;

%e 13 | 1, 0, 0, 0;

%e 14 | 1, 1, 1, 0;

%e 15 | 1, 0, 1, 1, 2;

%e 16 | 1, 1, 1, 1, 1;

%e 17 | 1, 0, 0, 0, 0;

%e 18 | 1, 1, 2, 1, 1;

%e 19 | 1, 0, 0, 0, 0;

%e 20 | 1, 1, 1, 1, 2;

%e 21 | 1, 0, 1, 1, 1, 0;

%e 22 | 1, 1, 1, 0, 0, 0;

%e 23 | 1, 0, 0, 0, 0, 0;

%e 24 | 1, 1, 2, 2, 2, 2;

%e ...

%e The triangle shows that area(n) has width 1 for powers of 2 and that area(p) for primes p consists of only 1 horizontal leg of width 1 (and its symmetric vertical leg in the mirror symmetric duplicate of this triangle).

%p r := proc(n) floor((sqrt(1+8*n)-1)/2) ; end proc: # R. J. Mathar 2015 A003056

%p A237048:=proc(n,k) local i; global r;

%p if n<(k-1)*k/2 or k>r(n) then return(0); fi;

%p if (k mod 2)=1 and (n mod k)=0 then return(1); fi;

%p if (k mod 2)=0 and ((n-k/2) mod k) = 0 then return(1); fi;

%p return(0);

%p end;

%p A249223:=proc(n,k) local i; global r,A237048;

%p if n<(k-1)*k/2 or k>r(n) then return(0); fi;

%p add( (-1)^(i+1)*A237048(n,i),i=1..k);

%p end;

%p for n from 1 to 12 do lprint([seq(A249223(n,k),k=1..r(n))]); od; # _N. J. A. Sloane_, Jan 15 2021

%t cd[n_, k_] := If[Divisible[n, k], 1, 0]; row[n_] := Floor[(Sqrt[8 n + 1] - 1)/2]; a237048[n_, k_] := If[OddQ[k], cd[n, k], cd[n - k/2, k]];

%t a1[n_, k_] := Sum[(-1)^(j + 1)*a237048[n, j], {j, 1, k}];

%t a2[n_] := Drop[FoldList[Plus, 0, Map[(-1)^(# + 1) &, Range[row[n]]] a237048[n]], 1]; Flatten[Map[a2, Range[24]]] (* data *) (* Corrected by _G. C. Greubel_, Apr 16 2017 *)

%o (PARI) t237048(n,k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0);

%o kmax(n) = (sqrt(1+8*n)-1)/2;

%o t(n,k) = sum(j=1, k, (-1)^(j+1)*t237048(n,j));

%o tabf(nn) = {for (n=1, nn, for (k=1, kmax(n), print1(t(n,k), ", ");); print(););} \\ _Michel Marcus_, Sep 20 2015

%Y Cf. A000203, A237048, A237270, A237271, A237593, A238443, A245685, A246955, A246956, A247687.

%K nonn,tabf

%O 1,11

%A _Hartmut F. W. Hoft_, Oct 23 2014

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 March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)