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.

Previous Showing 21-30 of 34 results. Next

A317292 a(n) is the total number of edges after n-th stage in the diagram of the symmetries of sigma in which the parts of width > 1 are dissected into subparts of width 1, with a(0) = 0.

Original entry on oeis.org

0, 4, 8, 14, 20, 26, 36, 42, 50, 60, 70, 76, 92, 98, 108, 124, 136, 142, 160, 166, 182, 198, 208, 214, 238, 250, 260, 276, 294, 300
Offset: 0

Views

Author

Omar E. Pol, Jul 27 2018

Keywords

Comments

All terms are even numbers.
Note that in the diagram the number of regions or subparts equals A060831, the partial sums of A001227, n >= 1.

Examples

			Illustration of initial terms (n = 1..9):
.                                                       _ _ _ _
.                                         _ _ _        |_ _ _  |_
.                             _ _ _      |_ _ _|       |_ _ _| |_|_
.                   _ _      |_ _  |_    |_ _  |_ _    |_ _  |_ _  |
.           _ _    |_ _|_    |_ _|_  |   |_ _|_  | |   |_ _|_  | | |
.     _    |_  |   |_  | |   |_  | | |   |_  | | | |   |_  | | | | |
.    |_|   |_|_|   |_|_|_|   |_|_|_|_|   |_|_|_|_|_|   |_|_|_|_|_|_|
.
.     4      8        14         20           26             36
.
.                                               _ _ _ _ _
.                         _ _ _ _ _            |_ _ _ _ _|
.     _ _ _ _            |_ _ _ _  |           |_ _ _ _  |_ _
.    |_ _ _ _|           |_ _ _ _| |_          |_ _ _ _| |_  |
.    |_ _ _  |_          |_ _ _  |_  |_ _      |_ _ _  |_  |_|_ _
.    |_ _ _| |_|_ _      |_ _ _| |_|_ _  |     |_ _ _| |_|_ _  | |
.    |_ _  |_ _  | |     |_ _  |_ _  | | |     |_ _  |_ _  | | | |
.    |_ _|_  | | | |     |_ _|_  | | | | |     |_ _|_  | | | | | |
.    |_  | | | | | |     |_  | | | | | | |     |_  | | | | | | | |
.    |_|_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
.
.           42                  50                     60
.
.
Illustration of the two-dimensional diagram after 29 stages (contains 300 edges, 239 vertices and 62 regions or subparts):
._ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _  |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _| |
|_ _ _ _ _ _ _ _ _ _ _ _ _  | |
|_ _ _ _ _ _ _ _ _ _ _ _ _| | |
|_ _ _ _ _ _ _ _ _ _ _ _  | | |_ _ _
|_ _ _ _ _ _ _ _ _ _ _ _| | |_ _ _  |
|_ _ _ _ _ _ _ _ _ _ _  | | |_ _  | |_
|_ _ _ _ _ _ _ _ _ _ _| | |_ _ _| |_  |_
|_ _ _ _ _ _ _ _ _ _  | | |_ _  |_ _| |_|_
|_ _ _ _ _ _ _ _ _ _| | |_ _  | |_  |_ _  |_ _
|_ _ _ _ _ _ _ _ _  | |_ _ _| |_  |_  | |_ _  |
|_ _ _ _ _ _ _ _ _| | |_ _  |_  |_  |_|_ _  | |
|_ _ _ _ _ _ _ _  | |_ _  |_ _|_  |_ _  | | | |_ _ _ _ _ _
|_ _ _ _ _ _ _ _| | |_ _| |_  | |_ _  | | |_|_ _ _ _ _  | |
|_ _ _ _ _ _ _  | |_ _  |_  |_|_  | | |_|_ _ _ _ _  | | | |
|_ _ _ _ _ _ _| |_ _  |_  |_ _  | | |_ _ _ _ _  | | | | | |
|_ _ _ _ _ _  | |_  |_  |_  | | |_|_ _ _ _  | | | | | | | |
|_ _ _ _ _ _| |_ _| |_|_  | |_|_ _ _ _  | | | | | | | | | |
|_ _ _ _ _  | |_  |_ _  | |_ _ _ _  | | | | | | | | | | | |
|_ _ _ _ _| |_  |_  | |_|_ _ _  | | | | | | | | | | | | | |
|_ _ _ _  |_ _|_  |_|_ _ _  | | | | | | | | | | | | | | | |
|_ _ _ _| |_  | |_ _ _  | | | | | | | | | | | | | | | | | |
|_ _ _  |_  |_|_ _  | | | | | | | | | | | | | | | | | | | |
|_ _ _| |_|_ _  | | | | | | | | | | | | | | | | | | | | | |
|_ _  |_ _  | | | | | | | | | | | | | | | | | | | | | | | |
|_ _|_  | | | | | | | | | | | | | | | | | | | | | | | | | |
|_  | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
		

