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 11-12 of 12 results.

A382383 Number of distinct variances of nonempty subsets of {1, ..., n}.

Original entry on oeis.org

0, 1, 2, 4, 7, 13, 23, 40, 68, 124, 208, 368, 559, 918, 1352, 2017, 2891, 4122, 5506, 7458, 9623, 12620, 16125, 20626, 25401, 31513, 38587, 47244, 56592, 68021, 80503, 95859, 112137, 131986, 153353, 178434, 205627, 236266, 269884, 307167, 346844, 394924, 445797, 501739
Offset: 0

Views

Author

Pontus von Brömssen, Mar 23 2025

Keywords

Comments

The variance of a nonempty set X is (Sum_{x in X} (x-m)^2)/|X|, where m is the average of X and |X| is the size of X.

Examples

			For n = 4, the following a(4) = 7 variances occur for subsets of {1, 2, 3, 4}:
   variance | corresponding subsets
   ---------+----------------------
       0    | {1}, {2}, {3}, {4}
      1/4   | {1,2}, {2,3}, {3,4}
      2/3   | {1,2,3}, {2,3,4}
       1    | {1,3}, {2,4}
      5/4   | {1,2,3,4}
     14/9   | {1,2,4}, {1,3,4}
      9/4   | {1,4}
		

Crossrefs

Programs

  • Python
    from fractions import Fraction
    def A382383_lst(n):
        s,lst=set(),[0]
        for k in range(n):
            s|={ (x+k,x2+k**2,l+1 ) for (x,x2,l) in s }
            s.add( (k,k**2,1) )
            lst.append(len({ Fraction(x2,l) - Fraction(x,l)**2 for (x,x2,l) in s }))
        return lst # Bert Dobbelaere, Apr 06 2025

Formula

a(n) <= 1 + Sum_{k=1..n-1} A005418(k). The smallest positive n for which strict inequality holds is n = 7. This is because there exist subsets of {1, ..., 7} which are not translates or reflections of each other, but nonetheless have the same variance. For example, {1,5}, {1,3,4,5,7}, and {1,2,3,4,5,6,7} all have variance 4, and {1,2,6} and {1,2,3,5,6,7} both have variance 14/3.

Extensions

a(34)-a(43) from Bert Dobbelaere, Apr 06 2025

A360192 Number of distinct means of nonempty subsets of points {(x,y)|1<=x<=n, 1<=y<=n}.

Original entry on oeis.org

1, 13, 157, 1409, 8237, 35165, 120809, 351865, 903921, 2102065, 4511365, 9056021, 17194093, 31125005, 54080341, 90666045, 147314445
Offset: 1

Views

Author

Nitai Sasson, Jan 29 2023

Keywords

Examples

			For n = 2 the a(2) = 13 means are (1, 1), (1, 2), (1, 3/2), (2, 1), (2, 2), (2, 3/2), (3/2, 1), (3/2, 2), (3/2, 3/2), (4/3, 4/3), (4/3, 5/3), (5/3, 4/3), (5/3, 5/3).
They can be visualized as follows:
Mark the set of points with "x" in a 2 X 2 matrix:
(xx)
(xx)
The points not in a particular subset are replaced with "."
For example, the subset {(1,1),(1,2)}
                   (x.)
is represented by: (x.)
The means for n=2 arise from the following subsets:
       (x.)
(1,1): (..)
-
       (.x)
(2,1): (..)
-
       (..)
(1,2): (x.)
-
       (..)
(2,2): (.x)
-
           (x.)    (.x)    (xx)
(3/2,3/2): (.x) or (x.) or (xx)
-
         (xx)
(3/2,1): (..)
-
         (..)
(3/2,2): (xx)
-
         (x.)
(1,3/2): (x.)
-
         (.x)
(2,3/2): (.x)
-
           (xx)
(4/3,4/3): (x.)
-
           (x.)
(4/3,5/3): (xx)
-
           (xx)
(5/3,4/3): (.x)
-
           (.x)
(5/3,5/3): (xx)
		

Crossrefs

Two-dimensional analog of A135342.

Extensions

a(10)-a(17) from Zachary DeStefano, Jan 29 2023
Previous Showing 11-12 of 12 results.