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.

A326027 Number of nonempty subsets of {1..n} whose geometric mean is an integer.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 12, 19, 20, 21, 28, 29, 30, 31, 40, 41, 70, 71, 74, 75, 76, 77, 108, 123, 124, 211, 214, 215, 216, 217, 332, 333, 334, 335, 592, 593, 594, 595, 612, 613, 614, 615, 618, 639, 640, 641, 1160, 1183, 1324, 1325, 1328, 1329, 2176, 2177, 2196, 2197, 2198, 2199, 2414, 2415, 2416, 2443, 4000, 4001, 4002, 4003, 4006, 4007, 4008, 4009, 6626, 6627, 6628, 9753, 9756, 9757, 9758, 9759, 11136
Offset: 0

Views

Author

Gus Wiseman, Jul 14 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 19 subsets:
  {1}  {1}  {1}  {1}      {1}      {1}      {1}      {1}      {1}
       {2}  {2}  {2}      {2}      {2}      {2}      {2}      {2}
            {3}  {3}      {3}      {3}      {3}      {3}      {3}
                 {4}      {4}      {4}      {4}      {4}      {4}
                 {1,4}    {5}      {5}      {5}      {5}      {5}
                 {1,2,4}  {1,4}    {6}      {6}      {6}      {6}
                          {1,2,4}  {1,4}    {7}      {7}      {7}
                                   {1,2,4}  {1,4}    {8}      {8}
                                            {1,2,4}  {1,4}    {9}
                                                     {2,8}    {1,4}
                                                     {1,2,4}  {1,9}
                                                     {2,4,8}  {2,8}
                                                              {4,9}
                                                              {1,2,4}
                                                              {1,3,9}
                                                              {2,4,8}
                                                              {3,8,9}
                                                              {4,6,9}
                                                              {3,6,8,9}
		

Crossrefs

First differences are A082553.
Partitions whose geometric mean is an integer are A067539.
Strict partitions whose geometric mean is an integer are A326625.
Subsets whose average is an integer are A051293.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],IntegerQ[GeometricMean[#]]&]],{n,0,10}]

Formula

a(n) = A357413(n) + A357414(n). For a squarefree n, a(n) = a(n-1) + 1. - Max Alekseyev, Mar 01 2025

Extensions

Terms a(57) onward from Max Alekseyev, Mar 01 2025

A357414 Number of nonempty subsets of {1..n} whose elements have an even geometric mean.

Original entry on oeis.org

0, 0, 1, 1, 4, 4, 5, 5, 8, 12, 13, 13, 20, 20, 21, 21, 30, 30, 59, 59, 62, 62, 63, 63, 94, 104, 105, 187, 190, 190, 191, 191, 306, 306, 307, 307, 564, 564, 565, 565, 582, 582, 583, 583, 586, 600, 601, 601, 1120, 1134, 1275, 1275, 1278, 1278, 2125, 2125, 2144, 2144, 2145, 2145, 2360, 2360, 2361, 2381, 3938, 3938, 3939, 3939, 3942, 3942, 3943, 3943, 6560, 6560, 6561, 9663, 9666
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 27 2022

Keywords

Examples

			a(8) = 8 subsets: {2}, {4}, {6}, {8}, {1, 4}, {2, 8}, {1, 2, 4} and {2, 4, 8}.
		

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 == 0
    @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)
    a = lambda n: b(n, 1, 0)
    print([a(n) for n in range(26)]) # Michael S. Branicky, Sep 29 2022

Formula

a(p) = a(p-1) for prime p > 2. - Michael S. Branicky, Sep 30 2022
a(n) = A326027(n) - A357413(n). - Max Alekseyev, Mar 06 2025

Extensions

a(24)-a(41) from Michael S. Branicky, Sep 30 2022
Terms a(42) onward from Max Alekseyev, Oct 11 2023
a(0) prepended 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

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