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

A382381 Lexicographically earliest sequence of distinct positive integers such that any two subsets with at least two terms have distinct variances.

Original entry on oeis.org

1, 2, 4, 8, 16, 25, 36, 62, 136, 320, 411, 1208, 1295, 4179, 5143, 6380, 31370, 34425, 36094, 213044, 218759, 306722
Offset: 1

Views

Author

Pontus von Brömssen, Mar 23 2025

Keywords

Comments

Numbers k such that A381856(k) = 1.
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.
a(20) > 100000.

Crossrefs

Programs

  • Python
    from fractions import Fraction
    from itertools import chain, combinations, count, islice
    def powerset(s): # skipping empty set
        return chain.from_iterable(combinations(s, r) for r in range(1, len(s)+1))
    def agen(): # generator of terms
        an, alst, vset = 1, [1], set()
        while True:
            yield an
            P = list(powerset(alst))
            Xlst, X2lst = [sum(s) for s in P], [sum(si**2 for si in s) for s in P]
            for k in count(an+1):
                ok, vnew = True, set()
                for i, s in enumerate(P):
                    mu, X2 = Fraction(Xlst[i] + k, len(s)+1), X2lst[i] + k**2
                    v = Fraction(X2, len(s)+1) - mu**2
                    if v in vset or v in vnew:
                        ok = False
                        break
                    else:
                        vnew.add(v)
                if ok:
                    break
            an = k
            vset |= vnew
            alst.append(an)
    print(list(islice(agen(), 13))) # Michael S. Branicky, Mar 31 2025

Extensions

a(20)-a(21) from Michael S. Branicky, Mar 31 2025
a(22) from Michael S. Branicky, Apr 07 2025

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

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Feb 09 2025

Keywords

Comments

A260873 gives the indices of 1s in the sequence.
The longest run in the sequence has length 2.
No three equal terms will appear at indices in arithmetic progression.
For any value k, the distances between pairs of k will be distinct.

Examples

			a(7) = 3: a(7) cannot be 1 because i = 4; i = 1,7; and i = 1,4,7 would all have the same mean index 4. a(7) cannot be 2 because i = 6; i = 5,6,7; and i = 5,7 would have the same mean index 6. So a(7) = 3.
a(19) cannot be 1, 2, or 3. a(19) = 4 does not work either because i = 13,19 would have the same mean (namely 16) as i = 12,17,19. So a(19) = 5.
		

Crossrefs

A381063 Lexicographically earliest sequence of positive integers such that each nonempty subset has a distinct geometric mean.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 13, 17, 18, 19, 23, 29, 31, 37, 41, 43, 47, 50, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 98, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 176, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1

Views

Author

Neal Gersh Tolunsky, Feb 12 2025

Keywords

Comments

Every prime occurs in the sequence.

Crossrefs

Programs

  • PARI
    is(v, w, k) = my(f=factor(k), x, y, z); for(i=1, #f~, if(setsearch(v, f[i, 1]), listput(w, f[i, 1]))); w=Set(w); forsubset(#w, r, x=#r; y=k*prod(i=1, x, w[r[i]]); forsubset(#w, s, z=#s; if(y^z==prod(i=1, z, w[s[i]])^(x+1)&&z>0, return(0)))); 1;
    lista(nn) = my(f, k=1, v=[1], w=List([1])); for(n=2, nn, while(!isprime(k++), if(is(v, w, k), f=factor(k); for(i=1, #f~, if(setsearch(v, f[i, 1]), listput(w, f[i, 1]))); listput(w, k); break)); v=concat(v, k)); v; \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025
Showing 1-3 of 3 results.