Crossrefs

For the definition of "subparts" see A279387.
For the triangle of sums of subparts see A279388.
Cf. A317293 (number of vertices).
Cf. A060831 (number of regions or subparts).
Compare with A317109 (analog for the diagram that contains only parts).
First differs from A317109 at a(6).

Formula

a(n) = A317293(n) + A060831(n) - 1 (Euler's formula).

A317293 a(n) is the total number of vertices after n-th stage in the diagram of the symmetries of sigma in which the parts of width > 1 are dissected into subparts of width 1, with a(0) = 1.

Original entry on oeis.org

1, 4, 7, 11, 16, 20, 28, 32, 39, 46, 54, 58, 72, 76, 84, 96, 107, 111, 126, 130, 144, 156, 164, 168, 190, 199, 207, 219, 235, 239
Offset: 0

Views

Author

Omar E. Pol, Jul 27 2018

Keywords

Comments

Note that in the diagram the number of regions or subparts equals A060831, the partial sums of A001227, n >= 1.

Examples

			Illustration of initial terms (n = 0..9):
.                                                           _ _ _ _
.                                             _ _ _        |_ _ _  |_
.                                 _ _ _      |_ _ _|       |_ _ _| |_|_
.                       _ _      |_ _  |_    |_ _  |_ _    |_ _  |_ _  |
.               _ _    |_ _|_    |_ _|_  |   |_ _|_  | |   |_ _|_  | | |
.         _    |_  |   |_  | |   |_  | | |   |_  | | | |   |_  | | | | |
.    .   |_|   |_|_|   |_|_|_|   |_|_|_|_|   |_|_|_|_|_|   |_|_|_|_|_|_|
.
.    1    4      7        11         16           20             28
.
.                                               _ _ _ _ _
.                         _ _ _ _ _            |_ _ _ _ _|
.     _ _ _ _            |_ _ _ _  |           |_ _ _ _  |_ _
.    |_ _ _ _|           |_ _ _ _| |_          |_ _ _ _| |_  |
.    |_ _ _  |_          |_ _ _  |_  |_ _      |_ _ _  |_  |_|_ _
.    |_ _ _| |_|_ _      |_ _ _| |_|_ _  |     |_ _ _| |_|_ _  | |
.    |_ _  |_ _  | |     |_ _  |_ _  | | |     |_ _  |_ _  | | | |
.    |_ _|_  | | | |     |_ _|_  | | | | |     |_ _|_  | | | | | |
.    |_  | | | | | |     |_  | | | | | | |     |_  | | | | | | | |
.    |_|_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
.
.           32                  39                     46
.
.
Illustration of the two-dimensional diagram after 29 stages (contains 239 vertices, 300 edges and 62 regions or subparts):
._ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _  |
|_ _ _ _ _ _ _ _ _ _ _ _ _  | |
|_ _ _ _ _ _ _ _ _ _ _ _ _| | |
|_ _ _ _ _ _ _ _ _ _ _ _  | | |_ _ _
|_ _ _ _ _ _ _ _ _ _ _ _| | |_ _ _  |
|_ _ _ _ _ _ _ _ _ _ _  | | |_ _  | |_
|_ _ _ _ _ _ _ _ _ _ _| | |_ _ _| |_  |_
|_ _ _ _ _ _ _ _ _ _  | | |_ _  |_ _| |_|_
|_ _ _ _ _ _ _ _ _ _| | |_ _  | |_  |_ _  |_ _
|_ _ _ _ _ _ _ _ _  | |_ _ _| |_  |_  | |_ _  |
|_ _ _ _ _ _ _ _ _| | |_ _  |_  |_  |_|_ _  | |
|_ _ _ _ _ _ _ _  | |_ _  |_ _|_  |_ _  | | | |_ _ _ _ _ _
|_ _ _ _ _ _ _ _| | |_ _| |_  | |_ _  | | |_|_ _ _ _ _  | |
|_ _ _ _ _ _ _  | |_ _  |_  |_|_  | | |_|_ _ _ _ _  | | | |
|_ _ _ _ _ _ _| |_ _  |_  |_ _  | | |_ _ _ _ _  | | | | | |
|_ _ _ _ _ _  | |_  |_  |_  | | |_|_ _ _ _  | | | | | | | |
|_ _ _ _ _ _| |_ _| |_|_  | |_|_ _ _ _  | | | | | | | | | |
|_ _ _ _ _  | |_  |_ _  | |_ _ _ _  | | | | | | | | | | | |
|_ _ _ _ _| |_  |_  | |_|_ _ _  | | | | | | | | | | | | | |
|_ _ _ _  |_ _|_  |_|_ _ _  | | | | | | | | | | | | | | | |
|_ _ _ _| |_  | |_ _ _  | | | | | | | | | | | | | | | | | |
|_ _ _  |_  |_|_ _  | | | | | | | | | | | | | | | | | | | |
|_ _ _| |_|_ _  | | | | | | | | | | | | | | | | | | | | | |
|_ _  |_ _  | | | | | | | | | | | | | | | | | | | | | | | |
|_ _|_  | | | | | | | | | | | | | | | | | | | | | | | | | |
|_  | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
		

Crossrefs

For the definition of "subparts" see A279387.
For the triangle of sums of subparts see A279388.
Cf. A317292 (number of edges).
Cf. A060831 (number of regions or subparts).
Compare with A294723 (analog for the diagram that contains only parts).
First differs from A294723 at a(6).

Formula

a(n) = A317292(n) - A060831(n) + 1 (Euler's formula).

A340848 a(n) is the number of edges in the diagram of the symmetric representation of sigma(n) with subparts.

Original entry on oeis.org

4, 6, 8, 10, 10, 14, 12, 14, 16, 16, 14, 24, 14, 18, 24, 22, 16, 28, 16, 26, 26, 22, 18, 36, 24, 22, 28, 30, 20, 44, 20, 30
Offset: 1

Views

Author

Omar E. Pol, Jan 24 2021

Keywords

Comments

Since the diagram is symmetric so all terms are even numbers.
For another version see A340846 from which first differs at a(6).
For the definition of subparts see A279387. For more information about the subparts see also A237271, A280850, A280851, A296508, A335616.
Note that in this version of the diagram of the symmetric representation of sigma(n) all regions are called "subparts". The number of subparts equals A001227(n).

Examples

			Illustration of initial terms:
.                                                          _ _ _ _
.                                            _ _ _        |_ _ _  |_
.                                _ _ _      |_ _ _|             | |_|_
.                      _ _      |_ _  |_          |_ _          |_ _  |
.              _ _    |_ _|_        |_  |           | |             | |
.        _    |_  |       | |         | |           | |             | |
.       |_|     |_|       |_|         |_|           |_|             |_|
.
n:       1      2        3          4           5               6
a(n):    4      6        8         10          10              14
.
For n = 6 the diagram has 14 edges so a(6) = 14.
On the other hand the diagram has 13 vertices and two subparts or regions, so applying Euler's formula we have that a(6) = 13 + 2 - 1 = 14.
.                                                  _ _ _ _ _
.                            _ _ _ _ _            |_ _ _ _ _|
.        _ _ _ _            |_ _ _ _  |                     |_ _
.       |_ _ _ _|                   | |_                    |_  |
.               |_                  |_  |_ _                  |_|_ _
.                 |_ _                |_ _  |                     | |
.                   | |                   | |                     | |
.                   | |                   | |                     | |
.                   | |                   | |                     | |
.                   |_|                   |_|                     |_|
.
n:              7                    8                      9
a(n):          12                   14                     16
.
For n = 9 the diagram has 16 edges so a(9) = 16.
On the other hand the diagram has 14 vertices and three subparts or regions, so applying Euler's formula we have that a(9) = 14 + 3 - 1 = 16.
Another way for the illustration of initial terms is as follows:
--------------------------------------------------------------------------
.  n  a(n)                             Diagram
--------------------------------------------------------------------------
            _
   1   4   |_|  _
              _| |  _
   2   6     |_ _| | |  _
                _ _|_| | |  _
   3   8       |_ _|  _| | | |  _
                  _ _|  _| | | | |  _
   4  10         |_ _ _|  _|_| | | | |  _
                    _ _ _|  _ _| | | | | |  _
   5  10           |_ _ _| |  _ _| | | | | | |  _
                      _ _ _| |_|  _|_| | | | | | |  _
   6  14             |_ _ _ _|  _|  _ _| | | | | | | |  _
                        _ _ _ _|  _|  _ _| | | | | | | | |  _
   7  12               |_ _ _ _| |  _|  _ _|_| | | | | | | | |  _
                          _ _ _ _| |  _| |  _ _| | | | | | | | | |  _
   8  14                 |_ _ _ _ _| |_ _| |  _ _| | | | | | | | | | |  _
                            _ _ _ _ _|  _ _|_|  _ _|_| | | | | | | | | | |
   9  16                   |_ _ _ _ _| |  _|  _|  _ _ _| | | | | | | | | |
                              _ _ _ _ _| |  _|  _|  _ _ _| | | | | | | | |
  10  16                     |_ _ _ _ _ _| |  _|  _| |  _ _|_| | | | | | |
                                _ _ _ _ _ _| |  _|  _| |  _ _ _| | | | | |
  11  14                       |_ _ _ _ _ _| | |_ _|  _| |  _ _ _| | | | |
                                  _ _ _ _ _ _| |  _ _|  _|_|  _ _ _|_| | |
  12  24                         |_ _ _ _ _ _ _| |  _ _|  _ _| |  _ _ _| |
                                    _ _ _ _ _ _ _| |  _| |  _ _| |  _ _ _|
  13  14                           |_ _ _ _ _ _ _| | |  _| |_|  _| |
                                      _ _ _ _ _ _ _| | |_ _|  _|  _|
  14  18                             |_ _ _ _ _ _ _ _| |  _ _|  _|
                                        _ _ _ _ _ _ _ _| |  _ _|
  15  24                               |_ _ _ _ _ _ _ _| | |
                                          _ _ _ _ _ _ _ _| |
  16  22                                 |_ _ _ _ _ _ _ _ _|
...
		

Crossrefs

Cf. A001227 (number of subparts or regions).
Cf. A340847 (number of vertices).
Cf. A340846 (number of edges in the diagram only with parts).
Cf. A317292 (total number of edges in the unified diagram).

Formula

a(n) = A340847(n) + A001227(n) - 1 (Euler's formula).

A350143 a(n) = Sum_{k=1..n} floor(n/(2*k-1))^2.

Original entry on oeis.org

1, 4, 10, 17, 27, 41, 55, 70, 93, 115, 137, 167, 193, 223, 267, 298, 332, 381, 419, 465, 525, 571, 617, 679, 738, 792, 868, 930, 988, 1080, 1142, 1205, 1297, 1367, 1459, 1560, 1634, 1712, 1820, 1914, 1996, 2120, 2206, 2300, 2450, 2544, 2638, 2764, 2875, 2996, 3136, 3246
Offset: 1

Views

Author

Seiichi Manyama, Dec 16 2021

Keywords

Crossrefs

Column 2 of A350122.

Programs

  • Mathematica
    a[n_] := Sum[Floor[n/(2*k - 1)]^2, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Dec 17 2021 *)
  • PARI
    a(n) = sum(k=1, n, (n\(2*k-1))^2);
    
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, k/d%2*(2*d-1)));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (2*k-1)*x^k/(1-x^(2*k)))/(1-x))

