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-40 of 118 results. Next

A007340 Numbers whose divisors' harmonic and arithmetic means are both integers.

Original entry on oeis.org

1, 6, 140, 270, 672, 1638, 2970, 6200, 8190, 18600, 18620, 27846, 30240, 32760, 55860, 105664, 117800, 167400, 173600, 237510, 242060, 332640, 360360, 539400, 695520, 726180, 753480, 1089270, 1421280, 1539720, 2229500, 2290260, 2457000
Offset: 1

Views

Author

Keywords

Comments

Intersection of A001599 and A003601.
The following are also in A046985: 1, 6, 672, 30240, 32760. Also contains multiply perfect (A007691) numbers. - Labos Elemer
The numbers whose average divisor is also a divisor. Ore's harmonic numbers A001599 without the numbers A046999. - Thomas Ordowski, Oct 26 2014, Apr 17 2022
Harmonic numbers k whose harmonic mean of divisors (A001600) is also a divisor of k. - Amiram Eldar, Apr 19 2022

Examples

			x = 270: Sigma(0, 270) = 16, Sigma(1, 270) = 720; average divisor a = 720/16 = 45 and integer 45 divides x, x/a = 270/45 = 6, but 270 is not in A007691.
		

References

  • G. L. Cohen, personal communication.
  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • N. J. A. Sloane, Illustration for sequence M4299 (=A007340) in The Encyclopedia of Integer Sequences (with Simon Plouffe), Academic Press, 1995.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. Wells, Curious and interesting numbers, Penguin Books, p. 124.

Crossrefs

Intersection of A003601 and A001599.
Different from A090945.

Programs

  • Haskell
    a007340 n = a007340_list !! (n-1)
    a007340_list = filter ((== 0) . a054025) a001599_list
    -- Reinhard Zumkeller, Dec 31 2013
    
  • Maple
    filter:= proc(n)
    uses numtheory;
    local a;
    a:= sigma(n)/sigma[0](n);
    type(a,integer) and type(n/a,integer);
    end proc:
    select(filter, [$1..2500000]); # Robert Israel, Oct 26 2014
  • Mathematica
    Do[ a = DivisorSigma[0, n]/ DivisorSigma[1, n]; If[IntegerQ[n*a] && IntegerQ[1/a], Print[n]], {n, 1, 2500000}] (* Labos Elemer *)
    ahmQ[n_] := Module[{dn = Divisors[n]}, IntegerQ[Mean[dn]] && IntegerQ[HarmonicMean[dn]]]; Select[Range[2500000], ahmQ] (* Harvey P. Dale, Nov 16 2011 *)
  • PARI
    is(n)=my(d=divisors(n),s=vecsum(d)); s%#d==0 && #d*n%s==0 \\ Charles R Greathouse IV, Feb 07 2017

Formula

a = Sigma(1, x)/Sigma(0, x) integer and b = x/a also.

Extensions

More terms from Robert G. Wilson v, Oct 03 2002
Edited by N. J. A. Sloane, Oct 05 2008 at the suggestion of R. J. Mathar

A094471 a(n) = Sum_{(n - k)|n, 0 <= k <= n} k.

Original entry on oeis.org

0, 1, 2, 5, 4, 12, 6, 17, 14, 22, 10, 44, 12, 32, 36, 49, 16, 69, 18, 78, 52, 52, 22, 132, 44, 62, 68, 112, 28, 168, 30, 129, 84, 82, 92, 233, 36, 92, 100, 230, 40, 240, 42, 180, 192, 112, 46, 356, 90, 207, 132, 214, 52, 312, 148, 328, 148, 142, 58, 552, 60
Offset: 1

Views

Author

Labos Elemer, May 28 2004

Keywords

Comments

