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-10 of 14 results. Next

A063655 Smallest semiperimeter of integral rectangle with area n.

Original entry on oeis.org

2, 3, 4, 4, 6, 5, 8, 6, 6, 7, 12, 7, 14, 9, 8, 8, 18, 9, 20, 9, 10, 13, 24, 10, 10, 15, 12, 11, 30, 11, 32, 12, 14, 19, 12, 12, 38, 21, 16, 13, 42, 13, 44, 15, 14, 25, 48, 14, 14, 15, 20, 17, 54, 15, 16, 15, 22, 31, 60, 16, 62, 33, 16, 16, 18, 17, 68, 21, 26
Offset: 1

Views

Author

Floor van Lamoen, Jul 24 2001

Keywords

Comments

Similar to A027709, which is minimal perimeter of polyomino of n cells, or equivalently, minimal perimeter of rectangle of area at least n and with integer sides. Present sequence is minimal semiperimeter of rectangle with area exactly n and with integer sides. - Winston C. Yang (winston(AT)cs.wisc.edu), Feb 03 2002
Semiperimeter b+d, d >= b, of squarest (smallest d-b) integral rectangle with area bd = n. That is, b = largest divisor of n <= sqrt(n), d = smallest divisor of n >= sqrt(n). a(n) = n+1 iff n is noncomposite (1 or prime). - Daniel Forgues, Nov 22 2009
From Juhani Heino, Feb 05 2019: (Start)
Basis for any thickness "frames" around the minimal area. Perimeter can be thought as the 0-thick frame, it is obviously 2a(n). Thickness 1 is achieved by laying unit tiles around the area, there are 2(a(n)+2) of them. Thickness 2 comes from the second such layer, now there are 4(a(n)+4) and so on. They all depend only on a(n), so they share this structure:
Every n > 1 is included. (For different thicknesses, every integer that can be derived from these with the respective formula. So, the perimeter has every even n > 2.)
For each square n > 1, a(n) = a(n-1).
a(1), a(2) and a(6) are the only unique values - the others appear multiple times.
(End)
Gives a discrete Uncertainty Principle. A complex function on an abelian group of order n and its Discrete Fourier Transform must have at least a(n) nonzero entries between them. This bound is achieved by the indicator function on a subgroup of size closest to sqrt(n). - Oscar Cunningham, Oct 10 2021
Also two times the median divisor of n, where the median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). The version for mean instead of median is A057020/A057021. Other doubled medians of multisets are: A360005 (prime indices), A360457 (distinct prime indices), A360458 (distinct prime factors), A360459 (prime factors), A360460 (prime multiplicities), A360555 (0-prepended differences). - Gus Wiseman, Mar 18 2023

Examples

			Since 15 = 1*15 = 3*5 and the 3*5 rectangle gives smallest semiperimeter 8, we have a(15)=8.
		

Crossrefs

Positions of odd terms are A139710.
Positions of even terms are A139711.
A000005 counts divisors, listed by A027750.
A000975 counts subsets with integer median.

Programs

  • Maple
    A063655 := proc(n)
        local i,j;
        for i from floor(sqrt(n)) to 1 by -1 do
            j := floor(n/i) ;
            if i*j = n then
                return i+j;
            end if;
        end do:
    end proc:
    seq(A063655(n), n=1..80); # Winston C. Yang, Feb 03 2002
  • Mathematica
    Table[d = Divisors[n]; len = Length[d]; If[OddQ[len], 2*Sqrt[n], d[[len/2]] + d[[1 + len/2]]], {n, 100}] (* T. D. Noe, Mar 06 2012 *)
    Table[2*Median[Divisors[n]],{n,100}] (* Gus Wiseman, Mar 18 2023 *)
  • PARI
    A063655(n) = { my(c=1); fordiv(n,d,if((d*d)>=n,if((d*d)==n,return(2*d),return(c+d))); c=d); (0); }; \\ Antti Karttunen, Oct 20 2017
    
  • Python
    from sympy import divisors
    def A063655(n):
        d = divisors(n)
        l = len(d)
        return d[(l-1)//2] + d[l//2] # Chai Wah Wu, Jun 14 2019

Formula

a(n) = A033676(n) + A033677(n).
a(n) = A162348(2n-1) + A162348(2n). - Daniel Forgues, Sep 29 2014
a(n) = Min_{d|n} (n/d + d). - Ridouane Oudra, Mar 17 2024

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org) and Dean Hickerson, Jul 26 2001

