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.

A240542 The midpoint of the (rotated) Dyck path from (0, n) to (n, 0) defined by A237593 has coordinates (a(n), a(n)). Also a(n) is the alternating sum of the n-th row of A235791.

This page as a plain text file.
%I A240542 #116 Aug 21 2021 16:01:43
%S A240542 1,2,2,3,3,5,5,6,7,7,7,9,9,9,11,12,12,13,13,15,15,15,15,17,18,18,18,
%T A240542 20,20,22,22,23,23,23,25,26,26,26,26,28,28,30,30,30,32,32,32,34,35,36,
%U A240542 36,36,36,38,38,40,40,40,40,42,42,42,44,45,45,47,47,47,47,49,49,52,52
%N A240542 The midpoint of the (rotated) Dyck path from (0, n) to (n, 0) defined by A237593 has coordinates (a(n), a(n)). Also a(n) is the alternating sum of the n-th row of A235791.
%C A240542 The sequence is closely related to the alternating harmonic series.
%C A240542 Its asymptotic behavior is lim_{k -> infinity} a(k)/k = log 2. The relative error is abs(a(k) - k*log(2))/(k*log(2)) <= 2/sqrt(k).
%C A240542 Conjecture 1: the sequence of first positions of the alternating runs of odd and even numbers in a(k) equals A028982. Example: the positions in (1),(2),2,(3),3,5,5,(6),(7),7,7,9,9,9,11,(12),12,(13),13,15,... are 1,2,4,8,9,16,18,... Checked with a Mathematica function through a(1000000).
%C A240542 See A235791, A237591 and A237593 for additional formulas and properties.
%C A240542 Conjecture 2: The sequence of differences a(n) - a(n-1), for n>=1, appears to be equal to A067742(n), the sequence of middle divisors of n; as an empty sum, a(0) = 0, (which was conjectured by _Michel Marcus_ in the entry A237593). Checked with the two respective Mathematica functions up to n=100000. - _Hartmut F. W. Hoft_, Jul 17 2014
%C A240542 The number of occurrences of n is A259179(n). - _Omar E. Pol_, Dec 11 2016
%C A240542 Conjecture 3: a(n) is also the difference between the total number of partitions of all positive integers <= n into an odd number of consecutive parts, and the total number of partitions of all positive integers <= n into an even number of consecutive parts. - _Omar E. Pol_, Apr 28 2017
%C A240542 Conjecture 4: a(n) is also the total number of central subparts of all symmetric representations of sigma of all positive integers <= n. - _Omar E. Pol_, Apr 29 2017
%C A240542 a(n) is also the sum of the odd-indexed terms of the n-th row of the triangle A237591. - _Omar E. Pol_, Jun 20 2018
%C A240542 a(n) is the total number of middle divisors of all positive integers <= n (after _Michel Marcus_'s conjecture in A237593). - _Omar E. Pol_, Aug 18 2021
%F A240542 a(n) = Sum_{k = 1..A003056(n)} (-1)^(k+1) A235791(n,k).
%F A240542 a(n) = A285901(n) - A285902(n), assuming the conjecture 3. - _Omar E. Pol_, Feb 15 2018
%F A240542 a(n) = n - A322141(n). - _Omar E. Pol_, Dec 22 2020
%e A240542 From _Omar E. Pol_, Dec 22 2020: (Start)
%e A240542 Illustration of initial terms in two ways in accordance with the sum of the odd-indexed terms of the rows of A237591:
%e A240542 .
%e A240542 n   a(n)                               _              _
%e A240542 1    1                               _|_|            |_|_
%e A240542 2    2                             _|_ _|            |_ _|
%e A240542 3    2                           _|_ _|              |_ _|_
%e A240542 4    3                         _|_ _ _|              |_ _ _|
%e A240542 5    3                       _|_ _ _|  _             |_ _ _|_ _
%e A240542 6    5                     _|_ _ _ _| |_|            |_ _ _ _|_|
%e A240542 7    5                   _|_ _ _ _|   |_|            |_ _ _ _|_|_
%e A240542 8    6                 _|_ _ _ _ _|  _|_|            |_ _ _ _ _|_|_
%e A240542 9    7               _|_ _ _ _ _|   |_ _|            |_ _ _ _ _|_ _|
%e A240542 10   7             _|_ _ _ _ _ _|   |_|              |_ _ _ _ _ _|_|
%e A240542 11   7           _|_ _ _ _ _ _|    _|_|              |_ _ _ _ _ _|_|_ _
%e A240542 12   9         _|_ _ _ _ _ _ _|   |_ _|              |_ _ _ _ _ _ _|_ _|
%e A240542 13   9       _|_ _ _ _ _ _ _|     |_ _|              |_ _ _ _ _ _ _|_ _|
%e A240542 14   9     _|_ _ _ _ _ _ _ _|    _|_|  _             |_ _ _ _ _ _ _ _|_|_ _
%e A240542 15  11   _|_ _ _ _ _ _ _ _|     |_ _| |_|            |_ _ _ _ _ _ _ _|_ _|_|_
%e A240542 16  12  |_ _ _ _ _ _ _ _ _|     |_ _| |_|            |_ _ _ _ _ _ _ _ _|_ _|_|
%e A240542 ...
%e A240542                   Figure 1.                                  Figure 2.
%e A240542 .
%e A240542 Figure 1 shows the illustration of initial terms taken from the isosceles triangle of A237593. For n = 16 there are (9 + 2 + 1) = 12 cells in the 16th row of the diagram, so a(16) = 12.
%e A240542 Figure 2 shows the illustration of initial terms taken from an octant of the pyramid described in A244050 and A245092. For n = 16 there are (9 + 2 + 1) = 12 cells in the 16th row of the diagram, so a(16) = 12.
%e A240542 Note that if we fold each level (or row) of that isosceles triangle of A237593 we essentially obtain the structure of the pyramid described in A245092 whose terraces at the n-th level have a total area equal to sigma(n) = A000203(n).
%e A240542 (End).
%t A240542 a[n_] := Sum[(-1)^(k + 1) Ceiling[(n + 1)/k - (k + 1)/2], {k, 1, Floor[-1/2 + 1/2 Sqrt[8 n + 1]]}]; Table[a[n], {n, 40}]
%o A240542 (PARI) a(n) = sum(k=1, floor(-1/2 + 1/2*sqrt(8*n + 1)), (-1)^(k + 1)*ceil((n + 1)/k - (k + 1)/2)); \\ _Indranil Ghosh_, Apr 21 2017
%o A240542 (Python)
%o A240542 from sympy import sqrt
%o A240542 import math
%o A240542 def a(n): return sum((-1)**(k + 1) * int(math.ceil((n + 1)/k - (k + 1)/2)) for k in range(1, int(math.floor(-1/2 + 1/2*sqrt(8*n + 1))) + 1))
%o A240542 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Apr 21 2017
%Y A240542 Cf. A028982, A067742, A196020, A236104, A235791, A237270, A237271, A237591, A237593, A071562, A259176, A259179, A279387, A286001, A322141, A338204, A338758.
%K A240542 nonn
%O A240542 1,2
%A A240542 _Hartmut F. W. Hoft_, Apr 07 2014
%E A240542 More terms from _Omar E. Pol_, Apr 16 2014
%E A240542 Definition edited by _N. J. A. Sloane_, Dec 20 2020