cp's OEIS Frontend

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.

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

This page as a plain text file.
%I A249223 #86 Apr 10 2025 23:21:18
%S A249223 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 A249223 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 A249223 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 A249223 Triangle read by rows: row n gives partial alternating sums of row n of A237048.
%C A249223 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 A249223 (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 A249223 (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 A249223 (c) For certain sequences of integers, it is known that area(n) = sigma(n); see A238443, A245685, A246955, A246956 and A247687.
%C A249223 Right border gives A067742. - _Omar E. Pol_, Jan 21 2017
%C A249223 For a proof that T(n, k) = |{ d : d|n and k/2 < d <= k }|, for 1 <= k <= row(n), where row(n) is the length of row n, an identity suggested by _Peter Munn_, see the link. A corollary to it is that the number of divisors of n in the half-open interval (row(n)/2, row(n)] equals the width of the symmetric representation of n at the diagonal: T(n, row(n)) = | { d : d|n and row(n)/2 < d <= row(n) } |. See also the comments and conjectures of _Michel Marcus_ in A067742 and A237593. - _Hartmut F. W. Hoft_, Jun 24 2024
%C A249223 From _Omar E. Pol_, Jul 24 2024: (Start)
%C A249223 Conjecture 1: Every column is a periodic sequence.
%C A249223 Conjecture 2: The periods of the columns 1..8 are respectively: 1, 2, 6, 12, 60, 60, 420, 840.
%C A249223 Question 1: Is the period of the column k equal to A003418(k)? (End).
%C A249223 From _Omar E. Pol_, Jul 26 2024: (Start)
%C A249223 Column 1 gives A000012.
%C A249223 Column 2 gives A000035.
%C A249223 Conjecture 3: Column 3 gives [2, 0] together with A115357, hence column 3 gives 2 together with A171182.
%C A249223 Question 2: Except the first nine terms of A337976, is the column 4 the same as A337976?
%C A249223 Question 3: Except the first 14 terms of A366981, is the column 5 the same as A366981? (End)
%C A249223 From _Hartmut F. W. Hoft_, Aug 01 2024: (Start)
%C A249223 Conjectures 1 and 2 are true and the answer to question 1 is affirmative.
%C A249223 By definition, each column k in triangle T237048(n, k) of sequence A237048 is a periodic sequence of period k. Since the k-th term in row n of the triangle T(n, k) = Sum_{i=1..k} (-1)^(i+1) * T237048(n, i), with 1 <= k <= A003056(n), each initial subsequence T(n, 1) .. T(n, k) of row n in this triangle is periodic of period lcm(1, .. , k) = A003418(k). This implies that each column k in this sequence has period A003418(k).
%C A249223 Conjecture 3 and Question 2 are true. Since T237048(n, 1) = 1, T237208(n, 2) = 1 if n odd and 0 if n even, T237048(n, 3) = 1 if 3|n and 0 otherwise, and T237048(n, 4) = 1 if 4|(n-2) and 0 otherwise, equations T249223(n, 3) = 1 - (n mod 2) + delta( n mod 3) and T249223(n, 4) = 1 - (n mod 2) + delta( n mod 3) - delta( (n-2) mod 4) hold where delta(k) = 1 if k = 0 and 0 otherwise. With the 3rd column starting at n = A000217(3) = 6, each period starting in a row that is a multiple of 6 is [ 2 0 1 1 1 0 ], and appropriate shifts yield A115357 and A171182. With the 4th column starting at n = A000217(4) = 10, each period starting in a row n with 12|(n+2) is [ 0 0 2 0 0 1 1 0 1 0 1 1 ], and with a shift of 9 yields the apparently periodic A337976(10), A337976(11), ... (End)
%H A249223 G. C. Greubel, <a href="/A249223/b249223.txt">Table of n, a(n) for the first 150 rows, flattened</a>
%H A249223 Hartmut F. W. Hoft, <a href="/A249223/a249223.pdf">Divisors d of n in half open interval (k/2, k]</a>
%F A249223 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 A249223 Triangle begins:
%e A249223 ---------------------------
%e A249223    n \ k  1  2  3  4  5  6
%e A249223 ---------------------------
%e A249223    1 |    1;
%e A249223    2 |    1;
%e A249223    3 |    1, 0;
%e A249223    4 |    1, 1;
%e A249223    5 |    1, 0;
%e A249223    6 |    1, 1, 2;
%e A249223    7 |    1, 0, 0;
%e A249223    8 |    1, 1, 1;
%e A249223    9 |    1, 0, 1;
%e A249223   10 |    1, 1, 1, 0;
%e A249223   11 |    1, 0, 0, 0;
%e A249223   12 |    1, 1, 2, 2;
%e A249223   13 |    1, 0, 0, 0;
%e A249223   14 |    1, 1, 1, 0;
%e A249223   15 |    1, 0, 1, 1, 2;
%e A249223   16 |    1, 1, 1, 1, 1;
%e A249223   17 |    1, 0, 0, 0, 0;
%e A249223   18 |    1, 1, 2, 1, 1;
%e A249223   19 |    1, 0, 0, 0, 0;
%e A249223   20 |    1, 1, 1, 1, 2;
%e A249223   21 |    1, 0, 1, 1, 1, 0;
%e A249223   22 |    1, 1, 1, 0, 0, 0;
%e A249223   23 |    1, 0, 0, 0, 0, 0;
%e A249223   24 |    1, 1, 2, 2, 2, 2;
%e A249223   ...
%e A249223 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 A249223 r := proc(n) floor((sqrt(1+8*n)-1)/2) ; end proc: # R. J. Mathar 2015 A003056
%p A249223 A237048:=proc(n,k) local i; global r;
%p A249223 if n<(k-1)*k/2 or k>r(n) then return(0); fi;
%p A249223 if (k mod 2)=1 and (n mod k)=0 then return(1); fi;
%p A249223 if (k mod 2)=0 and ((n-k/2) mod k) = 0 then return(1); fi;
%p A249223 return(0);
%p A249223 end;
%p A249223 A249223:=proc(n,k) local i; global r,A237048;
%p A249223 if n<(k-1)*k/2 or k>r(n) then return(0); fi;
%p A249223 add( (-1)^(i+1)*A237048(n,i),i=1..k);
%p A249223 end;
%p A249223 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 A249223 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 A249223 a1[n_, k_] := Sum[(-1)^(j + 1)*a237048[n, j], {j, 1, k}];
%t A249223 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 A249223 (PARI) t237048(n,k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0);
%o A249223 kmax(n) = (sqrt(1+8*n)-1)/2;
%o A249223 t(n,k) = sum(j=1, k, (-1)^(j+1)*t237048(n,j));
%o A249223 tabf(nn) = {for (n=1, nn, for (k=1, kmax(n), print1(t(n,k), ", ");); print(););} \\ _Michel Marcus_, Sep 20 2015
%Y A249223 Row n has length A003056(n).
%Y A249223 Column k starts in row A000217(k).
%Y A249223 Cf. A000012, A000035, A000203, A003418, A067742, A115357, A171182, A237048, A237270, A237271, A237593, A238443, A245685, A246955, A246956, A247687, A337976, A366981.
%K A249223 nonn,tabf
%O A249223 1,11
%A A249223 _Hartmut F. W. Hoft_, Oct 23 2014