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.

Showing 1-10 of 34 results. Next

A001227 Number of odd divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 4, 1, 2, 3, 2, 2, 4, 2, 2, 2, 3, 2, 4, 2, 2, 4, 2, 1, 4, 2, 4, 3, 2, 2, 4, 2, 2, 4, 2, 2, 6, 2, 2, 2, 3, 3, 4, 2, 2, 4, 4, 2, 4, 2, 2, 4, 2, 2, 6, 1, 4, 4, 2, 2, 4, 4, 2, 3, 2, 2, 6, 2, 4, 4, 2, 2, 5, 2, 2, 4, 4, 2, 4, 2, 2, 6, 4, 2, 4, 2, 4, 2, 2, 3, 6, 3, 2, 4, 2, 2, 8
Offset: 1

Views

Author

Keywords

Comments

Also (1) number of ways to write n as difference of two triangular numbers (A000217), see A136107; (2) number of ways to arrange n identical objects in a trapezoid. - Tom Verhoeff
Also number of partitions of n into consecutive positive integers including the trivial partition of length 1 (e.g., 9 = 2+3+4 or 4+5 or 9 so a(9)=3). (Useful for cribbage players.) See A069283. - Henry Bottomley, Apr 13 2000
This has been described as Sylvester's theorem, but to reduce ambiguity I suggest calling it Sylvester's enumeration. - Gus Wiseman, Oct 04 2022
a(n) is also the number of factors in the factorization of the Chebyshev polynomial of the first kind T_n(x). - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 28 2003
Number of factors in the factorization of the polynomial x^n+1 over the integers. See also A000005. - T. D. Noe, Apr 16 2003
a(n) = 1 if and only if n is a power of 2 (see A000079). - Lekraj Beedassy, Apr 12 2005
Number of occurrences of n in A049777. - Philippe Deléham, Jun 19 2005
For n odd, n is prime if and only if a(n) = 2. - George J. Schaeffer (gschaeff(AT)andrew.cmu.edu), Sep 10 2005
Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly once. Example: a(9)=3 because we have [3,3,2,1],[2,2,2,2,1] and [1,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 07 2006
Also the number of factors of the n-th Lucas polynomial. - T. D. Noe, Mar 09 2006
Lengths of rows of triangle A182469;
Denoted by Delta_0(n) in Glaisher 1907. - Michael Somos, May 17 2013
Also the number of partitions p of n into distinct parts such that max(p) - min(p) < length(p). - Clark Kimberling, Apr 18 2014
Row sums of triangle A247795. - Reinhard Zumkeller, Sep 28 2014
Row sums of triangle A237048. - Omar E. Pol, Oct 24 2014
A069288(n) <= a(n). - Reinhard Zumkeller, Apr 05 2015
A000203, A000593 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
a(n) is equal to the number of ways to write 2*n-1 as (4*x + 2)*y + 4*x + 1 where x and y are nonnegative integers. Also a(n) is equal to the number of distinct values of k such that k/(2*n-1) + k divides (k/(2*n-1))^(k/(2*n-1)) + k, (k/(2*n-1))^k + k/(2*n-1) and k^(k/(2*n-1)) + k/(2*n-1). - Juri-Stepan Gerasimov, May 23 2016, Jul 15 2016
Also the number of odd divisors of n*2^m for m >= 0. - Juri-Stepan Gerasimov, Jul 15 2016
a(n) is odd if and only if n is a square or twice a square. - Juri-Stepan Gerasimov, Jul 17 2016
a(n) is also the number of subparts in the symmetric representation of sigma(n). For more information see A279387 and A237593. - Omar E. Pol, Nov 05 2016
a(n) is also the number of partitions of n into an odd number of equal parts. - Omar E. Pol, May 14 2017 [This follows from the g.f. Sum_{k >= 1} x^k/(1-x^(2*k)). - N. J. A. Sloane, Dec 03 2020]

Examples

			G.f. = q + q^2 + 2*q^3 + q^4 + 2*q^5 + 2*q^6 + 2*q^7 + q^8 + 3*q^9 + 2*q^10 + ...
From _Omar E. Pol_, Nov 30 2020: (Start)
For n = 9 there are three odd divisors of 9; they are [1, 3, 9]. On the other hand there are three partitions of 9 into consecutive parts: they are [9], [5, 4] and [4, 3, 2], so a(9) = 3.
Illustration of initial terms:
                              Diagram
   n   a(n)                         _
   1     1                        _|1|
   2     1                      _|1 _|
   3     2                    _|1  |1|
   4     1                  _|1   _| |
   5     2                _|1    |1 _|
   6     2              _|1     _| |1|
   7     2            _|1      |1  | |
   8     1          _|1       _|  _| |
   9     3        _|1        |1  |1 _|
  10     2      _|1         _|   | |1|
  11     2    _|1          |1   _| | |
  12     2   |1            |   |1  | |
...
a(n) is the number of horizontal line segments in the n-th level of the diagram. For more information see A286001. (End)
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 487 Entry 47.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 306.
  • J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4).
  • Ronald. L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, 2nd ed. (Addison-Wesley, 1994), see exercise 2.30 on p. 65.
  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 28.

Crossrefs

