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

A357413 Number of nonempty subsets of {1..n} whose elements have an odd geometric mean.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 4, 4, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 19, 19, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 39, 39, 40, 40, 49, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, 67, 67, 90, 90, 91, 91, 92, 92
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 27 2022

Keywords

Comments

The geometric mean of a subset such as in name must be an odd number in {1..n} which might ease the search for terms. - David A. Corneth, Sep 29 2022

Examples

			a(9) = 7 subsets: {1}, {3}, {5}, {7}, {9}, {1, 9} and {1, 3, 9}.
		

Crossrefs

Programs

  • Python
    from functools import lru_cache
    from sympy import integer_nthroot
    def cond(p, c): r, b = integer_nthroot(p, c); return b and r&1
    @lru_cache(maxsize=None)
    def b(n, p, c):
        if n == 0: return int (c > 0 and cond(p, c))
        return b(n-1, p, c) + b(n-1, p*n, c+1) if n&1 else b(n-1, p, c)
    @lru_cache(maxsize=None)
    def a(n): return b(n, 1, 0) if n&1 else b(n-1, 1, 0) if n else 0
    print([a(n) for n in range(41)]) # Michael S. Branicky, Sep 29 2022

Formula

a(2*n-1) = a(2*n) for n >= 1. - David A. Corneth, Sep 29 2022
a(n) = A326027(n) - A357414(n). - Max Alekseyev, Mar 01 2025

Extensions

a(24)-a(34) from Michael S. Branicky, Sep 29 2022
a(35)-a(70) from David A. Corneth, Sep 29 2022
a(0) prepended and terms a(71) onward added by Max Alekseyev, Mar 06 2025

A357415 Number of nonempty subsets of {1..n} whose elements have an odd root mean square.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 6, 6, 7, 9, 16, 26, 41, 85, 142, 254, 461, 825, 1454, 2506, 4535, 7987, 14352, 26178, 47861, 87945, 162486, 304864, 565217, 1064529, 1992628, 3742934, 7034489, 13214869, 24924676, 46926388, 88812537, 167903969, 318619708, 604909434, 1150800393
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 27 2022

Keywords

Examples

			a(10) = 9 subsets: {1}, {3}, {5}, {7}, {9}, {1, 7}, {1, 5, 7}, {2, 3, 6, 8, 9, 10} and {2, 3, 6, 7, 8, 9, 10}.
		

Crossrefs

Formula

a(n) = A339454(n) - A357416(n).

Extensions

a(24)-a(41) from Alois P. Heinz, Sep 27 2022

A357356 Number of nonempty subsets of {1..n} whose elements have an even average.

Original entry on oeis.org

0, 1, 3, 4, 6, 13, 25, 38, 64, 119, 219, 384, 686, 1285, 2405, 4428, 8236, 15569, 29463, 55582, 105326, 200847, 383609, 732744, 1403004, 2694391, 5181663, 9973416, 19226166, 37125547, 71770069, 138871244, 269005540, 521666967, 1012555015, 1966957674, 3824166974
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 25 2022

Keywords

Examples

			a(6) = 13 subsets: {2}, {4}, {6}, {1, 3}, {2, 6}, {3, 5}, {1, 2, 3}, {1, 5, 6}, {2, 4, 6}, {3, 4, 5}, {1, 4, 5, 6}, {2, 3, 5, 6} and {2, 3, 4, 5, 6}.
		

Crossrefs

Programs

  • Python
    from functools import lru_cache
    def cond(s, c): q, r = divmod(s, c); return r == 0 and q&1 == 0
    @lru_cache(maxsize=None)
    def b(n, s, c):
        if n == 0: return int (c > 0 and cond(s, c))
        return b(n-1, s, c) + b(n-1, s+n, c+1)
    a = lambda n: b(n, 0, 0)
    print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Sep 25 2022

Formula

a(n) = A051293(n) - A357355(n). - Michael S. Branicky, Sep 25 2022

Extensions

a(24)-a(37) from Michael S. Branicky, Sep 25 2022

A357411 Number of nonempty subsets of {1..n} whose elements have an odd harmonic mean.

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 6, 6, 7, 9, 10, 10, 11, 13, 26, 26, 27, 45, 46, 74, 93, 99, 100, 162, 163, 165, 166, 458, 459, 865, 866, 866, 1647, 1669, 2724
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 27 2022

Keywords

Examples

			a(11) = 10 subsets: {1}, {3}, {5}, {7}, {9}, {11}, {2, 6}, {2, 3, 6}, {3, 6, 10} and {3, 5, 6, 10}.
		

Crossrefs

Programs

  • Python
    from fractions import Fraction
    from functools import lru_cache
    def cond(s, c): h = c/s; return h.denominator == 1 and h.numerator&1
    @lru_cache(maxsize=None)
    def b(n, s, c):
        if n == 0: return int (c > 0 and cond(s, c))
        return b(n-1, s, c) + b(n-1, s+Fraction(1, n), c+1)
    a = lambda n: b(n, 0, 0)
    print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Sep 29 2022

Formula

a(p) = a(p-1) + 1 for prime p > 2. - Michael S. Branicky, Sep 30 2022

Extensions

a(24)-a(35) from Michael S. Branicky, Sep 30 2022

A369391 Number of nonempty subsets of {1..n} whose elements have a square average.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 20, 26, 31, 35, 41, 63, 143, 399, 1083, 2554, 5078, 8596, 12772, 17222, 21792, 27126, 36538, 62530, 146701, 412191, 1178071, 3156949, 7703823, 16992539, 33946851, 61840501, 103674983, 161604395, 236759149, 330078718, 446073360, 606337592
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 22 2024

Keywords

Examples

			a(5) = 4 subsets: {1}, {4}, {3, 5} and {3, 4, 5}.
		

Crossrefs

Extensions

a(24)-a(38) from Alois P. Heinz, Jan 22 2024
Showing 1-5 of 5 results.