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-4 of 4 results.

A138857 Numbers such that all subsets of {a(1)^2,...,a(n)^2} have a different sum.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 12, 18, 25, 34, 49, 70, 99, 140, 198, 280, 396, 560, 792, 1120, 1584, 2241, 3169, 4482, 6339, 8965, 12678, 17930, 25357, 35860, 50714, 71721, 101429, 143442, 202858, 286885, 405717, 573770, 811434, 1147541, 1622868, 2295082, 3245736, 4590164, 6491473, 9180329, 12982946, 18360658, 25965892, 36721317, 51931785, 73442634, 103863570, 146885269, 207727140, 293770539
Offset: 1

Views

Author

M. F. Hasler, Apr 09 2008

Keywords

Comments

Since the ratio of two successive terms of A138858 tends to 1:2, we have here lim a(n+1)/a(n) = sqrt(2). More precisely, one has a(n) ~ 2^(n/2+const.).
See A138858 for more comments.

Crossrefs

Programs

  • PARI
    {s=1;p=0; for( n=1,23, until( !bitand( s, s>>(p^2) ), p++); s+=s<<(p^2); print1( p,","))}

Formula

A138857(n)=sqrt(A138858(n))

Extensions

a(24)-a(30) from Donovan Johnson, Oct 03 2009
a(31) onwards from Martin Fuller, Apr 07 2025

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

A382382 Least k for which there exists an n-subset X of {0, ..., k} such that the variances of the subsets of X of size at least 2 are distinct.

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 27, 48
Offset: 1

Views

Author

Pontus von Brömssen, Mar 23 2025

Keywords

Comments

The variance of a nonempty set Y is (Sum_{y in Y} (y-m)^2)/|Y|, where m is the average of Y and |Y| is the size of Y.
0 and a(n) necessarily belong to the set X in the definition.

Examples

			    | a set X that satisfy the condition
  n | (the largest element of X is a(n))
  --+-----------------------------------
  1 | {0}
  2 | {0, 1}
  3 | {0, 1, 3}
  4 | {0, 1, 4,  6}
  5 | {0, 2, 7,  8, 11}
  6 | {0, 1, 4, 10, 12, 17}
  7 | {0, 3, 4, 14, 19, 21, 27}
  8 | {0, 1, 5, 15, 22, 40, 46, 48}
		

Crossrefs

Formula

A003022(n) <= a(n) < A382381(n) for n >= 2.

A381856 Lexicographically earliest sequence of positive integers such that for any value k, no two sets of two or more indices at which k occurs have the same standard deviation.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 3, 2, 4, 3, 3, 4, 4, 1, 5, 2, 5, 3, 4, 5, 4, 6, 1, 5, 6, 6, 2, 3, 7, 5, 6, 4, 6, 1, 7, 7, 8, 5, 7, 8, 8, 9, 6, 9, 2, 8, 3, 7, 4, 5, 9, 9, 8, 10, 9, 10, 10, 11, 7, 1, 8, 10, 11, 11, 6, 11, 9, 12, 10, 2, 12, 8, 11, 13, 12, 12, 3, 10, 13, 13
Offset: 1

Views

Author

Neal Gersh Tolunsky, Mar 08 2025

Keywords

Comments

A382381 gives the indices of 1s in this sequence.
If the definition is modified to compare all sets of indices whose terms are equal (not just those sets with the same value k), we get A337226.

Examples

			a(13) = 3: a(13) cannot be 1 as i = 4,13 would have the same standard deviation as i = 1,4,8,13 (namely 4.5). We cannot have a(13) = 2 because i = 3,6 would have the same standard deviation as i = 10,13 (namely 1.5). With a(13) = 3, we find that no two subsets of i = 7,9,12,13 have the same standard deviation, so a(13) = 3.
		

Crossrefs

Showing 1-4 of 4 results.