Formula

a(n) = Sum_{k=1..n} Sum_{d|k, k/d odd} 2*d - 1 = Sum_{k=1..n} 2 * A002131(k) - A001227(k) = 2 * A350146(n) - A060831(n).
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k/(1 - x^(2*k)).

A362059 Total number of even divisors of all positive integers <= n.

Original entry on oeis.org

0, 1, 1, 3, 3, 5, 5, 8, 8, 10, 10, 14, 14, 16, 16, 20, 20, 23, 23, 27, 27, 29, 29, 35, 35, 37, 37, 41, 41, 45, 45, 50, 50, 52, 52, 58, 58, 60, 60, 66, 66, 70, 70, 74, 74, 76, 76, 84, 84, 87, 87, 91, 91, 95, 95, 101, 101, 103, 103, 111, 111, 113, 113, 119, 119, 123, 123, 127, 127, 131, 131, 140, 140, 142, 142, 146
Offset: 1

Views

Author

Omar E. Pol, Apr 06 2023

Keywords

Comments

Convolved with A002865 gives A066898.

Crossrefs

Partial sums of A183063.

Programs

  • Mathematica
    d[n_] := (e = IntegerExponent[n, 2]) * DivisorSigma[0, n/2^e]; Accumulate@ Array[d, 100] (* Amiram Eldar, Apr 07 2023 *)
  • Python
    from math import isqrt
    def A362059(n): return -(q:=isqrt(m:=n>>1))**2+(sum(m//k for k in range(1, q+1))<<1) # Chai Wah Wu, Apr 26 2023

Formula

a(2n-1) = A006218(n-1), n >= 1.
a(2n) = A006218(n), n >= 1.

A248517 Number of odd divisors > 1 in the numbers 1 through n, counted with multiplicity.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 4, 6, 7, 8, 9, 10, 11, 14, 14, 15, 17, 18, 19, 22, 23, 24, 25, 27, 28, 31, 32, 33, 36, 37, 37, 40, 41, 44, 46, 47, 48, 51, 52, 53, 56, 57, 58, 63, 64, 65, 66, 68, 70, 73, 74, 75, 78, 81, 82, 85, 86, 87, 90, 91, 92, 97, 97, 100, 103, 104, 105, 108, 111
Offset: 0

Views

Author

R. J. Mathar, Jun 18 2015

Keywords

Comments

Number of partitions of n into 3 parts such that the smallest part divides the "middle" part. - Wesley Ivan Hurt, Oct 21 2021

Crossrefs

Programs

  • Maple
    A248517 := proc(n)
        add(A069283(j),j=1..n) ;
    end proc:
  • Mathematica
    Table[Sum[Floor[Floor[i/2]/(n - i)], {i, n - 1}], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 30 2016 *)
    Join[{0},Accumulate[Table[Count[Divisors[n],?OddQ]-1,{n,80}]]] (* _Harvey P. Dale, Jan 06 2019 *)
    Join[{0}, Accumulate[Table[DivisorSigma[0, n/2^IntegerExponent[n, 2]] - 1, {n, 1, 100}]]] (* Amiram Eldar, Jul 10 2022 *)
  • PARI
    a(n)=my(n2=n\2); sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2-sum(k=1, sqrtint(n2), n2\k)*2+sqrtint(n2)^2-n \\ Charles R Greathouse IV, Jun 18 2015
    
  • Python
    from math import isqrt
    def A248517(n): return ((t:=isqrt(m:=n>>1))+(s:=isqrt(n)))*(t-s)+(sum(n//k for k in range(1,s+1))-sum(m//k for k in range(1,t+1))<<1)-n # Chai Wah Wu, Oct 23 2023

Formula

a(n) = Sum_{j=1..n} A069283(j).
a(n) = A060831(n) - n.
a(n) = A006218(n) - A006218(floor(n/2)) - n. - Charles R Greathouse IV, Jun 18 2015
a(n) = Sum_{i=1..n-1} floor(floor(i/2)/(n-i)). - Wesley Ivan Hurt, Jan 30 2016

A339576 Row sums of triangle A236104.

Original entry on oeis.org

1, 4, 10, 17, 29, 41, 59, 74, 101, 121, 151, 179, 215, 245, 295, 326, 374, 423, 477, 519, 591, 641, 707, 767, 844, 904, 1000, 1056, 1140, 1234, 1324, 1387, 1507, 1587, 1701, 1794, 1902, 1992, 2136, 2226, 2346, 2476, 2602, 2692, 2874, 2984, 3122, 3246, 3397
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2020

Keywords

Comments

In other words, a(n) is the sum of squares of terms in row n of A235791.

Crossrefs

Programs

  • Maple
    a:= n-> add(ceil((n+1)/k-(k+1)/2)^2, k=1..floor((sqrt(8*n+1)-1)/2)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Dec 18 2020
  • PARI
    a(n) = sum(k=1, floor((sqrt(8*n+1)-1)/2), ceil((n+1)/k-(k+1)/2)^2) \\ Felix Fröhlich, Dec 19 2020; adapted from Maple code

A339577 a(n) = product of nonzero entries in row n of A235791.

Original entry on oeis.org

1, 2, 3, 4, 10, 12, 21, 24, 72, 80, 110, 180, 234, 504, 840, 896, 1088, 2160, 2565, 5400, 7560, 10560, 12144, 14784, 25200, 32760, 84240, 87360, 97440, 181440, 200880, 207360, 380160, 456960, 1249500, 1413720, 1538460, 1805760, 2845440, 3502080, 3778560, 7076160, 7606872, 15567552
Offset: 1

Views

Author

N. J. A. Sloane, Dec 19 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> mul(ceil((n+1)/k-(k+1)/2), k=1..floor((sqrt(8*n+1)-1)/2)):
    seq(a(n), n=1..60);

A347737 Zero together with the partial sums of A238005.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 5, 7, 9, 11, 13, 15, 16, 20, 23, 25, 28, 31, 33, 37, 41, 45, 48, 52, 54, 59, 64, 67, 72, 78, 81, 86, 89, 94, 100, 106, 110, 116, 122, 126, 132, 138, 141, 148, 155, 162, 168, 174, 179, 186, 193, 198, 204, 212, 218, 226, 234, 240, 248, 256, 260
Offset: 0

Views

Author

Omar E. Pol, Sep 11 2021

Keywords

Comments

a(n) is also the total number of ones in the first n rows of A347579, n >= 1.

Crossrefs

a(n) is also the total number of zeros in the first n rows of the triangles A196020, A211343, A231345, A236106, A237048 (simpler), A239662, A261699, A271344, A272026, A280850, A285574, A285891, A285914, A286013, A296508 (and possibly others), n >= 1.

Programs

  • Mathematica
    Accumulate@Table[Length@Select[Select[IntegerPartitions@n,DuplicateFreeQ],Differences@MinMax@#=={Length@#}&],{n,60}] (* Giorgos Kalogeropoulos, Sep 12 2021 *)
  • Python
    from math import isqrt
    def A347737(n): return (r:=isqrt((n+1<<3)+1)-1>>1)*(6*n+4-r*(r+3))//6-((t:=isqrt(m:=n>>1))+(s:=isqrt(n)))*(t-s)-(sum(n//k for k in range(1,s+1))-sum(m//k for k in range(1,t+1))<<1) # Chai Wah Wu, Jun 07 2025

Formula

a(n) = A006463(n+1) - A060831(n).

A124197 Number of subsets S of {1,2,3,...,n}, including the empty subset, such that if x and y are in S with x

Original entry on oeis.org

1, 2, 4, 7, 12, 18, 26, 36, 48, 61, 77, 95, 115, 137, 161, 187, 217, 248, 281, 317, 355, 395, 439, 485, 533, 583, 636, 691, 750, 811, 874, 941, 1010, 1080, 1154, 1230, 1310, 1393, 1478, 1565, 1656, 1749, 1844, 1943, 2044, 2147, 2256, 2367, 2480, 2595, 2713, 2834
Offset: 0

Views

Author

John W. Layman, Dec 06 2006

Keywords

Comments

The second differences of this sequence give A001227, the number of odd divisors of n.
The sequence appeared in Problem B3 on the 2009 Putnam exam, which asked one to find all n for which the second difference equals 1. The second difference is the number of such subsets of {1,2,...,n+1} that contain both 1 and n+1. One such subset is {1,2,...,n+1}, and if n has an odd factor d>1 then the arithmetic progression {1,d+1,2d+1,...,n+1} works as well; hence the second difference is 1 iff n is a power of 2. [Note that the Putnam problem uses n+1 for our n.] This also means that the conjectural formula for the second difference is a lower bound. To prove the conjecture, note that consecutive elements of S alternate in parity (else S contains their average); thus if x,s,y are consecutive elements then x+y is even, so s=(x+y)/2, which means that S is a finite arithmetic progression with odd common difference. Since conversely any such arithmetic progression works, we are done. - Noam D. Elkies, Dec 05 2009

Crossrefs

Cf. A001227.

Formula

a(n) = 1 + n + A060831(1) + A060831(2) + ... + A060831(n-1).

Extensions

Edited and extended by Max Alekseyev, Jan 20 2010
Previous Showing 21-30 of 34 results. Next