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.

A349179 Numbers with a record number of nonempty subsets of divisors whose harmonic mean is an integer (A339665).

Original entry on oeis.org

1, 2, 4, 6, 12, 18, 24, 30, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520
Offset: 1

Views

Author

Amiram Eldar, Nov 09 2021

Keywords

Comments

The corresponding record values are 1, 2, 3, 9, 17, 19, 37, 45, 57, 85, 301, 2416, 6813, 19925, 225498, 7461578, 27043615, 304505823, 3686045705, ...
A339665(2520) = 657929756646. - Chai Wah Wu, Nov 09 2021
Conjecture: a(n) = A002182(n-2) for n >= 9. - Chai Wah Wu, Nov 11 2021

Examples

			The first 4 terms of A339665 are  1, 2, 2 and 3. The record values, 1, 2 and 3, occur at 1, 2 and 4, the first 3 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := Count[Subsets[Divisors[n]], _?(Length[#]>0 && IntegerQ[HarmonicMean[#]] &)]; cm = -1; s = {}; Do[If[(c1 = c[n]) > cm, cm = c1; AppendTo[s, n]], {n, 1, 240}]; s

Extensions

a(20) from Chai Wah Wu, Nov 09 2021

A339663 Number of nonempty subsets of divisors of n whose average is an integer.

Original entry on oeis.org

1, 2, 3, 4, 3, 9, 3, 7, 6, 6, 3, 24, 3, 7, 13, 12, 3, 27, 3, 22, 11, 7, 3, 72, 6, 6, 12, 21, 3, 83, 3, 20, 13, 6, 11, 133, 3, 7, 11, 70, 3, 82, 3, 21, 38, 7, 3, 230, 7, 14, 13, 23, 3, 88, 11, 65, 11, 6, 3, 763, 3, 7, 35, 36, 11, 84, 3, 22, 13, 73, 3, 780, 3, 6, 37, 20, 11, 82, 3, 228
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

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

Crossrefs

Programs

  • PARI
    sumbybits(v,b) = { my(s=0,i=1); while(b>0,s += (b%2)*v[i]; i++; b >>= 1); (s); };
    A339663(n) = { my(ds=divisors(n), u=#ds); sum(m=1, (2^u)-1, !(sumbybits(ds,m)%hammingweight(m))); }; \\ Antti Karttunen, Dec 12 2021

A339666 Number of nonempty subsets of divisors of n whose root-mean-square is an integer.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 4, 3, 4, 2, 6, 2, 6, 4, 5, 2, 6, 2, 6, 6, 4, 2, 8, 3, 4, 4, 9, 2, 8, 2, 6, 4, 4, 7, 9, 2, 4, 4, 12, 3, 12, 2, 6, 7, 4, 2, 12, 5, 6, 4, 6, 2, 8, 5, 12, 4, 4, 2, 26, 2, 4, 9, 7, 4, 8, 2, 6, 4, 14, 2, 12, 2, 4, 6, 6, 6, 8, 2, 24, 5, 6, 2, 22
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

			a(14) = 6 subsets: {1}, {2}, {7}, {14}, {1, 7} and {2, 14}.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; uses numtheory; local l, b;
          l, b:= sort([divisors(n)[]]),
          proc(i, s, c) option remember;
            `if`(i=0, `if`(c>0 and issqr(s/c), 1, 0),
             b(i-1, s, c)+b(i-1, s+l[i]^2, c+1))
          end; forget(b); b(nops(l), 0$2)
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 30 2022
  • Mathematica
    a[n_] := a[n] = Module[{b, l = Divisors[n]}, b[i_, s_, c_] := b[i, s, c] = If[i == 0, If[c > 0 && IntegerQ @ Sqrt[s/c], 1, 0], b[i-1, s, c]+b[i-1, s+l[[i]]^2, c+1]]; b[Length[l], 0, 0]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 13 2022, after Alois P. Heinz *)

A339664 Number of nonempty subsets of divisors of n whose geometric mean is an integer.

Original entry on oeis.org

1, 2, 2, 5, 2, 4, 2, 8, 5, 4, 2, 10, 2, 4, 4, 15, 2, 10, 2, 10, 4, 4, 2, 16, 5, 4, 8, 10, 2, 8, 2, 26, 4, 4, 4, 63, 2, 4, 4, 16, 2, 8, 2, 10, 10, 4, 2, 30, 5, 10, 4, 10, 2, 16, 4, 16, 4, 4, 2, 20, 2, 4, 10, 45, 4, 8, 2, 10, 4, 8, 2, 196, 2, 4, 10, 10, 4, 8, 2, 30
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 11 2020

Keywords

Examples

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

Crossrefs

A362802 a(n) is the number of ways in which the set of divisors of n can be partitioned into disjoint parts, all of length > 1 and with integer harmonic mean.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 15, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 175, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 188, 0
Offset: 1

Views

Author

Amiram Eldar, May 04 2023

Keywords

Examples

			 n  a(n)  partitions
==  ====  ==========
 6     1  {{1, 2, 3, 6}}
12     1  {{1, 2, 3, 6}, {4, 12}}
24     4  {{1, 2, 3, 6}, {4, 8, 12, 24}}, {{1, 2, 4, 8, 12, 24}, {3, 6}},
          {{1, 3, 6}, {2, 4, 8, 12, 24}}, {{1, 2, 3, 6}, {4, 12}, {8, 24}}
		

Crossrefs

Cf. A339453, A339665, A362801, A362803 (indices of records).

Programs

  • Mathematica
    harmQ[s_] := AllTrue[s, Length[#] > 1 && IntegerQ[HarmonicMean[#]] &]; a[n_] := Module[{d = Divisors[n], r}, r = ResourceFunction["SetPartitions"][d]; Count[r, _?harmQ]]; Array[a, 119]

Formula

a(A362801(n)) > 0.
Showing 1-5 of 5 results.