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 11-20 of 33 results. Next

A365825 Number of integer partitions of n that are not of length 2 and do not contain n/2.

Original entry on oeis.org

1, 1, 1, 2, 2, 5, 6, 12, 14, 26, 31, 51, 61, 95, 114, 169, 202, 289, 347, 481, 576, 782, 936, 1244, 1487, 1946, 2323, 2997, 3570, 4551, 5414, 6827, 8103, 10127, 11997, 14866, 17575, 21619, 25507, 31166, 36692, 44563, 52362, 63240, 74152, 89112, 104281, 124731
Offset: 0

Views

Author

Gus Wiseman, Sep 19 2023

Keywords

Comments

Also the number of integer partitions of n with no two possibly equal parts summing to n.

Examples

			The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)  (3)    (4)     (5)      (6)       (7)        (8)
            (111)  (1111)  (221)    (222)     (322)      (332)
                           (311)    (411)     (331)      (521)
                           (2111)   (2211)    (421)      (611)
                           (11111)  (21111)   (511)      (2222)
                                    (111111)  (2221)     (3221)
                                              (3211)     (3311)
                                              (4111)     (5111)
                                              (22111)    (22211)
                                              (31111)    (32111)
                                              (211111)   (221111)
                                              (1111111)  (311111)
                                                         (2111111)
                                                         (11111111)
		

Crossrefs

