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 40 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

A361849 Number of integer partitions of n such that the maximum is twice the median.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 4, 3, 4, 7, 9, 9, 15, 16, 20, 26, 34, 37, 50, 55, 68, 86, 103, 117, 145, 168, 201, 236, 282, 324, 391, 449, 525, 612, 712, 818, 962, 1106, 1278, 1470, 1698, 1939, 2238, 2550, 2924, 3343, 3824, 4341, 4963, 5627, 6399, 7256, 8231, 9300
Offset: 1

Views

Author

Gus Wiseman, Apr 02 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The a(4) = 1 through a(11) = 9 partitions:
  211  2111  21111  421     422      4221      631        632
                    3211    221111   4311      4222       5321
                    22111   2111111  2211111   42211      5411
                    211111           21111111  322111     42221
                                               2221111    43211
                                               22111111   332111
                                               211111111  22211111
                                                          221111111
                                                          2111111111
For example, the partition (3,2,1,1) has maximum 3 and median 3/2, so is counted under a(7).
		

Crossrefs

For minimum instead of median we have A118096.
For length instead of median we have A237753.
This is the equal case of A361848.
For mean instead of median we have A361853.
These partitions have ranks A361856.
For "greater" instead of "equal" we have A361857, allowing equality A361859.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, A058398 by mean.
A325347 counts partitions with integer median, complement A307683.
A359893 and A359901 count partitions by median, odd-length A359902.
A360005 gives twice median of prime indices, distinct A360457.
A361860 counts partitions with minimum equal to median.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Max@@#==2*Median[#]&]],{n,30}]

A360555 Two times the median of the first differences of the 0-prepended prime indices of n > 1.

Original entry on oeis.org

2, 4, 1, 6, 2, 8, 0, 2, 3, 10, 2, 12, 4, 3, 0, 14, 2, 16, 2, 4, 5, 18, 1, 3, 6, 0, 2, 20, 2, 22, 0, 5, 7, 4, 1, 24, 8, 6, 1, 26, 2, 28, 2, 2, 9, 30, 0, 4, 2, 7, 2, 32, 1, 5, 1, 8, 10, 34, 2, 36, 11, 4, 0, 6, 2, 38, 2, 9, 2, 40, 0, 42, 12, 2, 2, 5, 2, 44, 0, 0
Offset: 2

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The 0-prepended prime indices of 1617 are {0,2,4,4,5}, with sorted differences {0,1,2,2}, with median 3/2, so a(1617) = 3.
		

Crossrefs

The version for divisors is A063655.
Differences of 0-prepended prime indices are listed by A287352.
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for distinct prime factors is A360458.
The version for prime factors is A360459.
The version for prime multiplicities is A360460.
Positions of even terms are A360556
Positions of odd terms are A360557
Positions of 0's are A360558, counted by A360254.
For mean instead of two times median we have A360614/A360615.
A112798 lists prime indices, length A001222, sum A056239.
A325347 counts partitions with integer median, complement A307683.
A326567/A326568 gives mean of prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[2*Median[Differences[Prepend[prix[n],0]]],{n,2,100}]

A360556 Numbers > 1 whose first differences of 0-prepended prime indices have integer median.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 26, 27, 28, 29, 30, 31, 32, 35, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 52, 53, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 83, 84, 86, 87, 89
Offset: 1

Views

Author

Gus Wiseman, Feb 16 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The 0-prepended prime indices of 1617 are {0,2,4,4,5}, with sorted differences {0,1,2,2}, with median 3/2, so 1617 is not in the sequence.
		

Crossrefs

