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.

A020487 Antiharmonic numbers: numbers k such that sigma_1(k) divides sigma_2(k).

Original entry on oeis.org

1, 4, 9, 16, 20, 25, 36, 49, 50, 64, 81, 100, 117, 121, 144, 169, 180, 196, 200, 225, 242, 256, 289, 324, 325, 361, 400, 441, 450, 468, 484, 500, 529, 576, 578, 605, 625, 650, 676, 729, 784, 800, 841, 900, 961, 968, 980, 1024, 1025, 1058, 1089, 1156, 1225, 1280, 1296
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that antiharmonic mean of divisors of k is an integer. Antiharmonic mean of divisors of number m = Product (p_i^e_i) is A001157(m)/A000203(m) = Product ((p_i^(e_i+1)+1)/(p_i+1)). So a(n) = k, for some n, if A001157(k)/A000203(k) is an integer. - Jaroslav Krizek, Mar 09 2009
Squares are antiharmonic, since (p^(2*e+1)+1)/(p+1) = p^(2*e) - p^(2*e-1) + p^(2*e-2) - ... + 1 is an integer. The nonsquare antiharmonic numbers are A227771. They include the primitive antiharmonic numbers A228023, except for its first term. - Jonathan Sondow, Aug 02 2013
Sequence is infinite, see A227771. - Charles R Greathouse IV, Sep 02 2013
The term "antiharmonic" is also known as "contraharmonic". - Pahikkala Jussi, Dec 11 2013

Examples

			a(3) = 9 = 3^2; antiharmonic mean of divisors of 9 is (3^(2+1) + 1)/(3 + 1) = 7; 7 is an integer. - _Jaroslav Krizek_, Mar 09 2009
		

Crossrefs