If this sequence counts gapless sets by sum (by Sylvester's enumeration), these sets are ranked by A073485 and A356956. See also A055932, A066311, A073491, A107428, A137921, A333217, A356224, A356841, A356845.
Dirichlet inverse is A327276.

Programs

  • Haskell
    a001227 = sum . a247795_row
    -- Reinhard Zumkeller, Sep 28 2014, May 01 2012, Jul 25 2011
    
  • Magma
    [NumberOfDivisors(n)/Valuation(2*n, 2): n in [1..100]]; // Vincenzo Librandi, Jun 02 2019
    
  • Maple
    for n from 1 by 1 to 100 do s := 0: for d from 1 by 2 to n do if n mod d = 0 then s := s+1: fi: od: print(s); od:
    A001227 := proc(n) local a,d;
        a := 1 ;
        for d in ifactors(n)[2] do
            if op(1,d) > 2 then
                a := a*(op(2,d)+1) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jun 18 2015
  • Mathematica
    f[n_] := Block[{d = Divisors[n]}, Count[ OddQ[d], True]]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Aug 27 2004 *)
    Table[Total[Mod[Divisors[n], 2]],{n,105}] (* Zak Seidov, Apr 16 2010 *)
    f[n_] := Block[{d = DivisorSigma[0, n]}, If[ OddQ@ n, d, d - DivisorSigma[0, n/2]]]; Array[f, 105] (* Robert G. Wilson v *)
    a[ n_] := Sum[  Mod[ d, 2], { d, Divisors[ n]}]; (* Michael Somos, May 17 2013 *)
    a[ n_] := DivisorSum[ n, Mod[ #, 2] &]; (* Michael Somos, May 17 2013 *)
    Count[Divisors[#],?OddQ]&/@Range[110] (* _Harvey P. Dale, Feb 15 2015 *)
    (* using a262045 from A262045 to compute a(n) = number of subparts in the symmetric representation of sigma(n) *)
    (* cl = current level, cs = current subparts count *)
    a001227[n_] := Module[{cs=0, cl=0, i, wL, k}, wL=a262045[n]; k=Length[wL]; For[i=1, i<=k, i++, If[wL[[i]]>cl, cs++; cl++]; If[wL[[i]]Hartmut F. W. Hoft, Dec 16 2016 *)
    a[n_] := DivisorSigma[0, n / 2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jun 12 2022 *)
  • PARI
    {a(n) = sumdiv(n, d, d%2)}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    {a(n) = direuler( p=2, n, 1 / (1 - X) / (1 - kronecker( 4, p) * X))[n]}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    a(n)=numdiv(n>>valuation(n,2)) \\ Charles R Greathouse IV, Mar 16 2011
    
  • PARI
    a(n)=sum(k=1,round(solve(x=1,n,x*(x+1)/2-n)),(k^2-k+2*n)%(2*k)==0) \\ Charles R Greathouse IV, May 31 2013
    
  • PARI
    a(n)=sumdivmult(n,d,d%2) \\ Charles R Greathouse IV, Aug 29 2013
    
  • Python
    from functools import reduce
    from operator import mul
    from sympy import factorint
    def A001227(n): return reduce(mul,(q+1 for p, q in factorint(n).items() if p > 2),1) # Chai Wah Wu, Mar 08 2021
  • SageMath
    def A001227(n): return len([1 for d in divisors(n) if is_odd(d)])
    [A001227(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012
    

Formula

Dirichlet g.f.: zeta(s)^2*(1-1/2^s).
Comment from N. J. A. Sloane, Dec 02 2020: (Start)
By counting the odd divisors f n in different ways, we get three different ways of writing the ordinary generating function. It is:
A(x) = x + x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 2*x^7 + x^8 + 3*x^9 + 2*x^10 + ...
= Sum_{k >= 1} x^(2*k-1)/(1-x^(2*k-1))
= Sum_{k >= 1} x^k/(1-x^(2*k))
= Sum_{k >= 1} x^(k*(k+1)/2)/(1-x^k) [Ramanujan, 2nd notebook, p. 355.].
(This incorporates comments from Vladeta Jovovic, Oct 16 2002 and Michael Somos, Oct 30 2005.) (End)
G.f.: x/(1-x) + Sum_{n>=1} x^(3*n)/(1-x^(2*n)), also L(x)-L(x^2) where L(x) = Sum_{n>=1} x^n/(1-x^n). - Joerg Arndt, Nov 06 2010
a(n) = A000005(n)/(A007814(n)+1) = A000005(n)/A001511(n).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p > 2. - David W. Wilson, Aug 01 2001
a(n) = A000005(A000265(n)). - Lekraj Beedassy, Jan 07 2005
Moebius transform is period 2 sequence [1, 0, ...] = A000035, which means a(n) is the Dirichlet convolution of A000035 and A057427.
a(n) = A113414(2*n). - N. J. A. Sloane, Jan 24 2006 (corrected Nov 10 2007)
a(n) = A001826(n) + A001842(n). - Reinhard Zumkeller, Apr 18 2006
Sequence = M*V = A115369 * A000005, where M = an infinite lower triangular matrix and V = A000005, d(n); as a vector: [1, 2, 2, 3, 2, 4, ...]. - Gary W. Adamson, Apr 15 2007
Equals A051731 * [1,0,1,0,1,...]; where A051731 is the inverse Mobius transform. - Gary W. Adamson, Nov 06 2007
a(n) = A000005(n) - A183063(n).
a(n) = d(n) if n is odd, or d(n) - d(n/2) if n is even, where d(n) is the number of divisors of n (A000005). (See the Weisstein page.) - Gary W. Adamson, Mar 15 2011
Dirichlet convolution of A000005 and A154955 (interpreted as a flat sequence). - R. J. Mathar, Jun 28 2011
a(A000079(n)) = 1; a(A057716(n)) > 1; a(A093641(n)) <= 2; a(A038550(n)) = 2; a(A105441(n)) > 2; a(A072502(n)) = 3. - Reinhard Zumkeller, May 01 2012
a(n) = 1 + A069283(n). - R. J. Mathar, Jun 18 2015
a(A002110(n)/2) = n, n >= 1. - Altug Alkan, Sep 29 2015
a(n*2^m) = a(n*2^i), a((2*j+1)^n) = n+1 for m >= 0, i >= 0 and j >= 0. a((2*x+1)^n) = a((2*y+1)^n) for positive x and y. - Juri-Stepan Gerasimov, Jul 17 2016
Conjectures: a(n) = A067742(n) + 2*A131576(n) = A082647(n) + A131576(n). - Omar E. Pol, Feb 15 2017
a(n) = A000005(2n) - A000005(n) = A099777(n)-A000005(n). - Danny Rorabaugh, Oct 03 2017
L.g.f.: -log(Product_{k>=1} (1 - x^(2*k-1))^(1/(2*k-1))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
G.f.: (psi_{q^2}(1/2) + log(1-q^2))/log(q), where psi_q(z) is the q-digamma function. - Michael Somos, Jun 01 2019
a(n) = A003056(n) - A238005(n). - Omar E. Pol, Sep 12 2021
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma + log(2)/2 - 1/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000005(k) = log(2) (A002162). - Amiram Eldar, Mar 01 2023
a(n) = Sum_{i=1..n} (-1)^(i+1)*A135539(n,i). - Ridouane Oudra, Apr 13 2023

A235791 Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists k copies of every positive integer in nondecreasing order, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 5, 2, 6, 2, 1, 7, 3, 1, 8, 3, 1, 9, 4, 2, 10, 4, 2, 1, 11, 5, 2, 1, 12, 5, 3, 1, 13, 6, 3, 1, 14, 6, 3, 2, 15, 7, 4, 2, 1, 16, 7, 4, 2, 1, 17, 8, 4, 2, 1, 18, 8, 5, 3, 1, 19, 9, 5, 3, 1, 20, 9, 5, 3, 2, 21, 10, 6, 3, 2, 1, 22, 10, 6, 4, 2, 1, 23, 11, 6, 4, 2, 1, 24, 11, 7, 4, 2, 1
Offset: 1

Views

Author

Omar E. Pol, Jan 23 2014

Keywords

Comments

The alternating sum of the squares of the elements of the n-th row equals the sum of all divisors of all positive integers <= n, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*(T(n,k))^2 = A024916(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
For more information see A236104.
The sum of row n gives A060831(n), the sum of the number of odd divisors of all positive integers <= n. - Omar E. Pol, Mar 01 2014. [An equivalent assertion is that the sum of row n of A237048 is the number of odd divisors of n, and this was proved by Hartmut F. W. Hoft in a comment in A237048. - N. J. A. Sloane, Dec 07 2020]
Comments from Franklin T. Adams-Watters on sequences related to the "symmetric representation of sigma" in A235791 and related sequences, Mar 31 2014: (Start)
The place to start is with A235791, which is very simple. Then go to A237591, also very simple, and A237593, still very simple.
You then need to interpret the rows of A237593 as Dyck paths. This interpretation is in terms of run lengths, so 2,1,1,2 means up twice, down once, up once, and down twice. Because the rows of A237593 are symmetric and of even length, this path will always be symmetric.
Now the surprising fact is that the areas enclosed by the Dyck path for n (laid on its side) always includes the area enclosed for n-1; and the number of squares added is sigma(n).
Finally, look at the connected areas enclosed by n but not by n-1; the size of these areas is the symmetric representation of sigma. (End)
From Hartmut F. W. Hoft, Apr 07 2014: (Start)
Mathematica function has been written to check the first property up to n = 20000.
T(n,(sqrt(8n+1)-1)/2+1) = 0 for all n >= 1, which is useful for formulas for A237591 and A237593. (End)
Alternating row sums give A240542. - Omar E. Pol, Apr 16 2014
Conjecture: T(n,k) is also the total number of partitions of all positive integers <= n into exactly k consecutive parts, i.e., the partial column sum of A285898, or in accordance with the triangles of the same family: the partial column sum of A237048. - Omar E. Pol, Apr 28 2017, Nov 24 2020
The above conjecture is true. The proof will be added soon (it uses the generating function for the columns). - N. J. A. Sloane, Nov 24 2020
T(n,k) is also the total length of all line segments between the k-th vertex and the central vertex of the largest Dyck path of the symmetric representation of sigma(n). In other words: T(n,k) is the sum of the last (A003056(n)-k+1) terms of the n-th row of A237591. - Omar E. Pol, Sep 07 2021
T(n,k) is also the Manhattan distance between the k-th vertex and the central vertex of the Dyck path described in the n-th row of the triangle A237593. - Omar E. Pol, Jan 11 2023

Examples

			Triangle begins:
   1;
   2;
   3,  1;
   4,  1;
   5,  2;
   6,  2,  1;
   7,  3,  1;
   8,  3,  1;
   9,  4,  2;
  10,  4,  2,  1;
  11,  5,  2,  1;
  12,  5,  3,  1;
  13,  6,  3,  1;
  14,  6,  3,  2;
  15,  7,  4,  2,  1;
  16,  7,  4,  2,  1;
  17,  8,  4,  2,  1;
  18,  8,  5,  3,  1;
  19,  9,  5,  3,  1;
  20,  9,  5,  3,  2;
  21, 10,  6,  3,  2,  1;
  22, 10,  6,  4,  2,  1;
  23, 11,  6,  4,  2,  1;
  24, 11,  7,  4,  2,  1;
  25, 12,  7,  4,  3,  1;
  26, 12,  7,  5,  3,  1;
  27, 13,  8,  5,  3,  2;
  28, 13,  8,  5,  3,  2,  1;
  ...
For n = 10 the 10th row of triangle is 10, 4, 2, 1, so we have that 10^2 - 4^2 + 2^2 - 1^2 = 100 - 16 + 4 - 1 = 87, the same as A024916(10) = 87, the sum of all divisors of all positive integers <= 10.
From _Omar E. Pol_, Nov 19 2015: (Start)
Illustration of initial terms in the third quadrant:
.                                                            y
Row                                                         _|
1                                                         _|1|
2                                                       _|2 _|
3                                                     _|3  |1|
4                                                   _|4   _|1|
5                                                 _|5    |2 _|
6                                               _|6     _|2|1|
7                                             _|7      |3  |1|
8                                           _|8       _|3 _|1|
9                                         _|9        |4  |2 _|
10                                      _|10        _|4  |2|1|
11                                    _|11         |5   _|2|1|
12                                  _|12          _|5  |3  |1|
13                                _|13           |6    |3 _|1|
14                              _|14            _|6   _|3|2 _|
15                            _|15             |7    |4  |2|1|
16                          _|16              _|7    |4  |2|1|
17                        _|17               |8     _|4 _|2|1|
18                      _|18                _|8    |5  |3  |1|
19                    _|19                 |9      |5  |3 _|1|
20                  _|20                  _|9     _|5  |3|2 _|
21                _|21                   |10     |6   _|3|2|1|
22              _|22                    _|10     |6  |4  |2|1|
23            _|23                     |11      _|6  |4  |2|1|
24          _|24                      _|11     |7    |4 _|2|1|
25        _|25                       |12       |7   _|4|3  |1|
26      _|26                        _|12      _|7  |5  |3 _|1|
27    _|27                         |13       |8    |5  |3|2 _|
28   |28                           |13       |8    |5  |3|2|1|
...
T(n,k) is also the number of cells between the k-th vertical line segment (from left to right) and the y-axis in the n-th row of the structure.
Note that the number of horizontal line segments in the n-th row of the structure equals A001227(n), the number of odd divisors of n.
Also the diagram represents the left part of the front view of the pyramid described in A245092. (End)
For more information about the diagram see A286001. - _Omar E. Pol_, Dec 19 2020
From _Omar E. Pol_, Sep 08 2021: (Start)
For n = 12 the symmetric representation of sigma(12) in the fourth quadrant is as shown below:
                            _
                           | |
                           | |
                           | |
                           | |
                           | |
                      _ _ _| |
                    _|    _ _|
                  _|     |
                 |      _|
                 |  _ _|
      _ _ _ _ _ _| |3   1
     |_ _ _ _ _ _ _|
    12              5
.
For n = 12 and k = 1 the total length of all line segments between the first vertex and the central vertex of the largest Dyck path is equal to 12, so T(12,1) = 12.
For n = 12 and k = 2 the total length of all line segments between the second vertex and the central vertex of the largest Dyck path is equal to 5, so T(12,2) = 5.
For n = 12 and k = 3 the total length of all line segments between the third vertex and the central vertex of the largest Dyck path is equal to 3, so T(12,3) = 3.
For n = 12 and k = 4 the total length of all line segments between the fourth vertex and the central vertex of the largest Dyck path is equal to 1, so T(12,4) = 1.
Hence the 12th row of triangle is [12, 5, 3, 1]. (End)
		

Crossrefs

Columns 1..3: A000027, A008619, A008620.
Operations on rows: A003056 (number of terms), A237591 (differences between terms), A060831 (sums), A339577 (products), A240542 (alternating sums), A236104 (squares), A339576 (sums of squares), A024916 (alternating sums of squares), A237048 (differences between rows), A042974 (right border).

Programs

  • Mathematica
    row[n_] := Floor[(Sqrt[8*n + 1] - 1)/2]; f[n_, k_] := Ceiling[(n + 1)/k - (k + 1)/2]; Table[f[n, k], {n, 1, 150}, {k, 1, row[n]}] // Flatten (* Hartmut F. W. Hoft, Apr 07 2014 *)
  • PARI
    row(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i); \\ Michel Marcus, Mar 27 2014
    
  • Python
    from sympy import sqrt
    import math
    def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2))
    for n in range(1, 21): print([T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]) # Indranil Ghosh, Apr 25 2017

Formula

T(n,k) = ceiling((n+1)/k - (k+1)/2) for 1 <= n, 1 <= k <= floor((sqrt(8n+1)-1)/2) = A003056(n). - Hartmut F. W. Hoft, Apr 07 2014
G.f. for column k (k >= 1): x^(k*(k+1)/2)/( (1-x)*(1-x^k) ). - N. J. A. Sloane, Nov 24 2020
T(n,k) = Sum_{j=1..n} A237048(j,k). - Omar E. Pol, May 18 2017
T(n,k) = sqrt(A236104(n,k)). - Omar E. Pol, Feb 14 2018
Sigma(n) = Sum_{k=1..A003056(n)} (-1)^(k-1) * (T(n,k)^2 - T(n-1,k)^2), assuming that T(k*(k+1)/2-1,k) = 0. - Omar E. Pol, Oct 10 2018
a(s(n,k)) = T(n,k), n >= 1, 1 <= k <= r = floor((sqrt(8*n + 1) - 1)/2), where s(n,k) = r*n - r*(r+1)*(r+2)/6 + k translates position (row n, column k) in the triangle of this sequence to its position in the sequence. - Hartmut F. W. Hoft, Feb 24 2021

A237271 Number of parts in the symmetric representation of sigma(n).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 1, 2, 2, 3, 1, 2, 1, 2, 1, 4, 2, 2, 1, 3, 2, 4, 1, 2, 1, 2, 1, 4, 2, 3, 1, 2, 2, 4, 1, 2, 1, 2, 2, 3, 2, 2, 1, 3, 3, 4, 2, 2, 1, 4, 1, 4, 2, 2, 1, 2, 2, 5, 1, 4, 1, 2, 2, 4, 3, 2, 1, 2, 2, 4, 2, 3, 2, 2, 1, 5, 2, 2, 1, 4, 2, 4, 1, 2, 1
Offset: 1

Views

Author

Omar E. Pol, Feb 25 2014

Keywords

Comments

The diagram of the symmetry of sigma has been via A196020 --> A236104 --> A235791 --> A237591 --> A237593.
For more information see A237270.
a(n) is also the number of terraces at n-th level (starting from the top) of the stepped pyramid described in A245092. - Omar E. Pol, Apr 20 2016
a(n) is also the number of subparts in the first layer of the symmetric representation of sigma(n). For the definion of "subpart" see A279387. - Omar E. Pol, Dec 08 2016
Note that the number of subparts in the symmetric representation of sigma(n) equals A001227(n), the number of odd divisors of n. (See the second example). - Omar E. Pol, Dec 20 2016
From Hartmut F. W. Hoft, Dec 26 2016: (Start)
Using odd prime number 3, observe that the 1's in the 3^k-th row of the irregular triangle of A237048 are at index positions
3^0 < 2*3^0 < 3^1 < 2*3^1 < ... < 2*3^((k-1)/2) < 3^(k/2) < ...
the last being 2*3^((k-1)/2) when k is odd and 3^(k/2) when k is even. Since odd and even index positions alternate, each pair (3^i, 2*3^i) specifies one part in the symmetric representation with a center part present when k is even. A straightforward count establishes that the symmetric representation of 3^k, k>=0, has k+1 parts. Since this argument is valid for any odd prime, every positive integer occurs infinitely many times in the sequence. (End)
a(n) = number of runs of consecutive nonzero terms in row n of A262045. - N. J. A. Sloane, Jan 18 2021
Indices of odd terms give A071562. Indices of even terms give A071561. - Omar E. Pol, Feb 01 2021
a(n) is also the number of prisms in the three-dimensional version of the symmetric representation of k*sigma(n) where k is the height of the prisms, with k >= 1. - Omar E. Pol, Jul 01 2021
With a(1) = 0; a(n) is also the number of parts in the symmetric representation of A001065(n), the sum of aliquot parts of n. - Omar E. Pol, Aug 04 2021
The parity of this sequence is also the characteristic function of numbers that have middle divisors. - Omar E. Pol, Sep 30 2021
a(n) is also the number of polycubes in the 3D-version of the ziggurat of order n described in A347186. - Omar E. Pol, Jun 11 2024
Conjecture 1: a(n) is the number of odd divisors of n except the "e" odd divisors described in A005279. Thus a(n) is the length of the n-th row of A379288. - Omar E. Pol, Dec 21 2024
The conjecture 1 was checked up n = 10000 by Amiram Eldar. - Omar E. Pol, Dec 22 2024
The conjecture 1 is true. For a proof see A379288. - Hartmut F. W. Hoft, Jan 21 2025
From Omar E. Pol, Jul 31 2025: (Start)
Conjecture 2: a(n) is the number of 2-dense sublists of divisors of n.
We call "2-dense sublists of divisors of n" to the maximal sublists of divisors of n whose terms increase by a factor of at most 2.
In a 2-dense sublist of divisors of n the terms are in increasing order and two adjacent terms are the same two adjacent terms in the list of divisors of n.
Example: for n = 10 the list of divisors of 10 is [1, 2, 5, 10]. There are two 2-dense sublists of divisors of 10, they are [1, 2], [5, 10], so a(10) = 2.
The conjecture 2 is essentially the same as the second conjecture in the Comments of A384149. See also Peter Munn's formula in A237270.
The indices where a(n) = 1 give A174973 (2-dense numbers). See the proof there. (End)
Conjecture 3: a(n) is the number of divisors p of n such that p is greater than twice the adjacent previous divisor of n. The divisors p give the n-th row of A379288. - Omar E. Pol, Aug 02 2025

Examples

			Illustration of initial terms (n = 1..12):
---------------------------------------------------------
n   A000203  A237270    a(n)            Diagram
---------------------------------------------------------
.                               _ _ _ _ _ _ _ _ _ _ _ _
1       1      1         1     |_| | | | | | | | | | | |
2       3      3         1     |_ _|_| | | | | | | | | |
3       4      2+2       2     |_ _|  _|_| | | | | | | |
4       7      7         1     |_ _ _|    _|_| | | | | |
5       6      3+3       2     |_ _ _|  _|  _ _|_| | | |
6      12      12        1     |_ _ _ _|  _| |  _ _|_| |
7       8      4+4       2     |_ _ _ _| |_ _|_|    _ _|
8      15      15        1     |_ _ _ _ _|  _|     |
9      13      5+3+5     3     |_ _ _ _ _| |      _|
10     18      9+9       2     |_ _ _ _ _ _|  _ _|
11     12      6+6       2     |_ _ _ _ _ _| |
12     28      28        1     |_ _ _ _ _ _ _|
...
For n = 9 the sum of divisors of 9 is 1+3+9 = A000203(9) = 13. On the other hand the 9th set of symmetric regions of the diagram is formed by three regions (or parts) with 5, 3 and 5 cells, so the total number of cells is 5+3+5 = 13, equaling the sum of divisors of 9. There are three parts: [5, 3, 5], so a(9) = 3.
From _Omar E. Pol_, Dec 21 2016: (Start)
Illustration of the diagram of subparts (n = 1..12):
---------------------------------------------------------
n   A000203  A279391  A001227           Diagram
---------------------------------------------------------
.                               _ _ _ _ _ _ _ _ _ _ _ _
1       1      1         1     |_| | | | | | | | | | | |
2       3      3         1     |_ _|_| | | | | | | | | |
3       4      2+2       2     |_ _|  _|_| | | | | | | |
4       7      7         1     |_ _ _|  _ _|_| | | | | |
5       6      3+3       2     |_ _ _| |_|  _ _|_| | | |
6      12      11+1      2     |_ _ _ _|  _| |  _ _|_| |
7       8      4+4       2     |_ _ _ _| |_ _|_|  _ _ _|
8      15      15        1     |_ _ _ _ _|  _|  _| |
9      13      5+3+5     3     |_ _ _ _ _| |  _|  _|
10     18      9+9       2     |_ _ _ _ _ _| |_ _|
11     12      6+6       2     |_ _ _ _ _ _| |
12     28      23+5      2     |_ _ _ _ _ _ _|
...
For n = 6 the symmetric representation of sigma(6) has two subparts: [11, 1], so A000203(6) = 12 and A001227(6) = 2.
For n = 12 the symmetric representation of sigma(12) has two subparts: [23, 5], so A000203(12) = 28 and A001227(12) = 2. (End)
From _Hartmut F. W. Hoft_, Dec 26 2016: (Start)
Two examples of the general argument in the Comments section:
Rows 27 in A237048 and A249223 (4 parts)
i:  1  2 3 4 5 6 7 8 9 . . 12
27: 1  1 1 0 0 1                           1's in A237048 for odd divisors
    1 27 3     9                           odd divisors represented
27: 1  0 1 1 1 0 0 1 1 1 0 1               blocks forming parts in A249223
Rows 81 in A237048 and A249223 (5 parts)
i:  1  2 3 4 5 6 7 8 9 . . 12. . . 16. . . 20. . . 24
81: 1  1 1 0 0 1 0 0 1 0 0 0                          1's in A237048 f.o.d
    1 81 3    27     9                                odd div. represented
81: 1  0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1  blocks fp in A249223
(End)
		

Crossrefs

Programs

  • Mathematica
    a237271[n_] := Length[a237270[n]] (* code defined in A237270 *)
    Map[a237271, Range[90]] (* data *)
    (* Hartmut F. W. Hoft, Jun 23 2014 *)
    a[n_] := Module[{d = Partition[Divisors[n], 2, 1]}, 1 + Count[d, ?(OddQ[#[[2]]] && #[[2]] >= 2*#[[1]] &)]]; Array[a, 100] (* _Amiram Eldar,  Dec 22 2024 *)
  • PARI
    fill(vcells, hga, hgb) = {ic = 1; for (i=1, #hgb, if (hga[i] < hgb[i], for (j=hga[i], hgb[i]-1, cell = vector(4); cell[1] = i - 1; cell[2] = j; vcells[ic] = cell; ic ++;););); vcells;}
    findfree(vcells) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[3] == 0) && (vcelli[4] == 0), return (i));); return (0);}
    findxy(vcells, x, y) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[1]==x) && (vcelli[2]==y) && (vcelli[3] == 0) && (vcelli[4] == 0), return (i));); return (0);}
    findtodo(vcells, iz) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[3] == iz) && (vcelli[4] == 0), return (i)); ); return (0);}
    zcount(vcells) = {nbz = 0; for (i=1, #vcells, nbz = max(nbz, vcells[i][3]);); nbz;}
    docell(vcells, ic, iz) = {x = vcells[ic][1]; y = vcells[ic][2]; if (icdo = findxy(vcells, x-1, y), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x+1, y), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x, y-1), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x, y+1), vcells[icdo][3] = iz); vcells[ic][4] = 1; vcells;}
    docells(vcells, ic, iz) = {vcells[ic][3] = iz; while (ic, vcells = docell(vcells, ic, iz); ic = findtodo(vcells, iz);); vcells;}
    nbzb(n, hga, hgb) = {vcells = vector(sigma(n)); vcells = fill(vcells, hga, hgb); iz = 1; while (ic = findfree(vcells), vcells = docells(vcells, ic, iz); iz++;); zcount(vcells);}
    lista(nn) = {hga = concat(heights(row237593(0), 0), 0); for (n=1, nn, hgb = heights(row237593(n), n); nbz = nbzb(n, hga, hgb); print1(nbz, ", "); hga = concat(hgb, 0););} \\ with heights() also defined in A237593; \\ Michel Marcus, Mar 28 2014
    
  • Python
    from sympy import divisors
    def a(n: int) -> int:
        divs = list(divisors(n))
        d = [divs[i:i+2] for i in range(len(divs) - 1)]
        s = sum(1 for pair in d if len(pair) == 2 and pair[1] % 2 == 1 and pair[1] >= 2 * pair[0])
        return s + 1
    print([a(n) for n in range(1, 80)])  # Peter Luschny, Aug 05 2025

Formula

a(n) = A001227(n) - A239657(n). - Omar E. Pol, Mar 23 2014
a(p^k) = k + 1, where p is an odd prime and k >= 0. - Hartmut F. W. Hoft, Dec 26 2016
Theorem: a(n) <= number of odd divisors of n (cf. A001227). The differences are in A239657. - N. J. A. Sloane, Jan 19 2021
a(n) = A340846(n) - A340833(n) + 1 (Euler's formula). - Omar E. Pol, Feb 01 2021
a(n) = A000005(n) - A243982(n). - Omar E. Pol, Aug 02 2025

A286001 A table of partitions into consecutive parts (see Comments lines for definition).

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 5, 2, 6, 3, 1, 7, 3, 2, 8, 4, 3, 9, 4, 2, 10, 5, 3, 1, 11, 5, 4, 2, 12, 6, 3, 3, 13, 6, 4, 4, 14, 7, 5, 2, 15, 7, 4, 3, 1, 16, 8, 5, 4, 2, 17, 8, 6, 5, 3, 18, 9, 5, 3, 4, 19, 9, 6, 4, 5, 20, 10, 7, 5, 2, 21, 10, 6, 6, 3, 1, 22, 11, 7, 4, 4, 2, 23, 11, 8, 5, 5, 3, 24, 12, 7, 6, 6, 4, 25, 12, 8, 7, 3, 5
Offset: 1

Views

Author

Omar E. Pol, Apr 30 2017

Keywords

Comments

This is a triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists successive blocks of k consecutive terms, where the m-th block starts with m, m>=1, and the first element of column k is in row k*(k+1)/2.
The partitions of n into consecutive parts are represented from the row n up to row A288529(n) as maximum, but in increasing order, exclusively in the columns where the blocks begin.
More precisely, the partition of n into exactly k consecutive parts (if such partition exists) is represented in the column k from the row n up to row n + k - 1 (see examples).
A288772(n) is the minimum number of rows that are required to represent in this table the partitions of all positive integers <= n into consecutive parts.
A288773(n) is the largest of all positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
A288774(n) is the largest positive integers whose partitions into consecutive parts can be totally represented in the first n rows of this table.
For a theorem related to this table see A286000.

Examples

			Triangle begins:
1;
2;
3,   1;
4,   2;
5,   2;
6,   3,  1;
7,   3,  2;
8,   4,  3;
9,   4,  2;
10,  5,  3,  1;
11,  5,  4,  2;
12,  6,  3,  3;
13,  6,  4,  4;
14,  7,  5,  2;
15,  7,  4,  3,  1;
16,  8,  5,  4,  2;
17,  8,  6,  5,  3;
18,  9,  5,  3,  4;
19,  9,  6,  4,  5;
20, 10,  7,  5,  2;
21, 10,  6,  6,  3,  1;
22, 11,  7,  4,  4,  2;
23, 11,  8,  5,  5,  3;
24, 12,  7,  6,  6,  4;
25, 12,  8,  7,  3,  5;
26, 13,  9,  5,  4,  6;
27, 13,  8,  6,  5,  2;
28, 14,  9,  7,  6,  3,  1;
...
Figures A..G show the location (in the columns of the table) of the partitions of n = 1..7 (respectively) into consecutive parts:
.   ------------------------------------------------------------------------
Fig:   A     B       C         D          E            F             G
.   ------------------------------------------------------------------------
. n:   1     2       3         4          5            6             7
Row ------------------------------------------------------------------------
1   | [1];|  1; |  1;     |  1;    |  1;        |  1;         |  1;        |
2   |     | [2];|  2;     |  2;    |  2;        |  2;         |  2;        |
3   |     |     | [3],[1];|  3,  1;|  3,  1;    |  3,  1;     |  3,  1;    |
4   |     |     |  4 ,[2];| [4], 2;|  4,  2;    |  4,  2;     |  4,  2;    |
5   |     |     |         |        | [5],[2];   |  5,  2;     |  5,  2;    |
6   |     |     |         |        |  6, [3], 3;| [6], 3, [1];|  6,  3,  1;|
7   |     |     |         |        |            |  7,  3, [2];| [7],[3], 2;|
8   |     |     |         |        |            |  8,  4, [3];|  8, [4], 3;|
.   ------------------------------------------------------------------------
Figure F: for n = 6 the partitions of 6 into consecutive parts (but with the parts in increasing order) are [6] and [1, 2, 3]. These partitions have 1 and 3 consecutive parts respectively. On the other hand  we can find the mentioned partitions in the columns 1 and 3 of this table, starting at the row 6.
.
Figures H..K show the location (in the columns of the table) of the partitions of 8..11 (respectively) into consecutive parts:
.    --------------------------------------------------------------------
Fig:        H             I                  J                 K
.    --------------------------------------------------------------------
. n:        8             9                  10                11
Row  --------------------------------------------------------------------
1    |  1;        |  1;            |   1;             |   1;            |
1    |  2;        |  2;            |   2;             |   2;            |
3    |  3,  1;    |  3,  1;        |   3,  1;         |   3,  1;        |
4    |  4,  2;    |  4,  2;        |   4,  2;         |   4,  2;        |
5    |  5,  2;    |  5,  2;        |   5,  2;         |   5,  2;        |
6    |  6,  3,  3;|  6,  3,  1;    |   6,  3,  1;     |   6,  3,  1;    |
7    |  7,  3,  2;|  7,  3,  2;    |   7,  3,  2;     |   7,  3,  2;    |
8    | [8], 4,  1;|  8,  4,  3;    |   8,  4,  3;     |   8,  4,  3;    |
9    |            | [9],[4],[2];   |   9,  4,  2;     |   9,  4,  2;    |
10   |            | 10, [5],[3], 1;| [10], 5,  3, [1];|  10,  5,  3,  1;|
11   |            | 11,  5, [4], 2;|  11,  5,  4, [2];| [11],[5], 4,  2;|
12   |            |                |  12,  6,  3, [3];|  12, [6], 3,  3;|
13   |            |                |  13,  6,  4, [4];|  13,  6,  4,  4;|
.    --------------------------------------------------------------------
Figure J: For n = 10 the partitions of 10 into consecutive parts (but with the parts in increasing order) are [10] and [1, 2, 3, 4]. These partitions have 1 and 4 consecutive parts respectively. On the other hand, we can find the mentioned partitions in the columns 1 and 4 of this table, starting at the row 10.
.
Illustration of initial terms arranged into the diagram of the triangle A237591:
.                                                           _
.                                                         _|1|
.                                                       _|2 _|
.                                                     _|3  |1|
.                                                   _|4   _|2|
.                                                 _|5    |2 _|
.                                               _|6     _|3|1|
.                                             _|7      |3  |2|
.                                           _|8       _|4 _|3|
.                                         _|9        |4  |2 _|
.                                       _|10        _|5  |3|1|
.                                     _|11         |5   _|4|2|
.                                   _|12          _|6  |3  |3|
.                                 _|13           |6    |4 _|4|
.                               _|14            _|7   _|5|2 _|
.                             _|15             |7    |4  |3|1|
.                           _|16              _|8    |5  |4|2|
.                         _|17               |8     _|6 _|5|3|
.                       _|18                _|9    |5  |3  |4|
.                     _|19                 |9      |6  |4 _|5|
.                   _|20                  _|10    _|7  |5|2 _|
.                 _|21                   |10     |6   _|6|3|1|
.               _|22                    _|11     |7  |4  |4|2|
.             _|23                     |11      _|8  |5  |5|3|
.           _|24                      _|12     |7    |6 _|6|4|
.         _|25                       |12       |8   _|7|3  |5|
.       _|26                        _|13      _|9  |5  |4 _|6|
.     _|27                         |13       |8    |6  |5|2 _|
.    |28                           |14       |9    |7  |6|3|1|
...
The number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of partitions of n into consecutive parts.
.
From _Omar E. Pol_, Dec 15 2020: (Start)
The connection (described step by step) between the triangle of A299765 and the above geometric diagram is as follows:
.
   [1];                                       [1];
   [2];                                       [2];
   [3], [2, 1];                               [3], [2, 1];
   [4];                                       [4];
   [5], [3, 2];                               [5], [3, 2];
   [6], [3, 2, 1];                            [6],         [3, 2, 1];
   [7], [4, 3];                               [7], [4, 3];
   [8];                                       [8];
   [9], [5, 4], [4, 3, 2];                    [9], [5, 4], [4, 3, 2];
.
         Figure 1.                                   Figure 2.
.
We start with the irregular                Then we write the same triangle
triangle of A299765 in which               but ordered in columns where the
row n lists the partitions                 column k lists the partitions of
of n into consecutive parts.               n into k consecutive parts.
.
.   _                                          _
    1|                                        |1
    _                                          _
    2|                                        |2
    _    _ _                                   _      _
    3|   2,1|                                 |3     |1
    _                                          _     |2
    4|                                        |4
    _    _ _                                   _      _
    5|   3,2|                                 |5     |2
    _           _ _ _                          _     |3      _
    6|          3,2,1|                        |6            |1
    _    _ _                                   _      _     |2
    7|   4,3|                                 |7     |3     |3
    _                                          _     |4
    8|                                        |8
    _    _ _    _ _ _                          _      _      _
    9|   5,4|   4,3,2|                        |9     |4     |2
                                                     |5     |3
                                                            |4
.
         Figure 3.                                Figure 4.
.
Then we draw to the right of               Then we rotate each sub-diagram
each partition a vertical                  90 degrees counterclockwise.
toothpick and above each part              Every horizontal toothpick represents
we draw a horizontal toothpick.            the existence of that partition.
.                                          The number of vertical toothpicks
.                                          equals the number of parts.
.
.                     _                                      _
                    _|1                                    _|1
                  _|2 _                                  _|2 _
                _|3  |1                                _|3  |1
              _|4   _|2                              _|4   _|2
            _|5    |2 _                            _|5    |2 _
          _|6     _|3|1                          _|6     _|3|1
        _|7      |3  |2                        _|7      |3  |2
      _|8       _|4 _|3                      _|8       _|4 _|3
     |9        |4  |2                       |9        |4  |2
               |5  |3
                   |4
.
         Figure 5.                                Figure 6.
.
Then we join the sub-diagrams              Finally we erase the parts that
forming staircases (or zig-zag             are beyond a certain level (in
paths) that represent the                  this case beyond the 9th level)
partitions that have the same              to make the diagram more standard.
number of parts.
.
The numbers in the k-th staircase (from left to right) are the elements of the k-th column of the triangular array.
Note that this diagram is essentially the same diagram used to represent the triangles A237048, A235791, A237591, and other related sequences such as A001227, A060831 and A204217.
There is an infinite family of this kind of triangles, which are related to polygonal numbers and partitions into consecutive parts that differ by d. For more information see the theorems in A285914 and A303300.
Note that if we take two images of the diagram mirroring each other, with the y-axis in the middle of them, then a new diagram is formed, which is symmetric and represents the sequence A237593 as an isosceles triangle. Then if we fold each level (or row) of that isosceles triangle 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). (End)
		

Crossrefs

Another version of A286000.
Tables of the same family where the consecutive parts differ by d are A010766 (d=0), this sequence (d=1), A332266 (d=2), A334945 (d=3), A334618(d=4).

A296508 Irregular triangle read by rows: T(n,k) is the size of the subpart that is adjacent to the k-th peak of the largest Dyck path of the symmetric representation of sigma(n), or T(n,k) = 0 if the mentioned subpart is already associated to a previous peak or if there is no subpart adjacent to the k-th peak, with n >= 1, k >= 1.

Original entry on oeis.org

1, 3, 2, 2, 7, 0, 3, 3, 11, 1, 0, 4, 0, 4, 15, 0, 0, 5, 3, 5, 9, 0, 9, 0, 6, 0, 0, 6, 23, 5, 0, 0, 7, 0, 0, 7, 12, 0, 12, 0, 8, 7, 1, 0, 8, 31, 0, 0, 0, 0, 9, 0, 0, 0, 9, 35, 2, 0, 2, 0, 10, 0, 0, 0, 10, 39, 0, 3, 0, 0, 11, 5, 0, 5, 0, 11, 18, 0, 0, 0, 18, 0, 12, 0, 0, 0, 0, 12, 47, 13, 0, 0, 0, 0, 13, 0, 5, 0, 0, 13
Offset: 1

Views

Author

Omar E. Pol, Feb 10 2018

Keywords

Comments

Conjecture: row n is formed by the odd-indexed terms of the n-th row of triangle A280850 together with the even-indexed terms of the same row but listed in reverse order. Examples: the 15th row of A280850 is [8, 8, 7, 0, 1] so the 15th row of this triangle is [8, 7, 1, 0, 8]. The 75th row of A280850 is [38, 38, 21, 0, 3, 3, 0, 0, 0, 21, 0] so the 75h row of this triangle is [38, 21, 3, 0, 0, 0, 21, 0, 3, 0, 38].
For the definition of "subparts" see A279387.
For more information about the mentioned Dyck paths see A237593.
T(n,k) could be called the "charge" of the k-th peak of the largest Dyck path of the symmetric representation of sigma(n).
The number of zeros in row n is A238005(n). - Omar E. Pol, Sep 11 2021

Examples

			Triangle begins (rows 1..28):
   1;
   3;
   2,  2;
   7,  0;
   3,  3;
  11,  1,  0;
   4,  0,  4;
  15,  0,  0;
   5,  3,  5;
   9,  0,  9,  0;
   6,  0,  0,  6;
  23,  5,  0,  0;
   7,  0,  0,  7;
  12,  0, 12,  0;
   8,  7,  1,  0,  8;
  31,  0,  0,  0,  0;
   9,  0,  0,  0,  9;
  35,  2,  0,  2,  0;
  10,  0,  0,  0, 10;
  39,  0,  3,  0,  0;
  11,  5,  0,  5,  0, 11;
  18,  0,  0,  0, 18,  0;
  12,  0,  0,  0,  0, 12;
  47, 13,  0,  0,  0,  0;
  13,  0,  5,  0,  0, 13;
  21,  0,  0,  0  21,  0;
  14,  6,  0,  6,  0, 14;
  55,  0,  0,  1,  0,  0,  0;
  ...
For n = 15 we have that the 14th row of triangle A237593 is [8, 3, 1, 2, 2, 1, 3, 8] and the 15th row of the same triangle is [8, 3, 2, 1, 1, 1, 1, 2, 3, 8], so the diagram of the symmetric representation of sigma(15) is constructed in the third quadrant as shown below in Figure 1:
.    _                                  _
.   | |                                | |
.   | |                                | |
.   | |                                | |
. 8 | |                                | |
.   | |                                | |
.   | |                                | |
.   | |                                | |
.   |_|_ _ _                           |_|_ _ _
.         | |_ _                      8      | |_ _
.         |_    |                            |_ _  |
.           |_  |_                          7  |_| |_
.          8  |_ _|                           1  |_ _|
.                 |                             0    |
.                 |_ _ _ _ _ _ _ _                   |_ _ _ _ _ _ _ _
.                 |_ _ _ _ _ _ _ _|                  |_ _ _ _ _ _ _ _|
.                         8                         8
.
.   Figure 1. The symmetric            Figure 2. After the dissection
.   representation of sigma(15)        of the symmetric representation
.   has three parts of size 8          of sigma(15) into layers of
.   because every part contains        width 1 we can see four subparts,
.   8 cells, so the 15th row of        so the 15th row of this triangle is
.   triangle A237270 is [8, 8, 8].     [8, 7, 1, 0, 8]. See also below.
.
Illustration of first 50 terms (rows 1..16 of triangle) in an irregular spiral which can be find in the top view of the pyramid described in A244050:
.
.               12 _ _ _ _ _ _ _ _
.                 |  _ _ _ _ _ _ _|_ _ _ _ _ _ _ 7
.                 | |             |_ _ _ _ _ _ _|
.              0 _| |                           |
.               |_ _|9 _ _ _ _ _ _              |_ _ 0
.         12 _ _|     |  _ _ _ _ _|_ _ _ _ _ 5      |_ 0
.    0 _ _ _| |    0 _| |         |_ _ _ _ _|         |
.     |  _ _ _|  9 _|_ _|                   |_ _ 3    |_ _ _ 7
.     | |    0 _ _| |   11 _ _ _ _          |_  |         | |
.     | |     |  _ _|  1 _|  _ _ _|_ _ _ 3    |_|_ _ 5    | |
.     | |     | |    0 _|_| |     |_ _ _|         | |     | |
.     | |     | |     |  _ _|           |_ _ 3    | |     | |
.     | |     | |     | |    3 _ _        | |     | |     | |
.     | |     | |     | |     |  _|_ 1    | |     | |     | |
.    _|_|    _|_|    _|_|    _|_| |_|    _|_|    _|_|    _|_|    _
.   | |     | |     | |     | |         | |     | |     | |     | |
.   | |     | |     | |     |_|_ _     _| |     | |     | |     | |
.   | |     | |     | |    2  |_ _|_ _|  _|     | |     | |     | |
.   | |     | |     |_|_     2    |_ _ _|  0 _ _| |     | |     | |
.   | |     | |    4    |_               7 _|  _ _|0    | |     | |
.   | |     |_|_ _     0  |_ _ _ _        |  _|    _ _ _| |     | |
.   | |    6      |_      |_ _ _ _|_ _ _ _| |  0 _|  _ _ _|0    | |
.   |_|_ _ _     0  |_   4        |_ _ _ _ _|  _|  _| |    _ _ _| |
.  8      | |_ _   0  |                     15|  _|  _|   |  _ _ _|
.         |_ _  |     |_ _ _ _ _ _            | |_ _|  0 _| |      0
.        7  |_| |_    |_ _ _ _ _ _|_ _ _ _ _ _| |    5 _|  _|
.          1  |_ _|  6            |_ _ _ _ _ _ _|  _ _|  _|  0
.            0    |                             23|  _ _|  0
.                 |_ _ _ _ _ _ _ _                | |    0
.                 |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _| |
.                8                |_ _ _ _ _ _ _ _ _|
.                                                    31
.
The diagram contains 30 subparts equaling A060831(16), the total number of partitions of all positive integers <= 16 into consecutive parts.
For the construction of the spiral see A239660.
From _Omar E. Pol_, Nov 26 2020: (Start)
Also consider the infinite double-staircases diagram defined in A335616 (see the theorem). For n = 15 the diagram with first 15 levels looks like this:
.
Level                         "Double-staircases" diagram
.                                          _
1                                        _|1|_
2                                      _|1 _ 1|_
3                                    _|1  |1|  1|_
4                                  _|1   _| |_   1|_
5                                _|1    |1 _ 1|    1|_
6                              _|1     _| |1| |_     1|_
7                            _|1      |1  | |  1|      1|_
8                          _|1       _|  _| |_  |_       1|_
9                        _|1        |1  |1 _ 1|  1|        1|_
10                     _|1         _|   | |1| |   |_         1|_
11                   _|1          |1   _| | | |_   1|          1|_
12                 _|1           _|   |1  | |  1|   |_           1|_
13               _|1            |1    |  _| |_  |    1|            1|_
14             _|1             _|    _| |1 _ 1| |_    |_             1|_
15            |1              |1    |1  | |1| |  1|    1|              1|
.
Starting from A196020 and after the algorithm described n A280850 and the conjecture applied to the above diagram we have a new diagram as shown below:
.
Level                             "Ziggurat" diagram
.                                          _
6                                         |1|
7                            _            | |            _
8                          _|1|          _| |_          |1|_
9                        _|1  |         |1   1|         |  1|_
10                     _|1    |         |     |         |    1|_
11                   _|1      |        _|     |_        |      1|_
12                 _|1        |       |1       1|       |        1|_
13               _|1          |       |         |       |          1|_
14             _|1            |      _|    _    |_      |            1|_
15            |1              |     |1    |1|    1|     |              1|
.
The 15th row
of A249351:   [1,1,1,1,1,1,1,1,0,0,0,1,1,1,2,1,1,1,0,0,0,1,1,1,1,1,1,1,1]
The 15th row
of A237270:   [              8,            8,            8              ]
The 15th row
of this seq:  [              8,      7,    1,    0,      8              ]
The 15th row
of A280851:   [              8,      7,    1,            8              ]
.
(End)
		

Crossrefs

Row sums give A000203.
Row n has length A003056(n).
Column k starts in row A000217(k).
Nonzero terms give A280851.
The number of nonzero terms in row n is A001227(n).
The triangle with n rows contain A060831(n) nonzero terms.

A341969 Irregular triangle read by rows in which row n lists the sequence of widths, each contiguous sequence of identical widths w in A249223 replaced by a single entry of w, in the symmetric representation of sigma(n).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 2, 1
Offset: 1

Views

Author

Hartmut F. W. Hoft, Feb 24 2021

Keywords

Comments

This sequence is a companion to A279387 in which each contiguous sequence of identical widths w in A249223 are replaced by a single entry of w. Using the resulting distribution pattern of widths across all parts of the symmetric representation of sigma(n) the subparts at each level are counted in A279387.
The sequence of widths are computed first to the diagonal of the symmetric representation of sigma only for those numbers in set F defined in A341971. Then the reversed list less its first number is appended so that the width at the diagonal is not listed twice. Thus every row contains an odd number of entries and is symmetric about its center entry.
Let 1 <= n, 1 <= d <= s = A001227(n) and 1 <= k <= r = floor((sqrt(8*n + 1) - 1)/2). Let Q(n,d) be row n in the triangle of A341970, R(n,d) be row n in the triangle of A341970 and S(n,d) = R(n,Q(n,d)), then T(n,e) = S(n,e) for 1 <= e <= s and T(n,e) = S(n,2*s - e) for s < e <= 2*s - 1 is row n for this sequence.

Examples

			The irregular triangle for A279387 and this sequence:
  row  A279387  A341969
  1    1        1
  2    1        1
  3    2        1  0  1
  4    1        1
  5    2        1  0  1
  6    1  1     1  2  1
  7    2        1  0  1
  8    1        1
  9    3        1  0  1  0  1
  10   2        1  0  1
  11   2        1  0  1
  12   1  1     1  2  1
  13   2        1  0  1
  14   2        1  0  1
  15   3  1     1  0  1  2  1  0  1
  16   1        1
  17   2        1  0  1
  18   1  2     1  2  1  2  1
  19   2        1  0  1
  20   1  1     1  2  1
  21   4        1  0  1  0  1  0  1
  ..   ..       ..
  30   1  3     1  2  1  2  1  2  1
  ..   ..       ..
  45   3  3     1  0  1  2  1  2  1  2  1  0  1
  ..   ..       ..
a(17)..a(21) = { 1, 0, 1, 0, 1 } is row 9; the symmetric representation of sigma(9) consists of 3 parts of width 1 - see A247687.
a(37)..a(43) = { 1, 0, 1, 2, 1, 0, 1} is row 15; the symmetric representation of sigma(15) consists of 2 outer parts of width 1 and a central part of width 2 only at the diagonal - see A338488.
a(59)..a(65) = { 1, 0, 1, 0, 1, 0, 1 } is row 21; the symmetric representation of sigma(21) consists of 4 parts of width 1, and 21 is the smallest such number - see A264102.
a(234)..a(240) = { 1, 2, 3, 2, 3, 2, 1 } is row 60; the symmetric representation of sigma(60) consists of 1 part of maximum width 3 which occurs in two subparts, and 60 is the smallest number with width 3 - see A250070.
		

Crossrefs

Programs

  • Mathematica
    (* function widthL[ ] is defined in A341971 *)
    a341969[n_] := Module[{wL=widthL[n]}, Join[wL, Rest[Reverse[wL]]]]
    Flatten[Table[a341969[n], {n, 28}]] (* the first 28 rows of the table *)

Formula

a(2*A060831(n-1) - (n-1) + e) = T(n,e), 1 <= n, 1 <= e <= 2*A001227(n) - 1.

A066897 Total number of odd parts in all partitions of n.

Original entry on oeis.org

1, 2, 5, 8, 15, 24, 39, 58, 90, 130, 190, 268, 379, 522, 722, 974, 1317, 1754, 2330, 3058, 4010, 5200, 6731, 8642, 11068, 14076, 17864, 22528, 28347, 35490, 44320, 55100, 68355, 84450, 104111, 127898, 156779, 191574, 233625, 284070, 344745, 417292, 504151
Offset: 1

Views

Author

Naohiro Nomoto, Jan 24 2002

Keywords

Comments

Also sum of all odd-indexed parts minus the sum of all even-indexed parts of all partitions of n (Cf. A206563). - Omar E. Pol, Feb 12 2012
Column 1 of A206563. - Omar E. Pol, Feb 15 2012
Suppose that p=[p(1),p(2),p(3),...] is a partition of n with parts in nonincreasing order. Let f(p) = p(1) - p(2) + p(3) - ... be the alternating sum of parts of p and let F(n) = sum of alternating sums of all partitions of n. Conjecture: F(n) = A066897(n) for n >= 1. - Clark Kimberling, May 17 2019
From Omar E. Pol, Apr 02 2023: (Start)
Convolution of A000041 and A001227.
Convolution of A002865 and A060831.
a(n) is also the total number of odd divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. The mentioned odd divisors are also all odd parts of all partitions of n. (End)
a(n) is odd iff n is a term of A067567 (proof: n*p(n) = the sum of the parts in all the partitions of n == the number of odd parts in all partitions of n (mod 2). Hence the number of odd parts in all partitions of n is odd iff n*p(n) is odd, equivalently, iff both n and p(n) are odd). - Peter Bala, Jan 11 2025

Examples

			a(4) = 8 because in the partitions of 4, namely [4],[3,1],[2,2],[2,1,1],[1,1,1,1], we have a total of 0+2+0+2+4=8 odd parts.
		

Crossrefs

Programs

  • Haskell
    a066897 = p 0 1 where
       p o _             0 = o
       p o k m | m < k     = 0
               | otherwise = p (o + mod k 2) k (m - k) + p o (k + 1) m
    -- Reinhard Zumkeller, Mar 09 2012
    
  • Haskell
    a066897 = length . filter odd . concat . ps 1 where
       ps _ 0 = [[]]
       ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
    -- Reinhard Zumkeller, Jul 13 2013
  • Maple
    g:=sum(x^(2*j-1)/(1-x^(2*j-1)),j=1..70)/product(1-x^j,j=1..70): gser:=series(g,x=0,45): seq(coeff(gser,x^n),n=1..44);
    # Emeric Deutsch, Mar 13 2006
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+ (i mod 2)*g[1]]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..50);
    # Alois P. Heinz, Mar 22 2012
  • Mathematica
    f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]
    o[n_] := Sum[f[n, i], {i, 1, n, 2}]
    e[n_] := Sum[f[n, i], {i, 2, n, 2}]
    Table[o[n], {n, 1, 45}]  (* A066897 *)
    Table[e[n], {n, 1, 45}]  (* A066898 *)
    %% - %                   (* A209423 *)
    (* Clark Kimberling, Mar 08 2012 *)
    b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, n}, f = b[n, i-1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + Mod[i, 2]*g[[1]]}] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 26 2015, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} b(k)*numbpart(n-k), where b(k)=A001227(k)=number of odd divisors of k and numbpart() is A000041. - Vladeta Jovovic, Jan 26 2002