First condition alone is A058984, complement A004526, ranks A100959.
Second condition alone is A086543, complement A035363, ranks !A344415.
The complement is counted by A238628.
The strict case is A365826, complement A365659.
A000041 counts integer partitions, strict A000009.
A046663 counts partitions with no submultiset summing to k, strict A365663.
A140106 counts strict partitions of length 2, complement A365827.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[#]!=2&&FreeQ[#,n/2]&]],{n,0,15}]
  • Python
    from sympy import npartitions
    def A365825(n): return npartitions(n)-(m:=n>>1)-(0 if n&1 else npartitions(m)-1) # Chai Wah Wu, Sep 23 2023

Formula

Heinz numbers are A100959 /\ !A344415.
a(n) = A000041(n)-(n-1)/2 if n is odd. a(n) = A000041(n)-n/2-A000041(n/2)+1 if n is even. - Chai Wah Wu, Sep 23 2023

Extensions

a(31)-a(47) from Chai Wah Wu, Sep 23 2023

A365827 Number of strict integer partitions of n whose length is not 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 3, 4, 6, 7, 10, 12, 16, 20, 25, 30, 38, 45, 55, 66, 79, 93, 111, 130, 153, 179, 209, 242, 282, 325, 375, 432, 496, 568, 651, 742, 846, 963, 1094, 1240, 1406, 1589, 1795, 2026, 2282, 2567, 2887, 3240, 3634, 4072, 4557, 5094, 5692, 6351
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2023

Keywords

Comments

Also the number of strict integer partitions of n with no pair of distinct parts summing to n.

Examples

			The a(5) = 1 through a(13) = 12 strict partitions (A..D = 10..13):
  (5)  (6)    (7)    (8)    (9)    (A)     (B)     (C)     (D)
       (321)  (421)  (431)  (432)  (532)   (542)   (543)   (643)
                     (521)  (531)  (541)   (632)   (642)   (652)
                            (621)  (631)   (641)   (651)   (742)
                                   (721)   (731)   (732)   (751)
                                   (4321)  (821)   (741)   (832)
                                           (5321)  (831)   (841)
                                                   (921)   (931)
                                                   (5421)  (A21)
                                                   (6321)  (5431)
                                                           (6421)
                                                           (7321)
		

Crossrefs

The complement is counted by A140106 shifted left.
Heinz numbers are A005117 \ A006881 = A005117 /\ A100959.
The non-strict version is A058984, complement A004526.
The case not containing n/2 is A365826, non-strict A365825.
A000041 counts integer partitions, strict A000009.
A046663 counts partitions with no submultiset summing to k, strict A365663.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Length[#]!=2&]],{n,0,30}]

Formula

a(n) = A000009(n) - A004526(n-1) for n > 0.

A366319 Numbers k such that the sum of prime indices of k is not twice the maximum prime index of k, meaning A056239(k) != 2 * A061395(k).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Gus Wiseman, Oct 10 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.
Also Heinz numbers of integer partitions containing n/2, where n is the sum of all parts.

Examples

			The prime indices of 90 are {1,2,2,3}, with sum 8 and twice maximum 6, so 90 is in the sequence.
		

Crossrefs

Partitions of this type are counted by A086543.
For length instead of maximum we have the complement of A340387.
The complement is A344415, counted by A035363.
A001221 counts distinct prime factors, A001222 with multiplicity.
A056239 adds up prime indices, row sums of A112798.
A334201 adds up all prime indices except the greatest.
A344291 lists numbers m with A001222(m) <= A056239(m)/2, counted by A110618.
A344296 lists numbers m with A001222(m) >= A056239(m)/2, counted by A025065.

Programs

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

A100962 Numbers that can neither be written as the sum nor as the product of two primes.

Original entry on oeis.org

1, 2, 3, 11, 17, 23, 27, 29, 37, 41, 47, 53, 59, 67, 71, 79, 83, 89, 97, 101, 107, 113, 117, 125, 127, 131, 135, 137, 147, 149, 157, 163, 167, 171, 173, 179, 189, 191, 197, 207, 211, 223, 227, 233, 239, 245, 251, 255, 257, 261, 263, 269, 275, 277, 281, 293, 297
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 24 2004

Keywords

Comments

Intersection of A014092 and A100959.

Crossrefs

Programs

  • Haskell
    a100962 n = a100962_list !! (n-1)
    a100962_list = filter ((== 0) . a064911) a014092_list
    -- Reinhard Zumkeller, Oct 15 2014

A246716 Positive numbers that are not the product of (exactly) two distinct primes.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 30, 31, 32, 36, 37, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 60, 61, 63, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 78, 79, 80, 81, 83, 84, 88, 89, 90, 92, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Giuseppe Coppoletta, Nov 01 2014

Keywords

Comments

Non-disjoint union of A100959 and A000961. Disjoint union of A100959 and A001248.
Complement of A006881, then inheriting the "opposite" of the properties of A006881.
a(n+1) - a(n) <= 4 (gap upper bound) - (that is because among four consecutive integers there is always a multiple of 4, then there is a number which is not the product of two distinct primes). E.g., a(26)-a(25) = a(62)-a(61) = 4. Is it true that for any k <= 4 there are infinitely many numbers n such that a(n+1) - a(n) = k?
If r = A006881(n+1) - A006881(n) - 1 > 1, it indicates that there are r terms of (a(j)) starting with j = A006881(n) - n + 1 which are consecutive integers. E.g., A006881(8) - A006881(7) - 1 = 6, so there are 6 consecutive terms in (a(j)), starting with j = A006881(7) - 7 + 1 = 20.

Examples

			7 is a term because 7 is prime, so it has only one prime divisor.
8 and 9 are terms because neither of them has two distinct prime divisors.
30 is a term because it is the product of three primes.
But 35 is not a term because it is the product of two distinct primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..100] | #PrimeDivisors(n) ne 2 or &*[t[2]: t in Factorization(n)] ne 1]; // Bruno Berselli, Nov 12 2014
    
  • Maple
    filter:= n -> map(t -> t[2],ifactors(n)[2]) <> [1,1]:
    select(filter, [$1..1000]); # Robert Israel, Nov 02 2014
  • Mathematica
    Select[Range[125], Not[PrimeOmega[#] == PrimeNu[#] == 2] &] (* Alonso del Arte, Nov 03 2014 *)
  • PARI
    isok(n) = (omega(n)!=2) || (bigomega(n) != 2); \\ Michel Marcus, Nov 01 2014
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A246716(n):
        def f(x): return int(n-(t:=primepi(s:=isqrt(x)))-(t*(t-1)>>1)+sum(primepi(x//k) for k in primerange(1, s+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f) # Chai Wah Wu, Aug 30 2024
  • Sage
    def A246716_list(n) :
        R = []
        for i in (1..n) :
            d = prime_divisors(i)
            if len(d) != 2 or d[0]*d[1] != i : R.append(i)
        return R
    A246716_list(100)
    
  • Sage
    [n for n in (1..100) if sloane.A001221(n)!=2 or sloane.A001222(n)!=2] # Giuseppe Coppoletta, Jan 19 2015
    

A365826 Number of strict integer partitions of n that are not of length 2 and do not contain n/2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 7, 7, 12, 12, 20, 20, 30, 31, 45, 46, 66, 68, 93, 97, 130, 136, 179, 188, 242, 256, 325, 344, 432, 459, 568, 606, 742, 793, 963, 1031, 1240, 1331, 1589, 1707, 2026, 2179, 2567, 2766, 3240, 3493, 4072, 4393, 5094, 5501, 6351
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2023

Keywords

Comments

Also the number of strict integer partitions of n without two parts (allowing parts to be re-used) summing to n.

Examples

			The a(6) = 1 through a(12) = 7 strict partitions:
  (6)  (7)      (8)      (9)      (10)       (11)       (12)
       (4,2,1)  (5,2,1)  (4,3,2)  (6,3,1)    (5,4,2)    (5,4,3)
                         (5,3,1)  (7,2,1)    (6,3,2)    (7,3,2)
                         (6,2,1)  (4,3,2,1)  (6,4,1)    (7,4,1)
                                             (7,3,1)    (8,3,1)
                                             (8,2,1)    (9,2,1)
                                             (5,3,2,1)  (5,4,2,1)
		

Crossrefs

The second condition alone has bisections A078408 and A365828.
The complement is counted by A365659.
The non-strict version is A365825, complement A238628.
The first condition alone is A365827, complement A140106.
A000041 counts integer partitions, strict A000009.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&FreeQ[Total/@Tuples[#,2],n]&]], {n,0,30}]

A366318 Heinz numbers of integer partitions that are of length 2 or begin with n/2, where n is the sum of all parts.

Original entry on oeis.org

4, 6, 9, 10, 12, 14, 15, 21, 22, 25, 26, 30, 33, 34, 35, 38, 39, 40, 46, 49, 51, 55, 57, 58, 62, 63, 65, 69, 70, 74, 77, 82, 84, 85, 86, 87, 91, 93, 94, 95, 106, 111, 112, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 154, 155, 158, 159
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2023

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
     4: {1,1}      38: {1,8}         77: {4,5}
     6: {1,2}      39: {2,6}         82: {1,13}
     9: {2,2}      40: {1,1,1,3}     84: {1,1,2,4}
    10: {1,3}      46: {1,9}         85: {3,7}
    12: {1,1,2}    49: {4,4}         86: {1,14}
    14: {1,4}      51: {2,7}         87: {2,10}
    15: {2,3}      55: {3,5}         91: {4,6}
    21: {2,4}      57: {2,8}         93: {2,11}
    22: {1,5}      58: {1,10}        94: {1,15}
    25: {3,3}      62: {1,11}        95: {3,8}
    26: {1,6}      63: {2,2,4}      106: {1,16}
    30: {1,2,3}    65: {3,6}        111: {2,12}
    33: {2,5}      69: {2,9}        112: {1,1,1,1,4}
    34: {1,7}      70: {1,3,4}      115: {3,9}
    35: {3,4}      74: {1,12}       118: {1,17}
		

Crossrefs

The first condition alone is A001358, counted by A004526.
The complement of the first condition is A100959, counted by A058984.
The partitions with these Heinz numbers are counted by A238628.
The second condition alone is A344415, counted by A035363.
The complement of the second condition is A366319, counted by A086543.
A001222 counts prime factors with multiplicity.
A056239 adds up prime indices, row sums of A112798.
A322109 ranks partitions of n with no part > n/2, counted by A110618.
A334201 adds up all prime indices except the greatest.
A344296 solves for k in A001222(k) >= A056239(k)/2, counted by A025065.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Length[prix[#]]==2||MemberQ[prix[#],Total[prix[#]]/2]&]

Formula

Union of A001358 and A344415.

A367098 Number of divisors of n with exactly two distinct prime factors.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Examples

			The a(n) divisors for n = 1, 6, 12, 24, 36, 60, 72, 120, 144, 216, 288, 360:
  .  6  6   6   6   6   6   6   6    6    6    6
        12  12  12  10  12  10  12   12   12   10
            24  18  12  18  12  18   18   18   12
                36  15  24  15  24   24   24   15
                    20  36  20  36   36   36   18
                        72  24  48   54   48   20
                            40  72   72   72   24
                                144  108  96   36
                                     216  144  40
                                          288  45
                                               72
		

Crossrefs

For just one distinct prime factor we have A001222 (prime-power divisors).
This sequence counts divisors belonging to A007774.
Counting all prime factors gives A086971, firsts A220264.
Column k = 2 of A146289.
- Positions of zeros are A000961 (powers of primes), complement A024619.
- Positions of ones are A006881 (squarefree semiprimes).
- Positions of twos are A054753.
- Positions of first appearances are A367099.
A001221 counts distinct prime factors.
A001358 lists semiprimes, complement A100959.
A367096 lists semiprime divisors, sum A076290.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n], PrimeNu[#]==2&]],{n,100}]
    a[1] = 0; a[n_] := (Total[(e = FactorInteger[n][[;; , 2]])]^2 - Total[e^2])/2; Array[a, 100] (* Amiram Eldar, Jan 08 2024 *)
  • PARI
    a(n) = {my(e = factor(n)[, 2]); (vecsum(e)^2 - e~*e)/2;} \\ Amiram Eldar, Jan 08 2024

Formula

a(n) = (A001222(n)^2 - A090885(n))/2. - Amiram Eldar, Jan 08 2024

A176363 Non-semiprime numbers of order 2.

Original entry on oeis.org

1, 2, 3, 7, 11, 12, 17, 18, 19, 24, 27, 28, 29, 30, 36, 37, 42, 43, 44, 45, 47, 48, 54, 56, 61, 63, 64, 66, 67, 68, 71, 72, 75, 78, 79, 80, 83, 89, 90, 92, 97, 98, 100, 101, 102, 104, 105, 107, 108, 110, 112, 114, 116, 117, 120, 125, 126, 131, 132, 135, 137, 144, 147, 148
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 16 2010

Keywords

Comments

Non-semiprimes with non-semiprime subscripts (or indices).

Programs

  • Maple
    A100959 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if numtheory[bigomega](a) <> 2 then return a; end if; end do end if; end proc: A176363 := proc(n) A100959(A100959(n)) ; end proc: seq(A176363(n),n=1..80) ; # R. J. Mathar, Apr 25 2010

Formula

a(n) = A100959(A100959(n)).

Extensions

Corrected (66 inserted) R. J. Mathar, Apr 25 2010

A367099 Least positive integer such that the number of divisors having two distinct prime factors is n.

Original entry on oeis.org

1, 6, 12, 24, 36, 60, 72, 120, 144, 216, 288, 360, 432, 960, 720, 864, 1296, 1440, 1728, 2160, 2592, 3456, 7560, 4320, 5184, 7776, 10800, 8640, 10368, 12960, 15552, 17280, 20736, 40320, 25920, 31104, 41472, 60480, 64800, 51840, 62208, 77760, 93312
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Comments

Does this contain every power of six, namely 1, 6, 36, 216, 1296, 7776, ...?
Yes, every power of six is a term, since 6^k = 2^k * 3^k is the least positive integer having n = tau(6^k) - (2k+1) divisors with two distinct prime factors. - Ivan N. Ianakiev, Nov 11 2023

Examples

			The divisors of 60 having two distinct prime factors are: 6, 10, 12, 15, 20. Since 60 is the first number having five such divisors, we have a(5) = 60.
The terms together with their prime indices begin:
     1: {}
     6: {1,2}
    12: {1,1,2}
    24: {1,1,1,2}
    36: {1,1,2,2}
    60: {1,1,2,3}
    72: {1,1,1,2,2}
   120: {1,1,1,2,3}
   144: {1,1,1,1,2,2}
   216: {1,1,1,2,2,2}
   288: {1,1,1,1,1,2,2}
   360: {1,1,1,2,2,3}
   432: {1,1,1,1,2,2,2}
   960: {1,1,1,1,1,1,2,3}
   720: {1,1,1,1,2,2,3}
   864: {1,1,1,1,1,2,2,2}
		

Crossrefs

The version for all divisors is A005179 (firsts of A000005).
For all prime factors (A001222) we have A220264, firsts of A086971.
Positions of first appearances in A367098 (counts divisors in A007774).
A000961 lists prime powers, complement A024619.
A001221 counts distinct prime factors.
A001358 lists semiprimes, squarefree A006881, complement A100959.
A367096 lists semiprime divisors, sum A076290.

Programs

  • Mathematica
    nn=1000;
    w=Table[Length[Select[Divisors[n],PrimeNu[#]==2&]],{n,nn}];
    spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&];
    Table[Position[w,k][[1,1]],{k,0,spnm[w]}]
  • PARI
    a(n) = my(k=1); while (sumdiv(k, d, omega(d)==2) != n, k++); k; \\ Michel Marcus, Nov 11 2023
Previous Showing 11-20 of 33 results. Next