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-6 of 6 results.

A338907 Semiprimes whose prime indices sum to an odd number.

Original entry on oeis.org

6, 14, 15, 26, 33, 35, 38, 51, 58, 65, 69, 74, 77, 86, 93, 95, 106, 119, 122, 123, 141, 142, 143, 145, 158, 161, 177, 178, 185, 201, 202, 209, 214, 215, 217, 219, 221, 226, 249, 262, 265, 278, 287, 291, 299, 302, 305, 309, 319, 323, 326, 327, 329, 346, 355
Offset: 1

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

All terms are squarefree (A005117).
A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.
The semiprimes in A300063; the semiprimes in A332820. - Peter Munn, Dec 25 2020

Examples

			The sequence of terms together with their prime indices begins:
      6: {1,2}      95: {3,8}     202: {1,26}
     14: {1,4}     106: {1,16}    209: {5,8}
     15: {2,3}     119: {4,7}     214: {1,28}
     26: {1,6}     122: {1,18}    215: {3,14}
     33: {2,5}     123: {2,13}    217: {4,11}
     35: {3,4}     141: {2,15}    219: {2,21}
     38: {1,8}     142: {1,20}    221: {6,7}
     51: {2,7}     143: {5,6}     226: {1,30}
     58: {1,10}    145: {3,10}    249: {2,23}
     65: {3,6}     158: {1,22}    262: {1,32}
     69: {2,9}     161: {4,9}     265: {3,16}
     74: {1,12}    177: {2,17}    278: {1,34}
     77: {4,5}     178: {1,24}    287: {4,13}
     86: {1,14}    185: {3,12}    291: {2,25}
     93: {2,11}    201: {2,19}    299: {6,9}
		

Crossrefs