a(n) = Sum_{k=0..n} k*A103919(n,k). - Emeric Deutsch, Mar 13 2006
G.f.: Sum_{j>=1}(x^(2j-1)/(1-x^(2j-1)))/Product_{j>=1}(1-x^j). - Emeric Deutsch, Mar 13 2006
a(n) = A066898(n) + A209423(n) = A006128(n) - A066898(n). [Reinhard Zumkeller, Mar 09 2012]
a(n) = A207381(n) - A207382(n). - Omar E. Pol, Mar 11 2012
a(n) = (A006128(n) + A209423(n))/2. - Vaclav Kotesovec, May 25 2018
a(n) ~ exp(Pi*sqrt(2*n/3)) * (2*gamma + log(24*n/Pi^2)) / (8*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 25 2018

Extensions

More terms from Vladeta Jovovic, Jan 26 2002

A237590 a(n) is the total number of regions (or parts) after n-th stage in the diagram of the symmetries of sigma described in A236104.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 14, 16, 18, 19, 21, 23, 26, 27, 29, 30, 32, 33, 37, 39, 41, 42, 45, 47, 51, 52, 54, 55, 57, 58, 62, 64, 67, 68, 70, 72, 76, 77, 79, 80, 82, 84, 87, 89, 91, 92, 95, 98, 102, 104, 106, 107, 111, 112, 116, 118, 120, 121, 123, 125, 130, 131, 135, 136, 138, 140, 144, 147, 149, 150, 152, 154
Offset: 1

Views

Author

Omar E. Pol, Mar 31 2014

Keywords

Comments

The total area (or total number of cells) of the diagram after n stages is equal to A024916(n), the sum of all divisors of all positive integers <= n.
Note that the region between the virtual circumscribed square and the diagram is a symmetric polygon whose area is equal to A004125(n), see example.
For more information see A237593 and A237270.
a(n) is also the total number of terraces of the stepped pyramid with n levels described in A245092. - Omar E. Pol, Apr 20 2016

Examples

			Illustration of initial terms:
.                                                         _ _ _ _
.                                           _ _ _        |_ _ _  |_
.                               _ _ _      |_ _ _|       |_ _ _|   |_
.                     _ _      |_ _  |_    |_ _  |_ _    |_ _  |_ _  |
.             _ _    |_ _|_    |_ _|_  |   |_ _|_  | |   |_ _|_  | | |
.       _    |_  |   |_  | |   |_  | | |   |_  | | | |   |_  | | | | |
.      |_|   |_|_|   |_|_|_|   |_|_|_|_|   |_|_|_|_|_|   |_|_|_|_|_|_|
.
.
.       1      2        4          5            7              8
.
For n = 6 the diagram contains 8 regions (or parts), so a(6) = 8.
The sum of all divisors of all positive integers <= 6 is [1] + [1+2] + [1+3] + [1+2+4] + [1+5] + [1+2+3+6] = 33. On the other hand after 6 stages the sum of all parts of the diagram is [1] + [3] + [2+2] + [7] + [3+3] + [12] = 33, equaling the sum of all divisors of all positive integers <= 6.
Note that the region between the virtual circumscribed square and the diagram is a symmetric polygon whose area is equal to A004125(6) = 3.
From _Omar E. Pol_, Dec 25 2020: (Start)
Illustration of the diagram after 29 stages (contain 215 vertices, 268 edges and 54 regions or parts):
._ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _  |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _| |
|_ _ _ _ _ _ _ _ _ _ _ _ _  | |
|_ _ _ _ _ _ _ _ _ _ _ _ _| | |
|_ _ _ _ _ _ _ _ _ _ _ _  | | |_ _ _
|_ _ _ _ _ _ _ _ _ _ _ _| | |_ _ _  |
|_ _ _ _ _ _ _ _ _ _ _  | | |_ _  | |_
|_ _ _ _ _ _ _ _ _ _ _| | |_ _ _| |_  |_
|_ _ _ _ _ _ _ _ _ _  | |       |_ _|   |_
|_ _ _ _ _ _ _ _ _ _| | |_ _    |_  |_ _  |_ _
|_ _ _ _ _ _ _ _ _  | |_ _ _|     |_  | |_ _  |
|_ _ _ _ _ _ _ _ _| | |_ _  |_      |_|_ _  | |
|_ _ _ _ _ _ _ _  | |_ _  |_ _|_        | | | |_ _ _ _ _ _
|_ _ _ _ _ _ _ _| |     |     | |_ _    | |_|_ _ _ _ _  | |
|_ _ _ _ _ _ _  | |_ _  |_    |_  | |   |_ _ _ _ _  | | | |
|_ _ _ _ _ _ _| |_ _  |_  |_ _  | | |_ _ _ _ _  | | | | | |
|_ _ _ _ _ _  | |_  |_  |_    | |_|_ _ _ _  | | | | | | | |
|_ _ _ _ _ _| |_ _|   |_  |   |_ _ _ _  | | | | | | | | | |
|_ _ _ _ _  |     |_ _  | |_ _ _ _  | | | | | | | | | | | |
|_ _ _ _ _| |_      | |_|_ _ _  | | | | | | | | | | | | | |
|_ _ _ _  |_ _|_    |_ _ _  | | | | | | | | | | | | | | | |
|_ _ _ _| |_  | |_ _ _  | | | | | | | | | | | | | | | | | |
|_ _ _  |_  |_|_ _  | | | | | | | | | | | | | | | | | | | |
|_ _ _|   |_ _  | | | | | | | | | | | | | | | | | | | | | |
|_ _  |_ _  | | | | | | | | | | | | | | | | | | | | | | | |
|_ _|_  | | | | | | | | | | | | | | | | | | | | | | | | | |
|_  | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
(End)
		

Crossrefs

Partial sums of A237271.
Compare with A060831 (analog for the diagram that contains subparts).

Programs

  • Mathematica
    (* total number of parts in the first n symmetric representations *)
    (* Function a237270[] is defined in A237270 *)
    (* variable "previous" represents the sum from 1 through m-1 *)
    a237590[previous_,{m_,n_}]:=Rest[FoldList[Plus[#1,Length[a237270[#2]]]&,previous,Range[m,n]]]
    a237590[n_]:=a237590[0,{1,n}]
    a237590[78] (* data *)
    (* Hartmut F. W. Hoft, Jul 07 2014 *)

Formula

a(n) = A317109(n) - A294723(n) + 1 (Euler's formula). - Omar E. Pol, Jul 21 2018

Extensions

Definition clarified by Omar E. Pol, Jul 21 2018

A341971 Irregular triangle read by rows in which row n lists the values in row n of A235791 whose indices are in row n of A341970; a number is signed when its index is even.

Original entry on oeis.org

1, 2, 3, -1, 4, 5, -2, 6, 1, 7, -3, 8, 9, -4, 2, 10, -1, 11, -5, 12, 3, 13, -6, 14, -2, 15, -7, 4, 1, 16, 17, -8, 18, 5, -3, 19, -9, 20, 2, 21, -10, 6, -1, 22, -4, 23, -11, 24, 7, 25, -12, 3, 26, -5, 27, -13, 8, -2, 28, 1, 29, -14, 30, 9, -6, 4, 31, -15
Offset: 1

Views

Author

Hartmut F. W. Hoft, Feb 24 2021

Keywords

Comments

Row n has length A001227(n), the number of odd divisors of n, and also the number of entries in row n of A341970.
Let 1 <= n, 1 <= d <= A001227(n) and k = A341970(A060831(n-1) + d). Expression s(n, k) = r*n - r*(r+1)*(r+2)/6 + k with r = floor((sqrt(8*n + 1) - 1)/2) translates position (row n, column k) in the triangle of A235791 to its position in sequence A235791.
The absolute values in row n are the smallest parts of the partitions of n into consecutive parts (with the partitions ordered by increasing number of parts). - Omar E. Pol, Dec 31 2024

Examples

			Triangle begins:
   1
   2
   3  -1
   4
   5  -2
   6   1
   7  -3
   8
   9  -4   2
  10  -1
  11  -5
  12   3
  13  -6
  14  -2
  15  -7   4   1
  16
  17  -8
  18   5  -3
  19  -9
  20   2
  21 -10   6  -1
...
a(26)..a(29) = { 15, -7, 4, 1 } is row 15 in this sequence with corresponding row 15 { 1, 1, 1, 0, 1 } in A237048. The sum 15 - 7 = 8 represents the first (complete) part of the symmetric representation of sigma(15), while 4 gives to incomplete bottom subpart of the central part and 1 the complete subpart of the second layer on the diagonal of the central part. Because of the double counting on the diagonal the completed subparts of the symmetric central part have size 7 and 1 respectively, see A280851, so that the parts of the symmetric representation of sigma(15) are (8, 8, 8).
a(40)..a(43) = { 21, -10, 6, -1 } is row 21 in this sequence with corresponding row 21 { 1, 1, 1, 0, 0, 1 } in A237048. The sums 21 - 10 = 11 and 6 - 1 = 5 denote the sizes of the two (complete) parts of width 1 of the symmetric representation of sigma(21) up to the diagonal resulting in the four parts ( 11, 5, 5, 11 ).
		

Crossrefs

Programs

  • Mathematica
    (* Function a341970[ ] is defined in A341970 *)
    widthL[n_] := Rest[FoldList[#1+If[OddQ[#2], +1, -1]&, 0, a341970[n]]]
    sT[n_] := Map[(-1)^(#+1) Ceiling[(n+1)/# - (#+1)/2]&, a341970[n]]
    a341971[n_] := Flatten[Map[sT, Range[n]]]
    a341971[31] (* first 31 rows of table *)

Formula

a(A060831(n-1) + d) = T(n,d) = (-1)^(k+1)*A235791(s(n, k)).

A341970 Irregular triangle read by rows of the indices of the entries of 1's in the corresponding rows in A237048.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, 3, 1, 4, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 3, 5, 1, 1, 2, 1, 3, 4, 1, 2, 1, 5, 1, 2, 3, 6, 1, 4, 1, 2, 1, 3, 1, 2, 5, 1, 4, 1, 2, 3, 6, 1, 7, 1, 2, 1, 3, 4, 5, 1, 2, 1, 1, 2, 3, 6, 1, 4, 1, 2, 5, 7, 1, 3, 8, 1, 2, 1, 4, 1, 2, 3, 6, 1, 5
Offset: 1

Views

Author

Hartmut F. W. Hoft, Feb 24 2021

Keywords

Comments

The number of entries in the n-th row of the table of this sequence is A001227(n), the number of odd divisors of n.
Let number n = 2^s * q with s >= 0 and q odd, let row(n) = floor( (sqrt(8*n+1) - 1)/2 ), let D_n = { d : d odd divisor of n and d <= row(n) }, let E_n = { e : e = 2^(s+1) * d, d in D_n and e <= row(n) } and let F_n be the union of D_n and E_n with its elements listed in increasing order. Then the numbers in F_n are exactly the positions of 1's in row n of A237048 and the numbers in row n of this sequence.

Examples

			a(8, 9) = { 1, 3 } is row 6 in this sequence with corresponding row 6  { 1,  0,  1 } in A237048.
a(26...29) = { 1, 2, 3, 5 } is row 15 in this sequence with corresponding row 15 { 1, 1, 1, 0, 1 } in A237048.
Table of the first 15 rows:
row    entries
1      1
2      1
3      1  1
4      1
5      1  2
6      1  3
7      1  2
8      1
9      1  2  3
10     1  4
11     1  2
12     1  3
13     1  2
14     1  4
15     1  2  3  5
		

Crossrefs

Programs

  • Mathematica
    row[n_] := Floor[(Sqrt[8 n+1]-1)/2]
    oddD[n_] := Select[Divisors[n], OddQ[#]&&#<=row[n]&]
    twoExp[n_] := Module[{f=FactorInteger[n]}, If[First[First[f]]==2, Last[First[f]], 0]]
    dualD[n_] := Select[Map[2^(twoExp[n]+1)#&, oddD[n]], #<=row[n]&]
    a341970[n_] := Union[oddD[n], dualD[n]]
    Flatten[Map[a341970, Range[40]]] (* first 40 rows of table *)

Formula

Let 1 <= n, 1 <= d <= A001227(n) and k the index of the d-th 1 in row n of A237048.
a( A060831(n-1) + d ) = T(n, d) = k.
Showing 1-10 of 34 results. Next