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.

A176504 a(n) = m + k where prime(m)*prime(k) = semiprime(n).

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Apr 19 2010

Keywords

Examples

			From _Gus Wiseman_, Dec 04 2020: (Start)
A semiprime (A001358) is a product of any two prime numbers. The sequence of all semiprimes together with their prime indices and weights begins:
   4: 1 + 1 = 2
   6: 1 + 2 = 3
   9: 2 + 2 = 4
  10: 1 + 3 = 4
  14: 1 + 4 = 5
  15: 2 + 3 = 5
  21: 2 + 4 = 6
  22: 1 + 5 = 6
  25: 3 + 3 = 6
  26: 1 + 6 = 7
(End)
		

Crossrefs

A056239 is the version for not just semiprimes.
A087794 gives the product of the same two indices.
A176506 gives the difference of the same two indices.
A338904 puts the n-th semiprime in row a(n).
A001358 lists semiprimes.
A006881 lists squarefree semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with product/sum/difference A339361/A339362/A338900.

Programs

  • Maple
    From R. J. Mathar, Apr 20 2010: (Start)
    isA001358 := proc(n) numtheory[bigomega](n) = 2 ; end proc:
    A001358 := proc(n) option remember ; if n = 1 then return 4 ; else for a from procname(n-1)+1 do if isA001358(a) then return a; end if; end do; end if; end proc:
    A084126 := proc(n) min(op(numtheory[factorset](A001358(n)))) ; end proc:
    A084127 := proc(n) max(op(numtheory[factorset](A001358(n)))) ; end proc:
    A176504 := proc(n) numtheory[pi](A084126(n)) + numtheory[pi](A084127(n)) ; end proc: seq(A176504(n),n=1..80) ; (End)
  • Mathematica
    Table[If[SquareFreeQ[n],Total[PrimePi/@First/@FactorInteger[n]],2*PrimePi[Sqrt[n]]],{n,Select[Range[100],PrimeOmega[#]==2&]}] (* Gus Wiseman, Dec 04 2020 *)

Formula

a(n) = A056239(A001358(n)) = A338912(n) + A338913(n). - Gus Wiseman, Dec 04 2020
sqrt(n/(log n log log n)) << a(n) << n/log log n. - Charles R Greathouse IV, Apr 17 2024

Extensions

Entries checked by R. J. Mathar, Apr 20 2010

A087794 Products of prime-indices of factors of semiprimes.

Original entry on oeis.org

1, 2, 4, 3, 4, 6, 8, 5, 9, 6, 10, 7, 12, 8, 12, 9, 16, 14, 15, 16, 10, 11, 18, 18, 12, 20, 13, 21, 14, 20, 24, 22, 15, 24, 16, 24, 27, 17, 28, 25, 18, 26, 28, 32, 19, 30, 20, 30, 30, 21, 33, 22, 32, 36, 23, 36, 34, 24, 36, 36, 35, 25, 38, 26, 40, 39, 27, 40, 40, 28, 42, 44, 29
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2003

Keywords

Comments

A semiprime (A001358) 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. - Gus Wiseman, Dec 04 2020

Examples

			A001358(20)=57=3*19=A000040(2)*A000040(8), therefore a(20)=2*8=16.
From _Gus Wiseman_, Dec 04 2020: (Start)
The sequence of all semiprimes together with the products of their prime indices begins:
   4: 1 * 1 = 1
   6: 1 * 2 = 2
   9: 2 * 2 = 4
  10: 1 * 3 = 3
  14: 1 * 4 = 4
  15: 2 * 3 = 6
  21: 2 * 4 = 8
  22: 1 * 5 = 5
  25: 3 * 3 = 9
  26: 1 * 6 = 6
(End)
		

Crossrefs

A003963 is the version for not just semiprimes.
A176504 gives the sum of the same two indices.
A176506 gives the difference of the same two indices.
A339361 is the squarefree case.
A001358 lists semiprimes.
A006881 lists squarefree semiprimes.
A289182/A115392 list the positions of odd/even terms of A001358.
A338898/A338912/A338913 give the prime indices of semiprimes.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes.
A338904 groups semiprimes by weight.

Programs

  • Mathematica
    Table[If[SquareFreeQ[n],Times@@PrimePi/@First/@FactorInteger[n],PrimePi[Sqrt[n]]^2],{n,Select[Range[100],PrimeOmega[#]==2&]}] (* Gus Wiseman, Dec 04 2020 *)

Formula

a(n) = A003963(A001358(n)) = A338912(n) * A338913(n). - Gus Wiseman, Dec 04 2020

A112141 Product of the first n semiprimes.

Original entry on oeis.org

4, 24, 216, 2160, 30240, 453600, 9525600, 209563200, 5239080000, 136216080000, 4495130640000, 152834441760000, 5349205461600000, 203269807540800000, 7927522494091200000, 364666034728195200000, 17868635701681564800000, 911300420785759804800000
Offset: 1

Views

Author

Jonathan Vos Post, Nov 28 2005

Keywords

Comments

Semiprime analog of primorial (A002110). Equivalent for product of what A062198 is for sum.

Examples

			a(10) = 4*6*9*10*14*15*21*22*25*26 = 136216080000, the product of the first 10 semiprimes.
From _Gus Wiseman_, Dec 06 2020: (Start)
The sequence of terms together with their prime signatures begins:
                        4: (2)
                       24: (3,1)
                      216: (3,3)
                     2160: (4,3,1)
                    30240: (5,3,1,1)
                   453600: (5,4,2,1)
                  9525600: (5,5,2,2)
                209563200: (6,5,2,2,1)
               5239080000: (6,5,4,2,1)
             136216080000: (7,5,4,2,1,1)
            4495130640000: (7,6,4,2,2,1)
          152834441760000: (8,6,4,2,2,1,1)
         5349205461600000: (8,6,5,3,2,1,1)
       203269807540800000: (9,6,5,3,2,1,1,1)
      7927522494091200000: (9,7,5,3,2,2,1,1)
    364666034728195200000: (10,7,5,3,2,2,1,1,1)
  17868635701681564800000: (10,7,5,5,2,2,1,1,1)
(End)
		

Crossrefs

Partial sums of semiprimes are A062198.
First differences of semiprimes are A065516.
A000040 lists primes, with partial products A002110 (primorials).
A000142 lists factorials, with partial products A000178 (superfactorials).
A001358 lists semiprimes, with partial products A112141 (this sequence).
A005117 lists squarefree numbers, with partial products A111059.
A006881 lists squarefree semiprimes, with partial products A339191.
A101048 counts partitions into semiprimes (restricted: A338902).
A320655 counts factorizations into semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes, with product/sum/difference A087794/A176504/A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with product/sum/difference A339361/A339362/A338900.

Programs

  • Maple
    A112141 := proc(n)
        mul(A001358(i),i=1..n) ;
    end proc:
    seq(A112141(n),n=1..10) ; # R. J. Mathar, Jun 30 2020
  • Mathematica
    NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[sgn < 0, sp--, sp++]]; If[sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; f[n_] := Times @@ NestList[ NextSemiPrime@# &, 2^2, n - 1]; Array[f, 18] (* Robert G. Wilson v, Jun 13 2013 *)
    FoldList[Times,Select[Range[30],PrimeOmega[#]==2&]] (* Gus Wiseman, Dec 06 2020 *)
  • PARI
    a(n)=my(v=vector(n),i,k=3);while(iCharles R Greathouse IV, Apr 04 2013
    
  • Python
    from sympy import factorint
    def aupton(terms):
        alst, k, p = [], 1, 1
        while len(alst) < terms:
            if sum(factorint(k).values()) == 2:
                p *= k
                alst.append(p)
            k += 1
        return alst
    print(aupton(18)) # Michael S. Branicky, Aug 31 2021

Formula

a(n) = Product_{i=1..n} A001358(i).
A001222(a(n)) = 2*n.

A332765 Consider all permutations p_i of the first n primes; a(n) is the minimum over p_i of the maximal product of two adjacent primes in the permutation.

Original entry on oeis.org

6, 10, 15, 22, 35, 55, 77, 91, 143, 187, 221, 253, 323, 391, 493, 551, 667, 713, 899, 1073, 1189, 1271, 1517, 1591, 1763, 1961, 2183, 2419, 2537, 2773, 3127, 3233, 3599, 3953, 4189, 4331, 4757, 4897, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633, 8989, 9797, 9991, 10403, 10807
Offset: 2

Views

Author

Bobby Jacobs, Apr 23 2020

Keywords

Comments

The optimal permutation of n primes is {p_n, p_1, p_n-1, p_2, …, p_ceiling(n/2)}. - Ivan N. Ianakiev, Apr 28 2020
Also the greatest squarefree semiprime whose prime indices sum to n + 1. A squarefree semiprime (A006881) is a product of any two distinct 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. - Gus Wiseman, Dec 06 2020

Examples

			Here are the ways (up to reversal) to order the first four primes:
  2, 3, 5, 7: Products: 6, 15, 35;  Largest product: 35
  2, 3, 7, 5: Products: 6, 21, 35;  Largest product: 35
  2, 5, 3, 7: Products: 10, 15, 21; Largest product: 21
  2, 5, 7, 3: Products: 10, 35, 21; Largest product: 35
  2, 7, 3, 5: Products: 14, 21, 15; Largest product: 21
  2, 7, 5, 3: Products: 14, 35, 15; Largest product: 35
  3, 2, 5, 7: Products: 6, 10, 35;  Largest product: 35
  3, 2, 7, 5: Products: 6, 14, 35;  Largest product: 35
  3, 5, 2, 7: Products: 15, 10, 14; Largest product: 15
  3, 7, 2, 5: Products: 21, 14, 10; Largest product: 21
  5, 2, 3, 7: Products: 10, 6, 21;  Largest product: 21
  5, 3, 2, 7: Products: 15, 6, 14;  Largest product: 15
The minimum largest product is 15, so a(4) = 15.
From _Gus Wiseman_, Dec 06 2020: (Start)
The sequence of terms together with their prime indices begins:
      6: {1,2}     551: {8,10}    3127: {16,17}
     10: {1,3}     667: {9,10}    3233: {16,18}
     15: {2,3}     713: {9,11}    3599: {17,18}
     22: {1,5}     899: {10,11}   3953: {17,19}
     35: {3,4}    1073: {10,12}   4189: {17,20}
     55: {3,5}    1189: {10,13}   4331: {18,20}
     77: {4,5}    1271: {11,13}   4757: {19,20}
     91: {4,6}    1517: {12,13}   4897: {17,23}
    143: {5,6}    1591: {12,14}   5293: {19,22}
    187: {5,7}    1763: {13,14}   5723: {17,25}
    221: {6,7}    1961: {12,16}   5963: {19,24}
    253: {5,9}    2183: {12,17}   6499: {19,25}
    323: {7,8}    2419: {13,17}   6887: {20,25}
    391: {7,9}    2537: {14,17}   7171: {20,26}
    493: {7,10}   2773: {15,17}   7663: {22,25}
(End)
		

Crossrefs

A338904 and A338905 have this sequence as row maxima.
A339115 is the not necessarily squarefree version.
A001358 lists semiprimes.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes.
A025129 gives the sum of squarefree semiprimes of weight n.
A056239 (weight) gives the sum of prime indices of n.
A320656 counts factorizations into squarefree semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes, with product/sum/difference A087794/A176504/A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with product/sum/difference A339361/A339362/A338900.
A338907/A338908 list squarefree semiprimes of odd/even weight.
A339114 is the least (squarefree) semiprime of weight n.
A339116 groups squarefree semiprimes by greater prime factor.

Programs

  • Mathematica
    primes[n_]:=Reverse[Prime/@Range[n]]; partition[n_]:=Partition[primes[n],UpTo[Ceiling[n/2]]];
    riffle[n_]:=Riffle[partition[n][[1]],Reverse[partition[n][[2]]]];
    a[n_]:=Max[Table[riffle[n][[i]]*riffle[n][[i+1]],{i,1,n-1}]];a/@Range[2,53]
    (* Ivan N. Ianakiev, Apr 28 2020 *)

Formula

It appears that a(n) = A332877(n - 1) for n > 5.

Extensions

a(12)-a(13) from Jinyuan Wang, Apr 24 2020
More terms from Ivan N. Ianakiev, Apr 28 2020

A339361 Product of prime indices of the n-th squarefree semiprime.

Original entry on oeis.org

2, 3, 4, 6, 8, 5, 6, 10, 7, 12, 8, 12, 9, 14, 15, 16, 10, 11, 18, 18, 12, 20, 13, 21, 14, 20, 24, 22, 15, 24, 16, 24, 27, 17, 28, 18, 26, 28, 32, 19, 30, 20, 30, 30, 21, 33, 22, 32, 36, 23, 34, 24, 36, 36, 35, 25, 38, 26, 40, 39, 27, 40, 40, 28, 42, 44, 29, 42
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2020

Keywords

Comments

A squarefree semiprime (A006881) is a product of any two distinct 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 all squarefree semiprimes together with the products of their prime indices begins:
   6: 1 * 2 = 2
  10: 1 * 3 = 3
  14: 1 * 4 = 4
  15: 2 * 3 = 6
  21: 2 * 4 = 8
  22: 1 * 5 = 5
  26: 1 * 6 = 6
  33: 2 * 5 = 10
  34: 1 * 7 = 7
  35: 3 * 4 = 12
		

Crossrefs

A001358 lists semiprimes.
A003963 gives the product of prime indices of n.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes.
A025129 is the sum of squarefree semiprimes of weight n.
A332765/A339114 give the greatest/least squarefree semiprime of weight n.
A338898/A338912/A338913 give the prime indices of semiprimes, with product/sum/difference A087794/A176504/A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with product/sum/difference A339361/A339362/A338900.
A338905 groups squarefree semiprimes by weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.
A339116 groups squarefree semiprimes by greater prime factor.

Programs

  • Mathematica
    Table[Times@@PrimePi/@First/@FactorInteger[n],{n,Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&]}]

Formula

a(n) = A003963(A006881(n)).
a(n) = A270650(n) * A270652(n).

A347047 Smallest squarefree semiprime whose prime indices sum to n.

Original entry on oeis.org

6, 10, 14, 21, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502, 514, 526
Offset: 3

Views

Author

Gus Wiseman, Aug 22 2021

Keywords

Comments

Compared to A001747, we have 21 instead of 22 and lack 2 and 4.
Compared to A100484 (shifted) we have 21 instead of 22 and lack 4.
Compared to A161344, we have 21 instead of 22 and lack 4 and 8.
Compared to A339114, we have 11 instead of 9 and lack 4.
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.
A squarefree semiprime (A006881) is a product of any two distinct prime numbers.

Examples

			The initial terms and their prime indices:
    6: {1,2}
   10: {1,3}
   14: {1,4}
   21: {2,4}
   26: {1,6}
   34: {1,7}
   38: {1,8}
   46: {1,9}
		

Crossrefs

The opposite version (greatest instead of smallest) is A332765.
These are the minima of rows of A338905.
The nonsquarefree version is A339114 (opposite: A339115).
A001358 lists semiprimes (squarefree: A006881).
A024697 adds up semiprimes by weight (squarefree: A025129).
A056239 adds up prime indices, row sums of A112798.
A246868 gives the greatest squarefree number whose prime indices sum to n.
A320655 counts factorizations into semiprimes (squarefree: A320656).
A338898, A338912, A338913 give the prime indices of semiprimes.
A338899, A270650, A270652 give the prime indices of squarefree semiprimes.
A339116 groups squarefree semiprimes by greater factor, sums A339194.
A339362 adds up prime indices of squarefree semiprimes.

Programs

  • Mathematica
    Table[Min@@Select[Table[Times@@Prime/@y,{y,IntegerPartitions[n,{2}]}],SquareFreeQ],{n,3,50}]
  • Python
    from sympy import prime, sieve
    def a(n):
        p = [0] + list(sieve.primerange(1, prime(n)+1))
        return min(p[i]*p[n-i] for i in range(1, (n+1)//2))
    print([a(n) for n in range(3, 58)]) # Michael S. Branicky, Sep 05 2021
Showing 1-6 of 6 results.