Programs

  • Haskell
    a020487 n = a020487_list !! (n-1)
    a020487_list = filter (\x -> a001157 x `mod` a000203 x == 0) [1..]
    -- Reinhard Zumkeller, Jan 21 2014
    
  • Magma
    [n: n in [1..1300] | IsZero(DivisorSigma(2,n) mod DivisorSigma(1,n))]; // Bruno Berselli, Apr 10 2013
    
  • Mathematica
    Select[Range[2000], Divisible[DivisorSigma[2, #], DivisorSigma[1, #]]&] (* Jean-François Alcover, Nov 14 2017 *)
  • PARI
    is(n)=sigma(n,2)%sigma(n)==0 \\ Charles R Greathouse IV, Jul 02 2013
    
  • Python
    from sympy import divisor_sigma
    def ok(n): return divisor_sigma(n, 2)%divisor_sigma(n, 1) == 0
    print([k for k in range(1, 1300) if ok(k)]) # Michael S. Branicky, Feb 25 2024
    
  • Python
    # faster for producing initial segment of sequence
    from math import prod
    from sympy import factorint
    def ok(n):
        f = factorint(n)
        sigma1 = prod((p**(  e+1)-1)//(p-1)    for p, e in f.items())
        sigma2 = prod((p**(2*e+2)-1)//(p**2-1) for p, e in f.items())
        return sigma2%sigma1 ==  0
    print([k for k in range(1, 1300) if ok(k)]) # Michael S. Branicky, Feb 25 2024

A227771 Antiharmonic numbers that are not squares.

Original entry on oeis.org

20, 50, 117, 180, 200, 242, 325, 450, 468, 500, 578, 605, 650, 800, 968, 980, 1025, 1058, 1280, 1300, 1445, 1476, 1620, 1682, 1700, 1800, 1872, 2178, 2312, 2340, 2420, 2450, 2600, 2645, 2925, 3200, 3362, 3380, 3757, 3872, 4050, 4100, 4205, 4232, 4352, 4418, 4500, 4693, 5200
Offset: 1

Views

Author

Jonathan Sondow, Aug 02 2013

Keywords

Comments

Given prime factorization m = product (p_i^e_i), the antiharmonic (or contraharmonic) mean of the divisors of m is sigma_2(m)/sigma_1(m) = product (p_i^(e_i+1)+1)/(p_i+1). If this is an integer, then m is called antiharmonic.
All squares are trivially antiharmonic, since (p^(2*e+1)+1)/(p+1) = p^(2*e) - p^(2*e-1) + p^(2*e-2) - ... + 1 is an integer. Sequence gives the nontrivial antiharmonic numbers.
The antiharmonic means of their divisors are A227986.
Sequence is infinite, since if n is in the sequence and gcd(n, k) = 1 then nk^2 is also in the sequence. - Charles R Greathouse IV, Aug 02 2013
Removing such terms nk^2 leaves the primitive antiharmonic numbers A228023. - Jonathan Sondow, Aug 04 2013

Examples

			sigma_2(20)/sigma_1(20) = (1^2 + 2^2 + 4^2 + 5^2 + 10^2 + 20^2)/(1 + 2 + 4 + 5 + 10 + 20) = 546/42 = 13 is an integer, 20 is not a square, and no smaller number has these properties, so a(1) = 20.
		

References

  • R. Guy, Unsolved Problems in Number Theory, B2 (see harmonic number).

Crossrefs

Programs

  • PARI
    is(n)=if(issquare(n),return(0)); my(f=factor(n)); denominator(prod(i=1,#f~,(f[i,1]^(f[i,2]+1)+1)/(f[i,1]+1)))==1 \\ Charles R Greathouse IV, Aug 02 2013

Formula

A001157(a(n))/A000203(a(n)) = A227986(n).

A228023 Primitive antiharmonic numbers.

Original entry on oeis.org

1, 20, 50, 117, 200, 242, 325, 500, 578, 605, 650, 800, 968, 1025, 1058, 1280, 1445, 1476, 1682, 1700, 2312, 2340, 2600, 2645, 3200, 3362, 3757, 3872, 4205, 4232, 4352, 4418, 4693, 5618, 6728, 6962, 7514, 8228, 8405, 8833, 9248, 9425, 9472, 10082, 10400, 11045, 11849, 12493
Offset: 1

Views

Author

Keywords

Comments

Antiharmonic numbers (A020487) which are not the product of an antiharmonic number and a relatively prime square > 1. Apart from the first term, a subsequence of A227771 (antiharmonic numbers that are not squares).
Is this sequence infinite? It seems that 4n^2 <= a(n) <= 8n^2 for n > 1, and that a(n) ~ 6n^2 as n -> infinity--see A228036 for motivation.
The antiharmonic mean of the divisors of a(n) is A228024(n).

Examples

			200 = 2^3 * 5^2 is antiharmonic (since sigma_2(200)/sigma(200) = 119 is an integer) but 2^3 is not antiharmonic, so 200 is in this sequence.
180 = 2^2 * 3^2 * 5 is antiharmonic but 180/3^2 = 20 is also antiharmonic, so 180 is not in the sequence.
		

Crossrefs

Programs

  • PARI
    isf(f)=denominator(prod(i=1,#f~,(f[i,1]^(f[i,2]+1)+1)/(f[i,1]+1)))==1
    nosmaller(f,startAt)=for(i=startAt,#f~,if(f[i,2]%2==0&&f[i,2],return(nosmaller(f,i+1)&&!(f[i,2]=0)&&!isf(f)&&nosmaller(f,i+1))));1
    is(n)=my(f);isf(f=factor(n))&&nosmaller(f,1)

A228036 (10^n)-th primitive antiharmonic number.

Original entry on oeis.org

1, 605, 51005, 5837732, 599407380, 60462121402
Offset: 0

Views

Author

Keywords

Comments

We conjecture that lim_{n->oo} a(n)/100^n = lim_{n->oo} A228023(n)/n^2 = 6. This is supported by the values a(n)/(10^n)^2 = 6.05, 5.10, 5.84, 5.99, 6.05 for n = 1..5, as well as by the values of A228023(n)/n^2.

Crossrefs

Formula

a(n) = A228023(10^n).

Extensions

a(5) from Charles R Greathouse IV, Sep 03 2013
Showing 1-4 of 4 results.