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 72 results. Next

A280919 Precipices from the successive terraces, descending by the main diagonal of the pyramid described in A245092. Also first differences of A071562.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 10 2017

Keywords

Comments

Descending by the main diagonal of the pyramid, A071562 gives the levels where we can find a terrace.
The terraces at the k-th level of the pyramid are also the parts of the symmetric representation of sigma(k).
a(n) is the length of the n-th vertical line segment at the main diagonal of the pyramid.
a(n) is the precipice of A071562(n).
The structure of the stepped pyramid arises after the 90-degree-zig-zag folding of the diagram of the isosceles triangle A237593.
The stepped pyramid is also one of the 3D-quadrants of the stepped pyramid described in A244050.
Equals nonzero terms of A259179. - Omar E. Pol, Apr 17 2018

Crossrefs

For more information about the precipices see A276112, A277437, A280223 and A280295.

Programs

Formula

a(n) = A280223(A071562(n)).

Extensions

More terms from Michael De Vlieger, Jan 13 2017

A071541 Number of k's less than or equal to 10^n such that there are middle divisors of k (A071562).

Original entry on oeis.org

6, 43, 336, 2932, 26870, 252756, 2409731, 23169860, 224059958, 2175865640
Offset: 1

Views

Author

Robert G. Wilson v, May 31 2002

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Select[ Divisors[n], Sqrt[n/2] <= # < Sqrt[n*2] &]; s = 0; k = 0; Do[ While[k < 10^n, k++; If[ f[k] != 0, s++ ]]; Print[s], {n, 1, 7}]
  • PARI
    lista(nmax) = {my(c = 0, pow = 10); for(k = 1, 10^nmax, if(sumdiv(k, d, if(d^2 >= k/2 && d^2 < 2*k, d, 0)) > 0, c++); if(k == pow, print1(c, ", "); pow *= 10));} \\ Amiram Eldar, Jul 27 2024

Formula

a(n) = 10^n - A071540(n). - Amiram Eldar, Jul 27 2024

Extensions

a(8) from Sean A. Irvine, Jul 25 2024
a(9)-a(10) from Amiram Eldar, Jul 27 2024

A176039 Primitive elements of A071562.

Original entry on oeis.org

1, 2, 6, 9, 15, 20, 25, 28, 35, 42, 45, 49, 63, 66, 77, 88, 91, 99, 104, 110, 117, 121, 130, 143, 153, 156, 165, 169, 170, 187, 190, 195, 204, 209, 221, 228, 231, 238, 247, 255, 266, 272, 273, 276, 285, 289, 299, 304, 322, 323, 325, 342, 345, 350, 357, 361, 368
Offset: 1

Views

Author

Keywords

Comments

Members of A071562 which cannot be expressed as the product of two smaller elements of that sequence.
This definition is made to include 1; it would make about as much sense to exclude it.
This sequence includes all numbers of the form a*p, where p/2 < a <= p, for p prime. It also includes all p*q*r, where p, q, and r are odd primes, and p*q/2 < r < p*q. Similar but increasingly complex conditions can be made for products of more primes.

Examples

			4 is not in the sequence, because 4 = 2*2, and 2 is in A071562.
		

A241562 Duplicate of A071562.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 12, 15, 16, 18, 20, 24, 25, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 66, 70, 72, 77, 80, 81, 84, 88, 90, 91, 96, 98, 99, 100, 104, 108, 110, 112, 117, 120, 121, 126, 128, 130, 132, 135, 140, 143, 144, 150, 153, 154, 156, 160
Offset: 1

Views

Author

Keywords

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

A262626 Visible parts of the perspective view of the stepped pyramid whose structure essentially arises after the 90-degree-zig-zag folding of the isosceles triangle A237593.

Original entry on oeis.org

1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 7, 3, 1, 1, 3, 3, 3, 3, 2, 2, 3, 12, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 1, 1, 2, 4, 15, 5, 2, 1, 1, 2, 5, 5, 3, 5, 5, 2, 2, 2, 2, 5, 9, 9, 6, 2, 1, 1, 1, 1, 2, 6, 6, 6, 6, 3, 1, 1, 1, 1, 3, 6, 28, 7, 2, 2, 1, 1, 2, 2, 7, 7, 7, 7, 3, 2, 1, 1, 2, 3, 7, 12, 12, 8, 3, 1, 2, 2, 1, 3, 8, 8, 8, 8, 8, 3, 2, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Sep 26 2015

Keywords

Comments

Also the rows of both triangles A237270 and A237593 interleaved.
Also, irregular triangle read by rows in which T(n,k) is the area of the k-th region (from left to right in ascending diagonal) of the n-th symmetric set of regions (from the top to the bottom in descending diagonal) in the two-dimensional diagram of the perspective view of the infinite stepped pyramid described in A245092 (see the diagram in the Links section).
The diagram of the symmetric representation of sigma is also the top view of the pyramid, see Links section. For more information about the diagram see also A237593 and A237270.
The number of cubes at the n-th level is also A024916(n), the sum of all divisors of all positive integers <= n.
Note that this pyramid is also a quarter of the pyramid described in A244050. Both pyramids have infinitely many levels.
Odd-indexed rows are also the rows of the irregular triangle A237270.
Even-indexed rows are also the rows of the triangle A237593.
Lengths of the odd-indexed rows are in A237271.
Lengths of the even-indexed rows give 2*A003056.
Row sums of the odd-indexed rows gives A000203, the sum of divisors function.
Row sums of the even-indexed rows give the positive even numbers (see A005843).
Row sums give A245092.
From the front view of the stepped pyramid emerges a geometric pattern which is related to A001227, the number of odd divisors of the positive integers.
The connection with the odd divisors of the positive integers is as follows: A261697 --> A261699 --> A237048 --> A235791 --> A237591 --> A237593 --> A237270 --> this sequence.

Examples

			Irregular triangle begins:
  1;
  1, 1;
  3;
  2, 2;
  2, 2;
  2, 1, 1, 2;
  7;
  3, 1, 1, 3;
  3, 3;
  3, 2, 2, 3;
  12;
  4, 1, 1, 1, 1, 4;
  4, 4;
  4, 2, 1, 1, 2, 4;
  15;
  5, 2, 1, 1, 2, 5;
  5, 3, 5;
  5, 2, 2, 2, 2, 5;
  9, 9;
  6, 2, 1, 1, 1, 1, 2, 6;
  6, 6;
  6, 3, 1, 1, 1, 1, 3, 6;
  28;
  7, 2, 2, 1, 1, 2, 2, 7;
  7, 7;
  7, 3, 2, 1, 1, 2, 3, 7;
  12, 12;
  8, 3, 1, 2, 2, 1, 3, 8;
  8, 8, 8;
  8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
  31;
  9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
  ...
Illustration of the odd-indexed rows of triangle as the diagram of the symmetric representation of sigma which is also the top view of the stepped pyramid:
.
   n  A000203    A237270    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   1     1   =      1      |_| | | | | | | | | | | | | | | |
   2     3   =      3      |_ _|_| | | | | | | | | | | | | |
   3     4   =    2 + 2    |_ _|  _|_| | | | | | | | | | | |
   4     7   =      7      |_ _ _|    _|_| | | | | | | | | |
   5     6   =    3 + 3    |_ _ _|  _|  _ _|_| | | | | | | |
   6    12   =     12      |_ _ _ _|  _| |  _ _|_| | | | | |
   7     8   =    4 + 4    |_ _ _ _| |_ _|_|    _ _|_| | | |
   8    15   =     15      |_ _ _ _ _|  _|     |  _ _ _|_| |
   9    13   =  5 + 3 + 5  |_ _ _ _ _| |      _|_| |  _ _ _|
  10    18   =    9 + 9    |_ _ _ _ _ _|  _ _|    _| |
  11    12   =    6 + 6    |_ _ _ _ _ _| |  _|  _|  _|
  12    28   =     28      |_ _ _ _ _ _ _| |_ _|  _|
  13    14   =    7 + 7    |_ _ _ _ _ _ _| |  _ _|
  14    24   =   12 + 12   |_ _ _ _ _ _ _ _| |
  15    24   =  8 + 8 + 8  |_ _ _ _ _ _ _ _| |
  16    31   =     31      |_ _ _ _ _ _ _ _ _|
  ...
The above diagram arises from a simpler diagram as shown below.
Illustration of the even-indexed rows of triangle as the diagram of the deployed front view of the corner of the stepped pyramid:
.
.                                 A237593
Level                               _ _
1                                 _|1|1|_
2                               _|2 _|_ 2|_
3                             _|2  |1|1|  2|_
4                           _|3   _|1|1|_   3|_
5                         _|3    |2 _|_ 2|    3|_
6                       _|4     _|1|1|1|1|_     4|_
7                     _|4      |2  |1|1|  2|      4|_
8                   _|5       _|2 _|1|1|_ 2|_       5|_
9                 _|5        |2  |2 _|_ 2|  2|        5|_
10              _|6         _|2  |1|1|1|1|  2|_         6|_
11            _|6          |3   _|1|1|1|1|_   3|          6|_
12          _|7           _|2  |2  |1|1|  2|  2|_           7|_
13        _|7            |3    |2 _|1|1|_ 2|    3|            7|_
14      _|8             _|3   _|1|2 _|_ 2|1|_   3|_             8|_
15    _|8              |3    |2  |1|1|1|1|  2|    3|              8|_
16   |9                |3    |2  |1|1|1|1|  2|    3|                9|
...
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
The diagram represents the first 16 levels of the pyramid.
The diagram of the isosceles triangle and the diagram of the top view of the pyramid shows the connection between the partitions into consecutive parts and the sum of divisors function (see also A286000 and A286001). - _Omar E. Pol_, Aug 28 2018
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - _Omar E. Pol_, Nov 09 2022
		

Crossrefs

Famous sequences that are visible in the stepped pyramid:
Cf. A000040 (prime numbers)......., for the characteristic shape see A346871.
Cf. A000079 (powers of 2)........., for the characteristic shape see A346872.
Cf. A000203 (sum of divisors)....., total area of the terraces in the n-th level.
Cf. A000217 (triangular numbers).., for the characteristic shape see A346873.
Cf. A000225 (Mersenne numbers)...., for a visualization see A346874.
Cf. A000384 (hexagonal numbers)..., for the characteristic shape see A346875.
Cf. A000396 (perfect numbers)....., for the characteristic shape see A346876.
Cf. A000668 (Mersenne primes)....., for a visualization see A346876.
Cf. A001097 (twin primes)........., for a visualization see A346871.
Cf. A001227 (# of odd divisors)..., number of subparts in the n-th level.
Cf. A002378 (oblong numbers)......, for a visualization see A346873.
Cf. A008586 (multiples of 4)......, perimeters of the successive levels.
Cf. A008588 (multiples of 6)......, for the characteristic shape see A224613.
Cf. A013661 (zeta(2))............., (area of the horizontal faces)/(n^2), n -> oo.
Cf. A014105 (second hexagonals)..., for the characteristic shape see A346864.
Cf. A067742 (# of middle divisors), # cells in the main diagonal in n-th level.
Apart from zeta(2) other constants that are related to the stepped pyramid are A072691, A353908, A354238.

A174973 Numbers whose divisors increase by a factor of at most 2.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 66, 72, 80, 84, 88, 90, 96, 100, 104, 108, 112, 120, 126, 128, 132, 140, 144, 150, 156, 160, 162, 168, 176, 180, 192, 196, 198, 200, 204, 208, 210, 216, 220, 224, 228, 234, 240, 252, 256
Offset: 1

Views

Author

T. D. Noe, Apr 02 2010

Keywords

Comments

That is, if the divisors of a number are listed in increasing order, the ratio of adjacent divisors is at most 2. The only odd number in this sequence is 1. Every term appears to be a practical number (A005153). The first practical number not here is 78.
Let p1^e1 * p2^e2 * ... * pr^er be the prime factorization of a number, with primes p1 < p2 < ... < pr and ek > 0. Then the number is in this sequence if and only if pk <= 2*Product_{j < k} p_j^e_j. This condition is similar to, but more restrictive than, the condition for practical numbers.
The polymath8 project led by Terry Tao refers to these numbers as "2-densely divisible". In general they say that n is y-densely divisible if its divisors increase by a factor of y or less, or equivalently, if for every R with 1 <= R <= n, there is a divisor in the interval [R/y,R]. They use this as a weakening of the condition that n be y-smooth. - David S. Metzler, Jul 02 2013
Is this the same as numbers k with the property that the symmetric representation of sigma(k) has only one part? If not, where is the first place these sequences differ? (cf. A237593). - Omar E. Pol, Mar 06 2014
Yes, the sequence so defined is the same as this sequence; see proof in the links. - Hartmut F. W. Hoft, Nov 26 2014
Saias (1997) called these terms "2-dense numbers" and proved that if N(x) is the number of terms not exceeding x, then there are two positive constants c_1 and c_2 such that c_1 * x/log_2(x) <= N(x) <= c_2 * x/log_2(x) for all x >= 2. - Amiram Eldar, Jul 23 2020
Weingartner (2015, 2019) showed that N(x) = c*x/log(x) + O(x/(log(x))^2), where c = 1.224830... As a result, a(n) = C*n*log(n*log(n)) + O(n), where C = 1/c = 0.816439... - Andreas Weingartner, Jun 22 2021

Examples

			The divisors of 12 are 1, 2, 3, 4, 6, 12. The ratios of adjacent divisors is 2, 3/2, 4/3, 3/2, and 2, which are all <= 2. Hence 12 is in this sequence.
Example from _Omar E. Pol_, Mar 06 2014: (Start)
    The symmetric representation of sigma(6) = 12 in the first quadrant looks like this:
   y
   .
   ._ _ _ _
   |_ _ _  |_
   .     |   |_
   .     |_ _  |
   .         | |
   .         | |
   . . . . . |_| . . x
.
6 is in the sequence because the symmetric representation of sigma(6) = 12 has only one part. The 6th row of A237593 is [4, 1, 1, 1, 1, 4] and the 5th row of A237593 is [3, 2, 2, 3] therefore between both symmetric Dyck paths there is only one region (or part) of size 12.
    70 is not in the sequence because the symmetric representation of sigma(70) = 144 has three parts. The 70th row of A237593 is [36, 12, 6, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 6, 12, 36] and the 69th row of A237593 is [35, 12, 7, 4, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 4, 7, 12, 35] therefore between both symmetric Dyck paths there are three regions (or parts) of size [54, 36, 54]. (End)
		

Crossrefs

Subsequence of A196149 and of A071562. A000396 and A000079 are subsequences.
Cf. A027750, A047836, A237593, A365429 (characteristic function).
Column 1 of A240062.
First differs from A103288 and A125225 at a(23). First differs from A005153 at a(24).

Programs

  • Haskell
    a174973 n = a174973_list !! (n-1)
    a174973_list = filter f [1..] where
       f n = all (<= 0) $ zipWith (-) (tail divs) (map (* 2) divs)
             where divs = a027750_row' n
    -- Reinhard Zumkeller, Jun 25 2015, Sep 28 2011
    
  • Magma
    [k:k in [1..260]|forall{i:i in [1..#Divisors(k)-1]|d[i+1]/d[i] le 2 where d is Divisors(k)}]; // Marius A. Burtea, Jan 09 2020
    
  • Maple
    a:= proc() option remember; local k; for k from 1+`if`(n=1, 0,
          a(n-1)) while (l-> ormap(x-> x, [seq(l[i]>l[i-1]*2, i=2..
          nops(l))]))(sort([(numtheory[divisors](k))[]])) do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 27 2018
  • Mathematica
    OK[n_] := Module[{d=Divisors[n]}, And@@(#<=2& /@ (Rest[d]/Most[d]))]; Select[Range[1000], OK]
    dif2Q[n_]:=AllTrue[#[[2]]/#[[1]]&/@Partition[Divisors[n],2,1],#<=2&]; Select[Range[300],dif2Q] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 29 2020 *)
  • PARI
    is(n)=my(d=divisors(n));for(i=2,#d,if(d[i]>2*d[i-1],return(0)));1 \\ Charles R Greathouse IV, Jul 06 2013
    
  • Python
    from sympy import divisors
    def ok(n):
        d = divisors(n)
        return all(d[i]/d[i-1] <= 2 for i in range(1, len(d)))
    print(list(filter(ok, range(1, 257)))) # Michael S. Branicky, Jun 22 2021

Formula

a(n) = A047836(n) / 2. - Reinhard Zumkeller, Sep 28 2011
a(n) = C*n*log(n*log(n)) + O(n), where C = 0.816439... (see comments). - Andreas Weingartner, Jun 23 2021

Extensions

Edited by N. J. A. Sloane, Sep 09 2023
Edited by Peter Munn, Oct 17 2023

A067742 Number of middle divisors of n, i.e., divisors in the half-open interval [sqrt(n/2), sqrt(n*2)).

Original entry on oeis.org

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

Views

Author

Marc LeBrun, Jan 29 2002

Keywords

Comments

Comment from N. J. A. Sloane, Jan 03 2021: (Start)
Theorem 1: (i) a(n) = (number of odd divisors of n <= sqrt(2*n)) - (number of odd divisors of n > sqrt(2*n)).
(ii) Let r(n) = A003056(n). Then a(n) = (number of odd divisors of n <= r(n)) - (number of odd divisors of n > r(n)).
(iii) a(n) = Sum_{k=1..r(n)} (-1)^(k+1)*A237048(n,k).
(iv) a(n) is odd iff n is a square or twice a square (cf. A053866). Indices of odd terms give A028982. Indices of even terms give A028983.
The proofs are straightforward. These results were conjectured by Omar E. Pol in 2017. (End)
Theorem 2: a(n) is equal to the difference between the number of partitions of n into an odd number of consecutive parts and the number of partitions of n into an even number of consecutive parts. [Chapman et al., 2001; Hirschhorn and Hirschhorn, 2005]. - Omar E. Pol, Feb 06 2017
From Omar E. Pol, Feb 06 2017: (Start)
Conjecture 1: This is the central column of the isosceles triangle of A249351.
Conjecture 2: a(n) is also the width of the terrace at the n-th level in the main diagonal of the pyramid described in A245092.
Conjecture 3: a(n) is also the number of central subparts of the symmetric representation of sigma(n). For more information see A279387.
Conjectures 2 and 3 were proposed after Michel Marcus's conjecture in A237593. (End)
Conjectures 1, 2, and 3 are all true. - N. J. A. Sloane, Feb 11 2021

Examples

			a(6)=2 because the 2 middle divisors of 6 (2 and 3) are between sqrt(3) and sqrt(12).
		

References

  • Robin Chapman, Kimmo Eriksson and Richard Stanley, On the Number of Divisors of n in a Special Interval: Problem 10847, Amer. Math. Monthly 108:1 (Jan 2001), p. 77 (Proposal); 109:1 (Jan 2002), p. 80 (Solution). [Please do not delete this reference. - N. J. A. Sloane, Dec 16 2020]

Crossrefs

Cf. A001227, A003056, A028982, A028983, A053866, A067743, A071090 (sums of middle divisors), A082647, A128605, A131576.
Cf. also A071561 (positions of zeros), A071562 (positions of nonzeros), A299761 (middle divisors of n), A355143 (products of middle divisors).
Relation to Dyck paths: A237048, A237593, A240542 (partial sums), A245092, A249351, A279387, A348406.

Programs

  • Mathematica
    (* number of middle divisors *)
    a067742[n_] := Select[Divisors[n], Sqrt[n/2] <= # < Sqrt[2n] &]
    a067742[115] (* data *)
    (* Hartmut F. W. Hoft, Jul 17 2014 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, 1 &, n/2 <= #^2 < 2 n &]]; (* Michael Somos, Jun 04 2015 *)
    (* support function a240542[] is defined in A240542 *)
    b[n_] := a240542[n] - a240542[n-1]
    Map[b,Range[105]] (* data - Hartmut F. W. Hoft, Feb 06 2017 *)
  • PARI
    A067742(n) = {sumdiv(n, d, d2 = d^2; n / 2 < d2 && d2 <= n << 1)} \\ M. F. Hasler, May 12 2008
    
  • PARI
    a(n) = A067742(n) = {my(d = divisors(n), iu = il = #d \ 2); if(#d <= 2, return(n < 3)); while(d[il]^2 > n>>1, il--); while(d[iu]^2 < (n<<1), iu++);
    iu - il - 1 + issquare(n/2)} \\ David A. Corneth, Apr 06 2018
    
  • Python
    from sympy import divisors
    def A067742(n): return sum(1 for d in divisors(n,generator=True) if n <= 2*d**2 < 4*n) # Chai Wah Wu, Jun 09 2022

Formula

G.f.: Sum_{k>=1} (-1)^(k-1)*x^(k*(k+1)/2)/(1-x^k). (This g.f. corresponds to the assertion in Theorem 2.)
Another g.f., corresponding to the definition: Sum_{k>=1} x^(2*k*(k+1))*(1-x^(6*k^2))/(1-x^(2*k)) + Sum_{k>=0} x^((k+1)*(2*k+1))*(1-x^((2*k+1)*(3*k+2)))/(1-x^(2*k+1)). - N. J. A. Sloane, Jan 04 2021
a(A128605(n)) = n and a(m) <> n for m < A128605(n). - Reinhard Zumkeller, Mar 14 2007
It appears that a(n) = A240542(n) - A240542(n-1), the difference between two adjacent Dyck paths as defined in A237593. - Hartmut F. W. Hoft, Feb 06 2017
The above conjecture is essentially the same as Michel Marcus's conjecture in A237593. - Omar E. Pol, Dec 20 2020
Conjecture: a(n) = A082647(n) - A131576(n) = A001227(n) - 2*A131576(n). - Omar E. Pol, Feb 06 2017
a(n) = A348406(n) - 1. - Omar E. Pol, Oct 29 2021
a(n) = A000005(n) - A067743(n). - Omar E. Pol, Jun 11 2022

Extensions

Edited by N. J. A. Sloane, Jan 03 2021

A249351 Triangle read by rows in which row n lists the widths of the symmetric representation of sigma(n).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Oct 26 2014

Keywords

Comments

Here T(n,k) is defined to be the "k-th width" of the symmetric representation of sigma(n), with n>=1 and 1<=k<=2n-1. Explanation: consider the diagram of the symmetric representation of sigma(n) described in A236104, A237593 and other related sequences. Imagine that the diagram for sigma(n) contains 2n-1 equidistant segments which are parallel to the main diagonal [(0,0),(n,n)] of the quadrant. The segments are located on the diagonal of the cells. The distance between two parallel segment is equal to sqrt(2)/2. T(n,k) is the length of the k-th segment divided by sqrt(2). Note that the triangle contains nonnegative terms because for some n the value of some widths is equal to zero. For an illustration of some widths see Hartmut F. W. Hoft's contribution in the Links section of A237270.
Row n has length 2*n-1.
Row sums give A000203.
If n is a power of 2 then all terms of row n are 1's.
If n is an even perfect number then all terms of row n are 1's except the middle term which is 2.
If n is an odd prime then row n lists (n+1)/2 1's, n-2 zeros, (n+1)/2 1's.
The number of blocks of positive terms in row n gives A237271(n).
The sum of the k-th block of positive terms in row n gives A237270(n,k).
It appears that the middle diagonal is also A067742 (which was conjectured by Michel Marcus in the entry A237593 and checked with two Mathematica functions up to n = 100000 by Hartmut F. W. Hoft).
It appears that the trapezoidal numbers (A165513) are also the numbers k > 1 with the property that some of the noncentral widths of the symmetric representation of sigma(k) are not equal to 1. - Omar E. Pol, Mar 04 2023

Examples

			Triangle begins:
  1;
  1,1,1;
  1,1,0,1,1;
  1,1,1,1,1,1,1;
  1,1,1,0,0,0,1,1,1;
  1,1,1,1,1,2,1,1,1,1,1;
  1,1,1,1,0,0,0,0,0,1,1,1,1;
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
  1,1,1,1,1,0,0,1,1,1,0,0,1,1,1,1,1;
  1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1;
  1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1;
  1,1,1,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,1,1,1;
  ...
---------------------------------------------------------------------------
.        Written as an isosceles triangle              Diagram of
.              the sequence begins:               the symmetry of sigma
---------------------------------------------------------------------------
.                                                _ _ _ _ _ _ _ _ _ _ _ _
.                      1;                       |_| | | | | | | | | | | |
.                    1,1,1;                     |_ _|_| | | | | | | | | |
.                  1,1,0,1,1;                   |_ _|  _|_| | | | | | | |
.                1,1,1,1,1,1,1;                 |_ _ _|    _|_| | | | | |
.              1,1,1,0,0,0,1,1,1;               |_ _ _|  _|  _ _|_| | | |
.            1,1,1,1,1,2,1,1,1,1,1;             |_ _ _ _|  _| |  _ _|_| |
.          1,1,1,1,0,0,0,0,0,1,1,1,1;           |_ _ _ _| |_ _|_|    _ _|
.        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;         |_ _ _ _ _|  _|     |
.      1,1,1,1,1,0,0,1,1,1,0,0,1,1,1,1,1;       |_ _ _ _ _| |      _|
.    1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1;     |_ _ _ _ _ _|  _ _|
.  1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1;   |_ _ _ _ _ _| |
.1,1,1,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,1,1,1; |_ _ _ _ _ _ _|
...
From _Omar E. Pol_, Nov 22 2020: (Start)
Also consider the infinite double-staircases diagram defined in A335616.
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 in A280850 and A296508 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 this seq:  [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 A296508:   [              8,      7,    1,    0,      8              ]
The 15th row
of A280851    [              8,      7,    1,            8              ]
.
The number of horizontal steps (or 1's) in the successive columns of the above diagram gives the 15th row of this triangle.
For more information about the parts of the symmetric representation of sigma(n) see A237270. For more information about the subparts see A239387, A296508, A280851.
More generally, it appears there is the same correspondence between the original diagram of the symmetric representation of sigma(n) and the "Ziggurat" diagram of n. (End)
		

Crossrefs

Programs

  • Mathematica
    (* function segments are defined in A237270 *)
    a249351[n_] := Flatten[Map[segments, Range[n]]]
    a249351[10] (* Hartmut F. W. Hoft, Jul 20 2022 *)

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.

Original entry on oeis.org

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, 20, 20, 22, 22, 23, 23, 23, 25, 26, 26, 26, 26, 28, 28, 30, 30, 30, 32, 32, 32, 34, 35, 36, 36, 36, 36, 38, 38, 40, 40, 40, 40, 42, 42, 42, 44, 45, 45, 47, 47, 47, 47, 49, 49, 52, 52
Offset: 1

Views

Author

Hartmut F. W. Hoft, Apr 07 2014

Keywords

Comments

The sequence is closely related to the alternating harmonic series.
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).
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).
See A235791, A237591 and A237593 for additional formulas and properties.
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
The number of occurrences of n is A259179(n). - Omar E. Pol, Dec 11 2016
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
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
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
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

Examples

			From _Omar E. Pol_, Dec 22 2020: (Start)
Illustration of initial terms in two ways in accordance with the sum of the odd-indexed terms of the rows of A237591:
.
n   a(n)                               _              _
1    1                               _|_|            |_|_
2    2                             _|_ _|            |_ _|
3    2                           _|_ _|              |_ _|_
4    3                         _|_ _ _|              |_ _ _|
5    3                       _|_ _ _|  _             |_ _ _|_ _
6    5                     _|_ _ _ _| |_|            |_ _ _ _|_|
7    5                   _|_ _ _ _|   |_|            |_ _ _ _|_|_
8    6                 _|_ _ _ _ _|  _|_|            |_ _ _ _ _|_|_
9    7               _|_ _ _ _ _|   |_ _|            |_ _ _ _ _|_ _|
10   7             _|_ _ _ _ _ _|   |_|              |_ _ _ _ _ _|_|
11   7           _|_ _ _ _ _ _|    _|_|              |_ _ _ _ _ _|_|_ _
12   9         _|_ _ _ _ _ _ _|   |_ _|              |_ _ _ _ _ _ _|_ _|
13   9       _|_ _ _ _ _ _ _|     |_ _|              |_ _ _ _ _ _ _|_ _|
14   9     _|_ _ _ _ _ _ _ _|    _|_|  _             |_ _ _ _ _ _ _ _|_|_ _
15  11   _|_ _ _ _ _ _ _ _|     |_ _| |_|            |_ _ _ _ _ _ _ _|_ _|_|_
16  12  |_ _ _ _ _ _ _ _ _|     |_ _| |_|            |_ _ _ _ _ _ _ _ _|_ _|_|
...
                  Figure 1.                                  Figure 2.
.
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.
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.
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).
(End).
		

Crossrefs

Programs

  • Mathematica
    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}]
  • 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
    
  • Python
    from sympy import sqrt
    import math
    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))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 21 2017

Formula

a(n) = Sum_{k = 1..A003056(n)} (-1)^(k+1) A235791(n,k).
a(n) = A285901(n) - A285902(n), assuming the conjecture 3. - Omar E. Pol, Feb 15 2018
a(n) = n - A322141(n). - Omar E. Pol, Dec 22 2020

Extensions

More terms from Omar E. Pol, Apr 16 2014
Definition edited by N. J. A. Sloane, Dec 20 2020
Showing 1-10 of 72 results. Next