Not all values arise and some arise more than once.
Row sums of triangle A134866. - Gary W. Adamson, Nov 14 2007
Sum of the largest parts of the partitions of n into two parts such that the smaller part divides the larger. - Wesley Ivan Hurt, Dec 21 2017
a(n) is also the sum of all parts minus the total number of parts of all partitions of n into equal parts (an interpretation of the Torlach Rush's formula). - Omar E. Pol, Nov 30 2019
If and only if sigma(n) divides a(n), then n is one of Ore's Harmonic numbers, A001599. - Antti Karttunen, Jul 18 2020

Examples

			q^2 + 2*q^3 + 5*q^4 + 4*q^5 + 12*q^6 + 6*q^7 + 17*q^8 + 14*q^9 + ...
For n = 4 the partitions of 4 into equal parts are [4], [2,2], [1,1,1,1]. The sum of all parts is 4 + 2 + 2 + 1 + 1 + 1 + 1 = 12. There are 7 parts, so a(4) = 12 - 7 = 5. - _Omar E. Pol_, Nov 30 2019
		

References

  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 30.

Crossrefs

Cf. A000005, A000010, A000203, A001599, A038040, A134866, A152211, A244051, A324121 (= gcd(a(n), sigma(n))).
Cf. A088827 (positions of odd terms).

Programs

  • Julia
    using AbstractAlgebra
    function A094471(n)
        sum(k for k in 0:n if is_divisible_by(n, n - k))
    end
    [A094471(n) for n in 1:61] |> println  # Peter Luschny, Nov 14 2023
    
  • Maple
    with(numtheory); A094471:=n->n*tau(n)-sigma(n); seq(A094471(k), k=1..100); # Wesley Ivan Hurt, Oct 27 2013
    divides := (k, n) -> k = n or (k > 0 and irem(n, k) = 0):
    a := n -> local k; add(`if`(divides(n - k, n), k, 0), k = 0..n):
    seq(a(n), n = 1..61);  # Peter Luschny, Nov 14 2023
  • Mathematica
    Table[n*DivisorSigma[0, n] - DivisorSigma[1, n], {n, 1, 100}]
  • PARI
    {a(n) = n*numdiv(n) - sigma(n)} /* Michael Somos, Jan 25 2008 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A094471(n):
        f = factorint(n).items()
        return n*prod(e+1 for p,e in f)-prod((p**(e+1)-1)//(p-1) for p,e in f)
    # Chai Wah Wu, Nov 14 2023
  • SageMath
    def A094471(n): return sum(k for k in (0..n) if (n-k).divides(n))
    print([A094471(n) for n in range(1, 62)])  # Peter Luschny, Nov 14 2023
    

Formula

a(n) = n*tau(n) - sigma(n) = n*A000005(n) - A000203(n). [Previous name.]
If p is prime, then a(p) = p*tau(p)-sigma(p) = 2p-(p+1) = p-1 = phi(p).
If n>1, then a(n)>0.
a(n) = Sum_{d|n} (n-d). - Amarnath Murthy, Jul 31 2005
G.f.: Sum_{k>=1} k*x^(2*k)/(1 - x^k)^2. - Ilya Gutkovskiy, Oct 24 2018
a(n) = A038040(n) - A000203(n). - Torlach Rush, Feb 02 2019

Extensions

Simpler name by Peter Luschny, Nov 14 2023

A106315 Harmonic residue of n.

Original entry on oeis.org

0, 1, 2, 5, 4, 0, 6, 2, 1, 4, 10, 16, 12, 8, 12, 18, 16, 30, 18, 36, 20, 16, 22, 12, 13, 20, 28, 0, 28, 24, 30, 3, 36, 28, 44, 51, 36, 32, 44, 50, 40, 48, 42, 12, 36, 40, 46, 108, 33, 21, 60, 18, 52, 72, 4, 88, 68, 52, 58, 48, 60, 56, 66, 67, 8, 96, 66, 30, 84, 128, 70, 84, 72, 68, 78
Offset: 1

Views

Author

George J. Schaeffer (gschaeff(AT)andrew.cmu.edu), Apr 29 2005

Keywords

Comments

The harmonic residue is the remainder when n*d(n) is divided by sigma(n), where d(n) is the number of divisors of n and sigma(n) is the sum of the divisors of n. If n is perfect, the harmonic residue of n is 0.

Crossrefs

Cf. A106316, A106317, A001599 (positions of zeros).

Programs

  • Haskell
    a106315 n = n * a000005 n `mod` a000203 n -- Reinhard Zumkeller, Apr 06 2014
  • Maple
    A106315 := proc(n)
        modp(n*numtheory[tau](n),numtheory[sigma](n)) ;
    end proc:
    seq(A106315(n),n=1..100) ; # R. J. Mathar, Jan 25 2017
  • Mathematica
    HarmonicResidue[n_]=Mod[n*DivisorSigma[0, n], DivisorSigma[1, n]]; HarmonicResidue[ Range[ 80]]

Formula

a(n) = A038040(n) - A000203(n) * A240471(n) . - Reinhard Zumkeller, Apr 06 2014

Extensions

Mathematica program completed by Harvey P. Dale, Feb 29 2024

A286325 Bi-unitary harmonic numbers.

Original entry on oeis.org

1, 6, 45, 60, 90, 270, 420, 630, 672, 2970, 5460, 8190, 9072, 9100, 10080, 15925, 22680, 22848, 27300, 30240, 40950, 45360, 54600, 81900, 95550, 99792, 136500, 163800, 172900, 204750, 208656, 245700, 249480, 312480, 332640, 342720, 385560, 409500, 472500, 491400
Offset: 1

Views

Author

Michel Marcus, May 07 2017

Keywords

Comments

A number m is a term if the sum of its bi-unitary divisors, A188999(m) divides the product of m by the number of its bi-unitary divisors A286324(m).
Numbers k whose harmonic mean of their bi-unitary divisors, A361782(k)/A361783(k), is an integer. - Amiram Eldar, Mar 24 2023

Crossrefs

Cf. A001599 (Ore harmonic), A006086 (unitary harmonic).

Programs

  • Mathematica
    f[p_, e_] := p^e * If[OddQ[e], (e + 1)*(p - 1)/(p^(e + 1) - 1), e/((p^(e + 1) - 1)/(p - 1) - p^(e/2))]; bhQ[n_] := IntegerQ[Times @@ f @@@ FactorInteger[n]]; bhQ[1] = True; Select[Range[10^5], bhQ] (* Amiram Eldar, Mar 24 2023 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    gcud(n, m) = vecmax(setintersect(udivs(n), udivs(m)));
    biudivs(n) = select(x->(gcud(x, n/x)==1), divisors(n));
    isok(n) = my(v=biudivs(n)); denominator(n*#v/vecsum(v))==1;

A349473 Irregular triangle read by rows: the n-th row contains the elements in the continued fraction of the harmonic mean of the divisors of n.

Original entry on oeis.org

1, 1, 3, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 2, 7, 2, 2, 13, 2, 4, 2, 1, 1, 5, 2, 1, 1, 3, 1, 1, 6, 2, 3, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 8, 2, 1, 3, 3, 1, 1, 9, 2, 1, 6, 2, 1, 1, 1, 2, 2, 2, 4, 1, 1, 11, 3, 5, 2, 2, 2, 1, 1, 2, 2, 2, 10, 2, 1, 2, 3, 3, 1, 1, 14
Offset: 1

Views

Author

Amiram Eldar, Nov 19 2021

Keywords

Comments

For an odd prime p > 3, the p-th row has a length 3 with a(p, 1) = a(p, 2) = 1 and a(p, 3) = (p-1)/2.
For a harmonic number m = A001599(k), the m-th row has a length 1 with a(k, 1) = A099377(m) = A001600(k).

Examples

			The first ten rows of the triangle are:
  1,
  1, 3,
  1, 2,
  1, 1, 2, 2,
  1, 1, 2,
  2,
  1, 1, 3,
  2, 7, 2,
  2, 13,
  2, 4, 2
  ...
		

Crossrefs

Cf. A349474 (row lengths).

Programs

  • Mathematica
    row[n_] := ContinuedFraction[DivisorSigma[0, n] / DivisorSigma[-1, n]]; Table[row[k], {k, 1, 29}] // Flatten

A319745 Nonunitary harmonic numbers: numbers such that the harmonic mean of their nonunitary divisors is an integer.

Original entry on oeis.org

4, 9, 12, 18, 24, 25, 45, 49, 54, 60, 112, 121, 126, 150, 168, 169, 270, 289, 294, 336, 361, 529, 560, 594, 637, 726, 841, 961, 1014, 1232, 1369, 1638, 1680, 1681, 1734, 1849, 1984, 2166, 2184, 2209, 2430, 2520, 2688, 2700, 2809, 2850, 3174, 3481, 3721, 3780
Offset: 1

Views

Author

Amiram Eldar, Sep 27 2018

Keywords

Comments

Includes all the numbers with a single nonunitary divisor. Those with more than one: 12, 18, 24, 45, 54, 60, 112, ...
Supersequence of A064591 (nonunitary perfect numbers).
Ligh & Wall showed that if p, 2p-1 and 2^p-1 are distinct primes (A172461, except for 2), then the following numbers are in the sequence: 6*p^2, p^2*(2p-1), 6*p^2*(2p-1), 2^(p+1)*3*(2^p-1), 2^(p+1)*15*(2^p-1) and 2^(p+1)*(2p-1)*(2^p-1).

Crossrefs

Programs

  • Mathematica
    nudiv[n_] := Block[{d = Divisors[n]}, Select[d, GCD[#, n/#] > 1 &]]; nhQ[n_]:= Module[ {divs=nudiv[n]}, Length[divs] > 0 && IntegerQ[HarmonicMean[divs]]]; Select[Range[30000], nhQ]
  • PARI
    hm(v) = #v/sum(k=1, #v, 1/v[k]);
    vnud(n) = select(x->(gcd(x, n/x)!=1), divisors(n));
    isok(n) = iferr(denominator(hm(vnud(n))) == 1, E, 0); \\ Michel Marcus, Oct 28 2018

A006036 Primitive pseudoperfect numbers.

Original entry on oeis.org

6, 20, 28, 88, 104, 272, 304, 350, 368, 464, 490, 496, 550, 572, 650, 748, 770, 910, 945, 1184, 1190, 1312, 1330, 1376, 1430, 1504, 1575, 1610, 1696, 1870, 1888, 1952, 2002, 2030, 2090, 2170, 2205, 2210, 2470, 2530, 2584, 2590, 2870, 2990, 3010, 3128, 3190, 3230, 3290, 3410, 3465, 3496, 3710, 3770, 3944, 4070, 4095, 4130, 4216, 4270, 4288, 4408, 4510, 4544, 4672, 4690, 4712, 4730, 4970
Offset: 1

Views

Author

Keywords

Comments

A primitive pseudoperfect number is a pseudoperfect number that is not a multiple of any other pseudoperfect number.
The odd entries so far are identical to the odd primitive abundant A006038. - Walter Kehowski, Aug 12 2005
Zachariou and Zachariou (1972) called these numbers "irreducible semiperfect numbers". - Amiram Eldar, Dec 04 2020

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd edition, Springer, 2004, Section B2, pp. 74-75.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006036 n = a006036_list !! (n-1)
    a006036_list = filter (all (== 0) . map a210455 . a027751_row) a005835_list
    -- Reinhard Zumkeller, Jan 21 2013
  • Maple
    with(numtheory): with(combinat): issemiperfect := proc(n) local b, S;
    b:=false; S:=subsets(divisors(n) minus {n}); while not S[finished] do if
    convert(S[nextvalue](),`+`)=n then b:=true; break fi od; return b end:
    L:=remove(proc(z) isprime(z) end,[$1..5000]): PP:=[]: for zz from 1 to 1 do
    for n in L do if issemiperfect(n) then PP:=[op(PP),n] fi od od;
    sr := proc(l::list) local x, R, S, P, L; S:=sort(l); R:=[]; P:=S;
    for x in S do
    if not(x in R) then
    L:=selectremove(proc(z) z>x and z mod x = 0 end, P);
    R:=[op(R),op(L[1])]; P:=L[2];
    fi; od; return P; end:
    PPP:=sr(PP); # primitive pseudoperfect numbers less than 5000 # Walter Kehowski, Aug 12 2005
  • Mathematica
    (* First run one of the programs for A005835 *) A006036 = A005835; curr = 1; max = A005835[[-1]]; While[curr < Length[A006036], currMult = A006036[[curr]]; A006036 = Complement[A006036, Range[2currMult, Ceiling[max/currMult] currMult, currMult]]; curr++]; A006036 (* Alonso del Arte, Sep 08 2012 *)

Extensions

More terms from Walter Kehowski, Aug 12 2005

A046985 Multiply perfect numbers whose average divisor is an integer and divides the number itself.

Original entry on oeis.org

1, 6, 672, 30240, 32760, 23569920, 45532800, 14182439040, 51001180160, 153003540480, 403031236608, 13661860101120, 154345556085770649600, 9186050031556349952000, 143573364313605309726720, 352338107624535891640320, 680489641226538823680000, 34384125938411324962897920
Offset: 1

Views

Author

Keywords

Examples

			k = 45532800 is a term since, s0 = 384, s1 = 182131200, and the three quotients s1/k = 182131200/45532800 = 4, (k * s0)/s1 = (45532800 * 384)/182131200 = 96, and s1/s0 = 182131200/384 = 474300 are all integers.
		

Crossrefs

Intersection of A003601, A007691 and A001599.

Programs

  • Mathematica
    q[n_] := Module[{d = DivisorSigma[0, n], s = DivisorSigma[1, n]}, Divisible[s, n] && Divisible[n * d, s] && Divisible[s, d]]; Select[Range[33000], q] (* Amiram Eldar, May 09 2024 *)
  • PARI
    isok(n) = s1 = sigma(n); s0 = numdiv(n); !(s1 % n) && !(s1 % s0) && !((n*s0) % s1); \\ Michel Marcus, Dec 10 2013
    
  • PARI
    is(k) = {my(f = factor(k), s = sigma(f), d = numdiv(f)); !(s % k) && !((k * d) % s) && !(s % d);} \\ Amiram Eldar, May 09 2024

Formula

Let s1 = sigma(k) = A000203(k) be the sum of divisors of k and s0 = d(k) = A000005(k) be the number of divisors of k. Then, k is a term if s1/k, (k * s0)/s1, and s1/s0 are all integers.

Extensions

a(10)-a(15) from Donovan Johnson, Nov 30 2008
Edited and a(16)-a(18) added by Amiram Eldar, May 09 2024

A324121 a(n) = gcd(n*d(n), sigma(n)), where d(n) = number of divisors of n (A000005) and sigma(n) = sum of divisors of n (A000203).

Original entry on oeis.org

1, 1, 2, 1, 2, 12, 2, 1, 1, 2, 2, 4, 2, 8, 12, 1, 2, 3, 2, 6, 4, 4, 2, 12, 1, 2, 4, 56, 2, 24, 2, 3, 12, 2, 4, 1, 2, 4, 4, 10, 2, 48, 2, 12, 6, 8, 2, 4, 3, 3, 12, 2, 2, 24, 4, 8, 4, 2, 2, 24, 2, 8, 2, 1, 4, 48, 2, 6, 12, 16, 2, 3, 2, 2, 2, 4, 4, 24, 2, 2, 1, 2, 2, 112, 4, 4, 12, 4, 2, 18, 28, 24, 4, 8, 20, 36, 2, 3, 6, 1, 2, 24, 2, 2, 24
Offset: 1

Views

Author

Antti Karttunen, Feb 15 2019

Keywords

Comments

Records 1, 2, 12, 56, 112, 120, 336, 720, 992, 2016, 4368, 8640, 14880, 16256, 26208, 59520, 78624, 120960, 131040, 191520, 227584, 297600, ... occur at positions: 1, 3, 6, 28, 84, 120, 140, 270, 496, 672, 1638, 2970, 6200, 8128, 8190, 18600, 27846, 30240, 32760, 55860, 105664, 117800, ... . Note that A001599 is not a subsequence of the latter, as at least 18620 (present in A001599) is missing.

Crossrefs

Programs

  • Mathematica
    Table[GCD[n DivisorSigma[0,n],DivisorSigma[1,n]],{n,120}] (* Harvey P. Dale, Feb 17 2023 *)
  • PARI
    A324121(n) = gcd(sigma(n),n*numdiv(n));

Formula

a(n) = gcd(A000203(n), A038040(n)).
a(n) = A324058(A156552(n)).

A336848 a(n) = A003973(n) / A336846(n).

Original entry on oeis.org

1, 2, 3, 13, 4, 2, 6, 10, 31, 8, 7, 13, 9, 4, 12, 121, 10, 62, 12, 52, 18, 14, 15, 2, 19, 6, 39, 26, 16, 8, 19, 182, 21, 20, 24, 403, 21, 8, 27, 40, 22, 12, 24, 7, 124, 10, 27, 121, 133, 38, 6, 13, 30, 26, 4, 20, 36, 32, 31, 52, 34, 38, 62, 1093, 36, 14, 36, 130, 9, 16, 37, 62, 40, 14, 57, 52, 42, 18, 42, 484, 781
Offset: 1

Views

Author

Antti Karttunen, Aug 06 2020

Keywords

Comments

If there are no more 1's in this sequence after the initial one, then there are no odd terms of A001599 (Ore's Harmonic Numbers) larger than one.

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A336848(n) = { my(u=A003961(n),s=sigma(u)); (s/gcd(s, numdiv(n)*u)); };

Formula

a(n) = A003973(n) / A336846(n).
Previous Showing 31-40 of 118 results. Next