A057021 Denominator of (sum of divisors of n / number of divisors of n).

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 1, 4, 3, 2, 1, 3, 1, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 2, 3, 2, 1, 3, 1, 1, 1, 2, 1, 2, 1, 9, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 7, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Henry Bottomley, Jul 21 2000

Keywords

Comments

a(n) = 1 when n is listed in A003601, a(n) > 1 when n is listed in A049642. - Alonso del Arte, Jan 31 2006
a(A069081(n)) = 2. - Bernard Schott, Sep 19 2019

Examples

			a(12)=3 since the 6 divisors of 12 are 1, 2, 3, 4, 6 and 12 and 1+2+3+4+6+12=28 and 28/6=14/3.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a057021 n = denominator $ a000203 n % a000005 n
    -- Reinhard Zumkeller, Jan 06 2012
    
  • Magma
    [Denominator(SumOfDivisors(n)/#Divisors(n)):n in [1..100]]; // Marius A. Burtea, Sep 08 2019
    
  • Maple
    with(numtheory): seq(denom(sigma(n)/tau(n)), n=1..70) ; # Zerinvary Lajos, Jun 04 2008
  • Mathematica
    Denominator[Table[(Plus @@ Divisors[n])/Length[Divisors[n]], {n, 70}]] (* Alonso del Arte, Feb 24 2006 *)
  • PARI
    a(n) = denominator(sigma(n)/numdiv(n)); \\ Michel Marcus, Apr 12 2016
    
  • SageMath
    [denominator(sigma(n, 1)/sigma(n, 0)) for n in range(1, 71)] # Stefano Spezia, Jul 18 2025

Formula

a(n) = A057020(n)*A000005(n)/A000203(n) = A000005(n)/A009205(n).

A336838 Numerator of the arithmetic mean of the divisors of A003961(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 07 2020

Keywords

Comments

Ratio r(n) = a(n)/A336839(n) is multiplicative. For example r(3) = 3/1, r(4) = 13/3, thus r(12) = r(3)*r(4) = 13/1.
Conjecture: For all primes p with an odd exponent e, a(p^e) is a multiple of A048673(p). Note that q+1 is a divisor of (q+1)^e - sigma(q^e) = (q+1)^e - (1 + q + q^2 + ... + q^e) when e is odd, thus also A048673(p) = (q+1)/2 is, where q = A003961(p), thus the conjecture holds, unless the denominator (A336839) has enough prime factors of A048673(p).

Crossrefs

Cf. A336839 (denominators).

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A336838(n) = numerator(sigma(A003961(n))/numdiv(n));

Formula

a(n) = A057020(A003961(n)).
a(n) = numerator(A003973(n)/A000005(n)).
a(n) = A003973(n) / A336856(n) = A003973(n) / gcd(A000005(n), A003973(n)).
a(p) = A048673(p) for all primes p.
a(p^3) = 2*A048673(p)^3 - 2*A048673(p)^2 + A048673(p). [The denominator A336839(p^3) = 1 for all p]

A057022 a(n) = floor((sum of divisors of n) / (number of divisors of n)), or floor(sigma_1(n)/sigma_0(n)).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 3, 4, 4, 6, 4, 7, 6, 6, 6, 9, 6, 10, 7, 8, 9, 12, 7, 10, 10, 10, 9, 15, 9, 16, 10, 12, 13, 12, 10, 19, 15, 14, 11, 21, 12, 22, 14, 13, 18, 24, 12, 19, 15, 18, 16, 27, 15, 18, 15, 20, 22, 30, 14, 31, 24, 17, 18, 21, 18, 34, 21, 24, 18
Offset: 1

Views

Author

Henry Bottomley, Jul 21 2000

Keywords

Comments

Floor of mean of divisors of n. - Jon E. Schoenfield, Dec 24 2016

Examples

			a(4)=2 since the 3 divisors of 4 are 1, 2 and 4 and floor((1 + 2 + 4)/3) = floor(7/3) = 2.
		

Crossrefs

Programs

  • Haskell
    a057022 n = a000203 n `div` a000005 n
    -- Reinhard Zumkeller, Jan 06 2012
    
  • Mathematica
    Floor[Table[Total[Divisors[n]]/Length[Divisors[n]],{n,20}]] (* Daniel Jolly, Nov 15 2014 *)
    Table[Floor[DivisorSigma[1,n]/DivisorSigma[0,n]],{n,70}] (* Harvey P. Dale, Jan 14 2015 *)
  • PARI
    a(n) = sigma(n)\numdiv(n); \\ Michel Marcus, Nov 15 2014

Formula

a(n) = (A000203(n) - A054025(n))/A000005(n).

A175678 Numbers m such that the arithmetic mean Ad(m) of the divisors of m and the arithmetic mean Ah(m) of the numbers h < m such that gcd(h,m) = 1 are both integer.

Original entry on oeis.org

1, 6, 14, 20, 22, 30, 38, 42, 44, 46, 54, 56, 60, 62, 66, 68, 70, 78, 86, 92, 94, 96, 102, 110, 114, 116, 118, 126, 132, 134, 138, 140, 142, 150, 154, 158, 164, 166, 168, 174, 182, 184, 186, 188, 190, 198, 204, 206, 210, 212, 214, 220, 222, 224, 230, 236, 238, 246, 248, 254, 258
Offset: 1

Views

Author

Jaroslav Krizek, Aug 07 2010

Keywords

Comments

Numbers m such that Ad(m) = A000203(m)/A000005(m) = A057020(m)/A057021(m) and Ah(m) = A023896(m)/A000010(m) = A026741(m)/A040001(m-1) are both integers.
{a(n)} = 1 and the even arithmetic numbers from A003601.
Subsequence of A003601.
Union of {a(n)} and A175679 = A003601 (arithmetic numbers).

Examples

			a(2) = 6, Ad(6) = (1+2+3+6)/4 = 3, Ah(6) = (1+5)/2 = 3, Ad(6) and Ah(6) are both integer.
		

Crossrefs

Programs

  • PARI
    Ad(n) = sigma(n)/numdiv(n);
    Ah(n) = if(n<2, n>0, n*eulerphi(n)/2)/eulerphi(n);
    isok(k) = (type(Ad(k)) == "t_INT") && (type(Ah(k)) == "t_INT"); \\ Michel Marcus, Oct 09 2023

Extensions

More terms from Michel Marcus, Oct 09 2023

A175679 Numbers m such that arithmetic mean Ad(m) of divisors of m and arithmetic mean Ak(m) of numbers 1 <= k <= m are both integer.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 119, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141
Offset: 1

Views

Author

Jaroslav Krizek, Aug 07 2010

Keywords

Comments

Numbers m such that Ad(m) = A000203(m) / A000005(m) = A057020(m) / A057021(m) and Ak(m) = A000217(m) / A000027(m) = A145051(m) / A040001(m) are both integer.
Subsequence of A003601: {a(n)} = odd arithmetic numbers from A003601.
{a(n)} union A175678 = A003601 (arithmetic numbers).
From Robert G. Wilson v, Aug 09 2010: (Start)
All terms are odd because the second criterion is equivalent to n|T(n), where T(n) is the n-th triangular number, A000217(n).
Terms that are not prime are 1, 15, 21, 27, 33, 35, 39, 45, 49, 51, 55, 57, 65, 69, 77, 85, ..., .
Odd integers that are not terms: 9, 25, 63, 75, 81, 117, 121, 171, 175, 225, 243, 279, 289, ..., . (End)

Examples

			a(4) = 7, Ad(7) = (1+7)/2 = 4, Ak(7) = (1+2+3+4+5+6+7)/7 = 4, Ad(7) and Ak(7) are both integer.
		

Programs

  • Mathematica
    fQ[n_] := OddQ@n && Mod[DivisorSigma[1, n], DivisorSigma[0, n]] == 0; Select[ Range@ 142, fQ] (* Robert G. Wilson v, Aug 09 2010 *)

Extensions

More terms from Robert G. Wilson v, Aug 09 2010

A176801 a(n) is the smallest natural number m such that product of arithmetic mean of the divisors of n and arithmetic mean of the divisors of m is an integer.

Original entry on oeis.org

1, 3, 1, 5, 1, 1, 1, 7, 5, 3, 1, 2, 1, 1, 1, 19, 1, 3, 1, 1, 1, 1, 1, 3, 5, 3, 1, 2, 1, 1, 1, 3, 1, 3, 1, 17, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 19, 1, 3, 1, 5, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 13, 1, 1, 1, 1, 1, 1, 1, 7, 1, 3, 2, 2, 1, 1, 1, 19, 19, 3, 1, 2, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 17, 1, 1, 1, 7, 1
Offset: 1

Views

Author

Jaroslav Krizek, Apr 26 2010

Keywords

Comments

a(n) = 1 for infinitely many n.
a(n) = 1 for numbers from A003601: a(A003601(n)) = 1.
a(n) = 1 iff A057021(n) = 1.
Not all terms are 1's or primes. For example, a(128) = 21. - Antti Karttunen, Dec 24 2018

Examples

			For n = 12; b(12) = 14/3, a(n) = 2 because b(2) = 3/2; 14/3 * 3/2 = 7 (integer).
		

Crossrefs

Cf. A000005/A000203 or A057020/A057021: arithmetic mean.

Programs

  • PARI
    A176801(n) = { my(am=(sigma(n)/numdiv(n))); for(i=1, oo, if(1==denominator(am*(sigma(i)/numdiv(i))), return(i))); }; \\ Antti Karttunen, Dec 24 2018

Extensions

More terms from Antti Karttunen, Dec 24 2018

A322668 Numbers k such that (k, k+2) are not twin primes yet sigma(k+2)/d(k+2) - sigma(k)/d(k) = 1.

Original entry on oeis.org

1, 350, 6497, 12317, 133787, 181427, 404471, 439097, 485237, 501182, 549378, 1410119, 2696807, 6220607, 6827369, 6954767, 9770027, 10302419, 10449347, 10887977, 11014007, 16745387, 18959111, 25883519, 27334469, 39508037, 40311149, 40551617, 42561437, 44592209
Offset: 1

Views

Author

Amiram Eldar, Jan 11 2019

Keywords

Comments

A variation of A050507 with average of the divisors instead of their sum.

Crossrefs

Cf. A000005 (number of divisors), A000203 (sum of divisors).

Programs

  • Mathematica
    f[n_] := DivisorSigma[1, n]/DivisorSigma[0, n]; aQ[n_] := f[n + 2] - f[n] ==  1 && !(PrimeQ[n] && PrimeQ[n + 2]); Select[Range[1000000], aQ]
  • PARI
    isok(k) = !(isprime(k) && isprime(k+2)) && (sigma(k+2)/numdiv(k+2) - sigma(k)/numdiv(k) == 1); \\ Michel Marcus, Jan 22 2019

A348713 Numbers whose divisors can be partitioned into two disjoint sets with equal arithmetic mean.

Original entry on oeis.org

6, 20, 24, 30, 42, 48, 54, 56, 60, 66, 70, 72, 78, 84, 88, 90, 96, 102, 108, 114, 120, 126, 132, 135, 138, 140, 150, 156, 160, 168, 174, 180, 186, 190, 192, 196, 198, 200, 204, 210, 216, 220, 222, 224, 228, 230, 234, 240, 246, 252, 258, 260, 264, 270, 273, 276
Offset: 1

Views

Author

Amiram Eldar, Oct 31 2021

Keywords

Comments

The arithmetic mean of each of the two subsets is equal to the arithmetic mean of all the divisors of the number.
Also, numbers whose divisors can be partitioned into two disjoint sets with equal harmonic mean. This definition is equivalent since the harmonic mean of a subset {d_i} of the divisors of k is equal to k/, where is the arithmetic mean over the complementary divisors k/d_i.

Examples

			6 is a term since its set of divisors, {1, 2, 3, 6}, can be partitioned into the two disjoint sets, {3} and {1, 2, 6}, whose arithmetic means are both 3.
		

Crossrefs

A347063 is a subsequence.

Programs

  • Mathematica
    q[n_] := Module[{d = Divisors[n], nd, m, s, subs, ans = False}, nd = Length[d]; m = Plus @@ d/nd; subs = Subsets[d]; Do[s = subs[[k]]; If[0 < Length[s] < nd && Mean[s] == m, ans = True; Break[]], {k, 1, Length[subs]}]; ans]; Select[Range[300], q]

A348718 Numbers whose divisors can be partitioned into two disjoint sets without singletons whose arithmetic means are both integers.

Original entry on oeis.org

6, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96
Offset: 1

Views

Author

Amiram Eldar, Oct 31 2021

Keywords

Comments

First differs from A343311 at n = 29.
Differs from A080257 which contains for example 8 and 128. - R. J. Mathar, Nov 03 2021

Examples

			6 is a term since its set of divisors, {1, 2, 3, 6}, can be partitioned into the two disjoint sets {1, 3} and {2, 6} whose arithmetic means, 2 and 4 respectively, are both integers.
		

Crossrefs

Programs

  • Mathematica
    amQ[d_] := IntegerQ @ Mean[d]; q[n_] := Module[{d = Divisors[n], nd, s, subs, ans = False}, nd = Length[d]; subs = Subsets[d]; Do[s = subs[[k]]; If[Length[s] > 1 && Length[s] <= nd/2 && amQ[s] && amQ[Complement[d, s]], ans = True; Break[]], {k, 1, Length[subs]}]; ans]; Select[Range[100], q]
Showing 1-10 of 14 results. Next