For mean instead of median we have A340610.
Positions of even terms in A360555.
The complement is A360557 (without 1).
These partitions are counted by A360688.
- For divisors (A063655) we have A139711, complement A139710.
- For prime indices (A360005) we have A359908, complement A359912.
- For distinct prime indices (A360457) we have A360550, complement A360551.
- For distinct prime factors (A360458) we have A360552, complement A100367.
- For prime factors (A360459) we have A359913, complement A072978.
- For prime multiplicities (A360460) we have A360553, complement A360554.
- For 0-prepended differences (A360555) we have A360556, complement A360557.
A112798 lists prime indices, length A001222, sum A056239.
A325347 = partitions w/ integer median, complement A307683, strict A359907.
A359893 and A359901 count partitions by median, odd-length A359902.
A360614/A360615 = mean of first differences of 0-prepended prime indices.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[2,100],IntegerQ[Median[Differences[Prepend[prix[#],0]]]]&]

A361856 Positive integers whose prime indices satisfy (maximum) = 2*(median).

Original entry on oeis.org

12, 24, 42, 48, 60, 63, 72, 96, 126, 130, 140, 144, 189, 192, 195, 252, 266, 288, 308, 325, 330, 360, 378, 384, 399, 420, 432, 495, 546, 567, 572, 576, 588, 600, 630, 638, 650, 665, 756, 768, 819, 864, 882, 884, 931, 945, 957, 962, 975, 1122, 1134, 1152, 1190
Offset: 1

Views

Author

Gus Wiseman, Apr 02 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
These are Heinz numbers of partitions satisfying (maximum) = 2*(median).

Examples

			The terms together with their prime indices begin:
    12: {1,1,2}
    24: {1,1,1,2}
    42: {1,2,4}
    48: {1,1,1,1,2}
    60: {1,1,2,3}
    63: {2,2,4}
    72: {1,1,1,2,2}
    96: {1,1,1,1,1,2}
   126: {1,2,2,4}
   130: {1,3,6}
   140: {1,1,3,4}
   144: {1,1,1,1,2,2}
The prime indices of 126 are {1,2,2,4}, with maximum 4 and median 2, so 126 is in the sequence.
The prime indices of 308 are {1,1,4,5}, with maximum 5 and median 5/2, so 308 is in the sequence.
		

Crossrefs

The LHS (greatest prime index) is A061395.
The RHS (twice median) is A360005, distinct A360457.
These partitions are counted by A361849.
For mean instead of median we have A361855, counted by A361853.
For minimum instead of median we have A361908, counted by A118096.
For length instead of median we have A361909, counted by A237753.
A000975 counts subsets with integer median.
A001222 (bigomega) counts prime factors, distinct A001221 (omega).
A112798 lists prime indices, sum A056239.
A325347 counts partitions with integer median, complement A307683.
A359893 and A359901 count partitions by median.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{}, Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Max@@prix[#]==2*Median[prix[#]]&]

Formula

A061395(a(n)) = 2*A360005(a(n)).

A360550 Numbers > 1 whose distinct prime indices have integer median.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 16, 17, 19, 20, 21, 22, 23, 25, 27, 29, 30, 31, 32, 34, 37, 39, 40, 41, 42, 43, 44, 46, 47, 49, 50, 53, 55, 57, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 73, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 94, 97, 100
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. Distinct prime indices are listed by A304038.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime indices of 900 are {1,1,2,2,3,3}, with distinct parts {1,2,3}, with median 2, so 900 is in the sequence.
The prime indices of 330 are {1,2,3,5},  with distinct parts {1,2,3,5}, with median 5/2, so 330 is not in the sequence.
		

Crossrefs

For mean instead of median we have A326621.
Positions of even terms in A360457.
The complement (without 1) is A360551.
Partitions with these Heinz numbers are counted by A360686.
- For divisors (A063655) we have A139711, complement A139710.
- For prime indices (A360005) we have A359908, complement A359912.
- For distinct prime indices (A360457) we have A360550, complement A360551.
- For distinct prime factors (A360458) we have A360552, complement A100367.
- For prime factors (A360459) we have A359913, complement A072978.
- For prime multiplicities (A360460) we have A360553, complement A360554.
- For 0-prepended differences (A360555) we have A360556, complement A360557.
A112798 lists prime indices, length A001222, sum A056239.
A304038 lists distinct prime indices, length A001221, sum A066328.
A325347 = partitions w/ integer median, complement A307683, strict A359907.
A326619/A326620 gives mean of distinct prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Select[Range[2,100],IntegerQ[Median[PrimePi/@First/@FactorInteger[#]]]&]

A361848 Number of integer partitions of n such that (maximum) <= 2*(median).

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 12, 15, 19, 26, 31, 40, 49, 61, 75, 93, 112, 137, 165, 199, 238, 289, 341, 408, 482, 571, 674, 796, 932, 1096, 1280, 1495, 1738, 2026, 2347, 2724, 3148, 3639, 4191, 4831, 5545, 6372, 7298, 8358, 9552, 10915, 12439, 14176, 16121, 18325
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The a(1) = 1 through a(7) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (31)    (41)     (42)      (52)
                    (211)   (221)    (51)      (61)
                    (1111)  (2111)   (222)     (322)
                            (11111)  (321)     (331)
                                     (2211)    (421)
                                     (21111)   (2221)
                                     (111111)  (3211)
                                               (22111)
                                               (211111)
                                               (1111111)
For example, the partition y = (3,2,2) has maximum 3 and median 2, and 3 <= 2*2, so y is counted under a(7).
		

Crossrefs

For length instead of median we have A237755.
For minimum instead of median we have A237824.
The equal case is A361849, ranks A361856.
For mean instead of median we have A361851.
The complement is counted by A361857, ranks A361867.
The unequal case is A361858.
Reversing the inequality gives A361859, ranks A361868.
A000041 counts integer partitions, strict A000009.
A000975 counts subsets with integer median.
A325347 counts partitions with integer median, complement A307683.
A359893 and A359901 count partitions by median.
A360005 gives twice median of prime indices, distinct A360457.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Max@@#<=2*Median[#]&]],{n,30}]

Formula

a(n) = A361849(n) + A361858(n).
a(n) = A000041(n) - A361857(n).

A360679 Sum of the right half (inclusive) of the prime indices of n.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 2, 2, 3, 5, 3, 6, 4, 3, 2, 7, 4, 8, 4, 4, 5, 9, 3, 3, 6, 4, 5, 10, 5, 11, 3, 5, 7, 4, 4, 12, 8, 6, 4, 13, 6, 14, 6, 5, 9, 15, 4, 4, 6, 7, 7, 16, 4, 5, 5, 8, 10, 17, 5, 18, 11, 6, 3, 6, 7, 19, 8, 9, 7, 20, 5, 21, 12, 6, 9, 5, 8, 22, 5, 4
Offset: 1

Views

Author

Gus Wiseman, Mar 05 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 810 are {1,2,2,2,2,3}, with right half (inclusive) {2,2,3}, so a(810) = 7.
The prime indices of 3675 are {2,3,3,4,4}, with right half (inclusive) {3,4,4}, so a(3675) = 11.
		

Crossrefs

Positions of first appearances are 1 and A001248.
The value k appears A360671(k) times, exclusive A360673.
These partitions are counted by A360672 with rows reversed.
The exclusive version is A360677.
The left version is A360678.
A112798 lists prime indices, length A001222, sum A056239, median* A360005.
A360616 gives half of bigomega (exclusive), inclusive A360617.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[Take[prix[n],-Ceiling[Length[prix[n]]/2]]],{n,100}]

Formula

A360676(n) + A360679(n) = A001222(n).
A360677(n) + A360678(n) = A001222(n).

A360460 Two times the median of the unordered prime signature of n; a(1) = 1.

Original entry on oeis.org

1, 2, 2, 4, 2, 2, 2, 6, 4, 2, 2, 3, 2, 2, 2, 8, 2, 3, 2, 3, 2, 2, 2, 4, 4, 2, 6, 3, 2, 2, 2, 10, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 3, 3, 2, 2, 5, 4, 3, 2, 3, 2, 4, 2, 4, 2, 2, 2, 2, 2, 2, 3, 12, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 3, 3, 2, 2, 2, 5, 8, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.
A number's unordered prime signature (row n of A118914) is the multiset of positive exponents in its prime factorization.

Examples

			The unordered prime signature of 2520 is {1,1,2,3}, with median 3/2, so a(2520) = 3.
		

Crossrefs

The version for divisors is A063655.
For mean instead of two times median we have A088529/A088530.
Prime signature is A124010, unordered A118914.
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for distinct prime factors is A360458.
The version for prime factors is A360459.
Positions of even terms are A360553.
Positions of odd terms are A360554.
The version for 0-prepended differences is A360555.
A112798 lists prime indices, length A001222, sum A056239.
A304038 lists distinct prime indices.
A325347 counts partitions w/ integer median, complement A307683.
A329976 counts partitions with median multiplicity 1.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[If[n==1,1,2*Median[Last/@FactorInteger[n]]],{n,100}]

A360676 Sum of the left half (exclusive) of the prime indices of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1, 0, 2, 3, 1, 2, 1, 0, 1, 0, 2, 2, 1, 3, 2, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1, 0, 2, 4, 1, 2, 1, 0, 3, 3, 2, 2, 1, 0, 2, 0, 1, 2, 3, 3, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 4, 1, 0, 2, 4, 1, 0, 2, 3, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 810 are {1,2,2,2,2,3}, with left half (exclusive) {1,2,2}, so a(810) = 5.
The prime indices of 3675 are {2,3,3,4,4}, with left half (exclusive) {2,3}, so a(3675) = 5.
		

Crossrefs

Positions of 0's are 1 and A000040.
Positions of first appearances are 1 and A001248.
These partitions are counted by A360675, right A360672.
A112798 lists prime indices, length A001222, sum A056239, median* A360005.
A360616 gives half of bigomega (exclusive), inclusive A360617.
A360673 counts multisets by right sum (exclusive), inclusive A360671.
First for prime indices, second for partitions, third for prime factors:
- A360676 gives left sum (exclusive), counted by A360672, product A361200.
- A360677 gives right sum (exclusive), counted by A360675, product A361201.
- A360678 gives left sum (inclusive), counted by A360675, product A347043.
- A360679 gives right sum (inclusive), counted by A360672, product A347044.

Programs

  • Maple
    f:= proc(n) local F,i,t;
      F:= [seq(numtheory:-pi(t[1])$t[2], t = sort(ifactors(n)[2],(a,b) -> a[1] < b[1]))];
      add(F[i],i=1..floor(nops(F)/2))
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 02 2025
  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[Take[prix[n],Floor[Length[prix[n]]/2]]],{n,100}]

Formula

A360676(n) + A360679(n) = A001222(n).
A360677(n) + A360678(n) = A001222(n).
Showing 1-10 of 40 results. Next