A031368 looks at primes instead of semiprimes.
A098350 has this as union of odd-indexed antidiagonals.
A300063 looks at all numbers (not just semiprimes).
A338904 has this as union of odd-indexed rows.
A338906 is the even version.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A056239 gives the sum of prime indices (Heinz weight).
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A289182/A115392 list the positions of odd/even terms in A001358.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900.
A338908 lists squarefree semiprimes of even weight.
A339114/A339115 give the least/greatest semiprime of weight n.
Subsequence of A332820.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],PrimeOmega[#]==2&&OddQ[Total[primeMS[#]]]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A338907(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((primepi(x//p)-a>>1) for a,p in enumerate(primerange(isqrt(x)+1)))
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

Complement of A338906 in A001358.

A338906 Semiprimes whose prime indices sum to an even number.

Original entry on oeis.org

4, 9, 10, 21, 22, 25, 34, 39, 46, 49, 55, 57, 62, 82, 85, 87, 91, 94, 111, 115, 118, 121, 129, 133, 134, 146, 155, 159, 166, 169, 183, 187, 194, 203, 205, 206, 213, 218, 235, 237, 247, 253, 254, 259, 267, 274, 289, 295, 298, 301, 303, 314, 321, 334, 335, 339
Offset: 1

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of terms together with their prime indices begins:
      4: {1,1}      87: {2,10}    183: {2,18}    274: {1,33}
      9: {2,2}      91: {4,6}     187: {5,7}     289: {7,7}
     10: {1,3}      94: {1,15}    194: {1,25}    295: {3,17}
     21: {2,4}     111: {2,12}    203: {4,10}    298: {1,35}
     22: {1,5}     115: {3,9}     205: {3,13}    301: {4,14}
     25: {3,3}     118: {1,17}    206: {1,27}    303: {2,26}
     34: {1,7}     121: {5,5}     213: {2,20}    314: {1,37}
     39: {2,6}     129: {2,14}    218: {1,29}    321: {2,28}
     46: {1,9}     133: {4,8}     235: {3,15}    334: {1,39}
     49: {4,4}     134: {1,19}    237: {2,22}    335: {3,19}
     55: {3,5}     146: {1,21}    247: {6,8}     339: {2,30}
     57: {2,8}     155: {3,11}    253: {5,9}     341: {5,11}
     62: {1,11}    159: {2,16}    254: {1,31}    358: {1,41}
     82: {1,13}    166: {1,23}    259: {4,12}    361: {8,8}
     85: {3,7}     169: {6,6}     267: {2,24}    365: {3,21}
		

Crossrefs

A031215 looks at primes instead of semiprimes.
A098350 has this as union of even-indexed antidiagonals.
A300061 looks at all numbers (not just semiprimes).
A338904 has this as union of even-indexed rows.
A338907 is the odd version.
A338908 is the squarefree case.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A056239 gives the sum of prime indices (Heinz weight).
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A289182/A115392 list the positions of odd/even terms in A001358.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900.
A338911 lists products of pairs of primes both of even index.
A339114/A339115 give the least/greatest semiprime of weight n.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],PrimeOmega[#]==2&&EvenQ[Total[primeMS[#]]]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A338906(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((primepi(x//p)-a>>1) for a,p in enumerate(primerange(isqrt(x)+1),-1))
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

A319241 Heinz numbers of strict integer partitions of even numbers. Squarefree numbers whose prime indices sum to an even number.

Original entry on oeis.org

1, 3, 7, 10, 13, 19, 21, 22, 29, 30, 34, 37, 39, 43, 46, 53, 55, 57, 61, 62, 66, 70, 71, 79, 82, 85, 87, 89, 91, 94, 101, 102, 107, 111, 113, 115, 118, 129, 130, 131, 133, 134, 138, 139, 146, 151, 154, 155, 159, 163, 165, 166, 173, 181, 183, 186, 187, 190, 193
Offset: 1

Views

Author

Gus Wiseman, Sep 15 2018

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
From Peter Munn, Feb 04 2022: (Start)
For every odd squarefree number, s, exactly one of s and 2s is a term.
Closed under the commutative operation A350066(.,.).
Closed under the commutative operation A059897(.,.) forming a subgroup of the positive integers considered as a group under A059897. As subgroups, this sequence and A028982 are each a transversal of the other.
(End)

Examples

			30 is the Heinz number of (3,2,1), which is strict and has even weight, so 30 belongs to the sequence.
The sequence of all even-weight strict partitions begins: (), (2), (4), (3,1), (6), (8), (4,2), (5,1), (10), (3,2,1), (7,1), (12), (6,2), (14), (9,1), (16), (5,3), (8,2), (18), (11,1), (5,2,1), (4,3,1).
		

Crossrefs

Complement of the union of A319242 and A013929.
Intersection of A005117 and A300061.

Programs

  • Mathematica
    Select[Range[100],And[SquareFreeQ[#],EvenQ[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]]]]&]
  • PARI
    isok(m) = issquarefree(m) && !(vecsum(apply(primepi, factor(m)[,1])) % 2); \\ Michel Marcus, Feb 08 2022

Formula

{a(n) : n >= 1} = {A019565(A158704(n)) : n >= 1} = {A073675(A319242(n)) : n >= 1}. - Peter Munn, Feb 04 2022

A319246 Sum of prime indices of the n-th squarefree number.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 4, 5, 6, 5, 5, 7, 8, 6, 6, 9, 7, 10, 6, 11, 7, 8, 7, 12, 9, 8, 13, 7, 14, 10, 15, 9, 16, 8, 10, 11, 17, 18, 12, 9, 8, 19, 11, 8, 20, 21, 13, 9, 9, 22, 14, 23, 10, 15, 12, 24, 10, 13, 16, 11, 25, 26, 10, 27, 9, 17, 28, 29, 9, 14, 30, 11, 12
Offset: 1

Views

Author

Gus Wiseman, Sep 15 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n.

Examples

			The 19th squarefree number is 30 with prime indices (3,2,1), so a(19) = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Cases[FactorInteger[n],{p_,k_}:>k*PrimePi[p]]],{n,Select[Range[100],SquareFreeQ]}]

A319829 FDH numbers of strict integer partitions of odd numbers.

Original entry on oeis.org

2, 4, 6, 7, 10, 11, 12, 16, 18, 19, 20, 21, 25, 26, 30, 31, 33, 34, 35, 36, 41, 46, 47, 48, 52, 53, 54, 55, 56, 57, 58, 60, 61, 63, 68, 71, 74, 75, 78, 79, 80, 83, 86, 88, 90, 91, 92, 93, 95, 97, 98, 99, 102, 103, 105, 108, 109, 116, 118, 119, 121, 123, 125
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. The FDH number of a strict integer partition (y_1, ..., y_k) is f(y_1) * ... * f(y_k).

Examples

			The sequence of all strict integer partitions of odd numbers begins: (1), (3), (2,1), (5), (4,1), (7), (3,2), (9), (6,1), (11), (4,3), (5,2), (13), (8,1), (4,2,1), (15), (7,2), (10,1), (5,4), (6,3), (17), (12,1), (19), (9,2), (8,3), (21), (6,2,1), (7,4), (5,3,1), (11,2), (14,1), (4,3,2).
		

Crossrefs

Programs

  • Mathematica
    nn=200;
    FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}:>2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Select[Range[nn],OddQ[Total[FDfactor[#]/.FDrules]]&]

A319828 FDH numbers of strict integer partitions of even numbers.

Original entry on oeis.org

1, 3, 5, 8, 9, 13, 14, 15, 17, 22, 23, 24, 27, 28, 29, 32, 37, 38, 39, 40, 42, 43, 44, 45, 49, 50, 51, 59, 62, 64, 65, 66, 67, 69, 70, 72, 73, 76, 77, 81, 82, 84, 85, 87, 89, 94, 96, 100, 101, 104, 106, 107, 110, 111, 112, 113, 114, 115, 117, 120, 122, 124
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. The FDH number of a strict integer partition (y_1, ..., y_k) is f(y_1) * ... * f(y_k).

Examples

			The sequence of all strict integer partitions of even numbers begins: (), (2), (4), (3,1), (6), (8), (5,1), (4,2), (10), (7,1), (12), (3,2,1), (6,2), (5,3), (14), (9,1), (16).
		

Crossrefs

Programs

  • Mathematica
    nn=200;
    FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}:>2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Select[Range[nn],EvenQ[Total[FDfactor[#]/.FDrules]]&]
Showing 1-6 of 6 results.