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.

Previous Showing 31-34 of 34 results.

A358331 Number of integer partitions of n with arithmetic and geometric mean differing by one.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 2, 0, 2, 0, 1, 1, 0, 3, 3, 0, 0, 2, 2, 0, 4, 0, 0, 5, 0, 0, 4, 5, 4, 3, 2, 0, 3, 3, 10, 4, 0, 0, 7, 0, 0, 16, 2, 4, 4, 0, 0, 5, 24, 0, 6, 0, 0, 9, 0, 27, 10, 0, 7, 7, 1, 0, 44
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2022

Keywords

Comments

The arithmetic and geometric mean from such partition is a positive integer. - David A. Corneth, Nov 11 2022

Examples

			The a(30) = 2 through a(36) = 3 partitions (C = 12, G = 16):
  (888222)      .  (99333311)  (G2222222111)  .  (C9662)    (G884)
  (8844111111)                                   (C9833)    (888222111111)
                                                 (8884421)  (G42222221111)
		

Crossrefs

The version for subsets seems to be close to A178832.
These partitions are ranked by A358332.
A000041 counts partitions.
A067538 counts partitions with integer average, ranked by A316413.
A067539 counts partitions with integer geometric mean, ranked by A326623.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Mean[#]==1+GeometricMean[#]&]],{n,0,30}]
  • PARI
    a(n) = if (n, my(nb=0,vp); forpart(p=n, vp=Vec(p); if (vecsum(vp)/#p == 1 + sqrtn(vecprod(vp), #p), nb++)); nb, 0); \\ Michel Marcus, Nov 11 2022
    
  • Python
    from math import prod
    from sympy import divisors, integer_nthroot
    from sympy.utilities.iterables import partitions
    def A358331(n):
        divs = {d:n//d-1 for d in divisors(n,generator=True)}
        return sum(1 for s,p in partitions(n,m=max(divs,default=0),size=True) if s in divs and (t:=integer_nthroot(prod(a**b for a, b in p.items()),s))[1] and divs[s]==t[0]) # Chai Wah Wu, Sep 24 2023

Extensions

a(61)-a(80) from Giorgos Kalogeropoulos, Nov 11 2022
a(81)-a(84) from Chai Wah Wu, Sep 24 2023

A286972 Numbers k such that the average of the prime power divisors (not including 1) of k is an integer.

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 11, 12, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 42, 43, 47, 49, 51, 53, 55, 57, 59, 61, 64, 65, 67, 69, 71, 73, 75, 77, 78, 79, 80, 81, 83, 84, 85, 87, 89, 91, 93, 95, 97, 100, 101, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 119, 121, 123, 127, 129, 131, 132, 133, 135, 137, 139
Offset: 1

Views

Author

Ilya Gutkovskiy, May 17 2017

Keywords

Comments

Numbers k such that A001222(k)|A023889(k).

Examples

			12 is in the sequence because 12 has 6 divisors {1, 2, 3, 4, 6, 12} among which 3 are prime powers {2, 3, 4} and (2 + 3 + 4)/3 = 3 is an integer.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := IntegerQ@Mean@Select[Divisors@n, PrimePowerQ]; Select[Range@140, fQ]
  • PARI
    isok(m) = my(vd = select(isprimepower, divisors(m))); #vd && !(vecsum(vd) % #vd); \\ Michel Marcus, Apr 28 2020

A337935 Numbers with integer contraharmonic mean of distinct prime factors.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 190, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Ivan N. Ianakiev, Oct 01 2020

Keywords

Comments

Similar sequences are A078174 (with respect to arithmetic mean) and A246655 (with respect to geometric mean).
Up to 10^6 there are 2637 terms that are not in A000961 (and in A246655). The list starts: 190, 380, 390, 615, 638, 710, 760, 780, 950, 1170, 1235, 1276, 1365, 1420, 1518, 1520, 1558, 1560, 1770, 1845, 1900, 1950, 2340, 2552, 2840, ...

Examples

			The distinct prime factors of 190 are {2,5,19} and their contraharmonic mean is (4+25+361)/(2+5+19) = 15. Therefore, 190 is a term.
		

Crossrefs

Cf. A078174, A246655 (subsequence).

Programs

  • Mathematica
    pf[n_]:=First/@FactorInteger[n];
    Select[Range[2,241],IntegerQ[ContraharmonicMean[pf[#]]]&]
  • PARI
    isok(m) = if (m>1, my(f=factor(m)); !(norml2(f[,1]) % vecsum(f[,1]))); \\ Michel Marcus, Oct 01 2020

A382351 Numbers with an integer harmonic mean of the indices of distinct prime factors.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 39, 41, 43, 47, 49, 53, 59, 61, 64, 65, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 117, 121, 125, 127, 128, 130, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 195, 197, 199, 211
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 22 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 220], IntegerQ[HarmonicMean[PrimePi[#[[1]]] & /@ FactorInteger[#]]] &]
  • PARI
    isok(k) = if (k>1, my(f=factor(k)); denominator(#f~/sum(i=1, #f~, 1/primepi(f[i,1]))) == 1); \\ Michel Marcus, Mar 22 2025
Previous Showing 31-34 of 34 results.