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 70 results. Next

A338904 Irregular triangle read by rows where row n lists all semiprimes whose prime indices sum to n.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 35, 34, 39, 49, 55, 38, 51, 65, 77, 46, 57, 85, 91, 121, 58, 69, 95, 119, 143, 62, 87, 115, 133, 169, 187, 74, 93, 145, 161, 209, 221, 82, 111, 155, 203, 247, 253, 289, 86, 123, 185, 217, 299, 319, 323, 94, 129, 205
Offset: 2

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

			Triangle begins:
   4
   6
   9  10
  14  15
  21  22  25
  26  33  35
  34  39  49  55
  38  51  65  77
  46  57  85  91 121
  58  69  95 119 143
  62  87 115 133 169 187
  74  93 145 161 209 221
  82 111 155 203 247 253 289
  86 123 185 217 299 319 323
  94 129 205 259 341 361 377 391
		

Crossrefs

A004526 gives row lengths.
A024697 gives row sums.
A087112 is a different triangle of semiprimes.
A098350 has antidiagonals with the same distinct terms as these rows.
A338905 is the squarefree case, with row sums A025129.
A338907/A338906 are the union of odd/even rows.
A339114/A339115 are the row minima/maxima.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A014342 is the self-convolution of primes.
A037143 lists primes and semiprimes.
A056239 gives sum of prime indices (Heinz weight).
A062198 gives partial sums of semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A289182/A115392 list the positions of odd/even terms in A001358.
A332765 gives the greatest squarefree semiprime of weight n.
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.

Programs

  • Mathematica
    Table[Sort[Table[Prime[k]*Prime[n-k],{k,n/2}]],{n,2,10}]

A167171 Squarefree semiprimes together with primes.

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 46, 47, 51, 53, 55, 57, 58, 59, 61, 62, 65, 67, 69, 71, 73, 74, 77, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 115, 118, 119, 122, 123
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 29 2009

Keywords

Comments

Numbers such that d(n)=2*omega(n), where d = A000005 is the number of divisors.
Numbers n such that half of number of divisors of n is equal to number of distinct primes dividing n.
Numbers p*q such that p is 1 or a prime and q is a prime greater than p.

Examples

			a(1)=2 (d(2)=2*omega(2)); a(2)=3 (d(3)=2*omega(3)).
		

Crossrefs

Programs

  • Maple
    omega := proc(n) if n = 1 then 0 ; else nops( numtheory[factorset](n)) ; end if; end proc: isA167171 := proc(n) numtheory[tau](n) = 2*omega(n) ; end proc: for n from 1 to 300 do if isA167171(n) then printf("%d,",n) ; end if ; end do: # R. J. Mathar, Oct 31 2009
  • Mathematica
    a = {}; Do[If[1 <= PrimeOmega[n] <= 2 && SquareFreeQ[n], AppendTo[a, n]], {n, 123}]; a (* L. Edson Jeffery, Jan 01 2015 *)
  • PARI
    for(n=1, 1e3, if(numdiv(n)==2*omega(n), print1(n, ", "))) \\ Felix Fröhlich, Aug 11 2014

Formula

Equals A037143 \ A000290 = A006881 union A000040. - V. Raman, Sep 13 2012
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Apr 05 2017

Extensions

Corrected by R. J. Mathar, Oct 31 2009
New name from Charles R Greathouse IV, Apr 05 2017

A016038 Strictly non-palindromic numbers: n is not palindromic in any base b with 2 <= b <= n-2.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 11, 19, 47, 53, 79, 103, 137, 139, 149, 163, 167, 179, 223, 263, 269, 283, 293, 311, 317, 347, 359, 367, 389, 439, 491, 563, 569, 593, 607, 659, 739, 827, 853, 877, 977, 983, 997, 1019, 1049, 1061, 1187, 1213, 1237, 1367, 1433, 1439, 1447, 1459
Offset: 1

Views

Author

Keywords

Comments

All elements of the sequence greater than 6 are prime (ab = a(b-1) + a or a^2 = (a-1)^2 + 2(a-1) + 1). Mersenne and Fermat primes are not in the sequence.
Additional comments: if you can factor a number as a*b then it is a palindrome in base b-1, where b is the larger of the two factors. (If the number is a square, then it can be a palindrome in an additional way, in base (sqrt(n)-1)). The a*b form does not work when a = b-1, but of course there are no two consecutive primes (other than 2,3, which explains the early special cases), so if you can factor a number as a*(a-1), then another factorization also exists. - Michael B Greenwald (mbgreen(AT)central.cis.upenn.edu), Jan 01 2002
Note that no prime p is palindromic in base b for the range sqrt(p) < b < p-1. Hence to find non-palindromic primes, we need only examine bases up to floor(sqrt(p)), which greatly reduces the computational effort required. - T. D. Noe, Mar 01 2008
No number n is palindromic in any base b with n/2 <= b <= n-2, so this is also numbers not palindromic in any base b with 2 <= b <= n/2.
Sequence A047811 (this sequence without 0, 1, 2, 3) is mentioned in the Guy paper, in which he reports on unsolved problems. This problem came from Mario Borelli and Cecil B. Mast. The paper poses two questions about these numbers: (1) Can palindromic or nonpalindromic primes be otherwise characterized? and (2) What is the cardinality, or the density, of the set of palindromic primes? Of the set of nonpalindromic primes? - T. D. Noe, Apr 18 2011
From Robert G. Wilson v, Oct 22 2014 and Nov 03 2014: (Start)
Define f(n) to be the number of palindromic representations of n in bases b with 1 < b < n, see A135551.
For A016038, f(n) = 1 for all n. Only the numbers n = 0, 1, 4 and 6 are not primes.
For f(n) = 2, all terms are prime or semiprimes (prime omega <= 2 (A037143)) with the exception of 8 and 12;
For f(n) = 3, all terms are at most 3-almost primes (prime omega <= 3 (A037144)), with the exception of 16, 32, 81 and 625;
For f(n) = 4, all terms are at most 4-almost primes, with the exception of 64 and 243;
For f(n) = 5, all terms are at most 5-almost primes, with the exception of 128, 256 and 729;
For f(n) = 6, all terms are at most 6-almost primes, with the sole exception of 2187;
For f(n) = 7, all terms are at most 7-almost primes, with the exception of 512, 2048 and 19683; etc. (End)

References

  • Paul Guinand, Strictly non-palindromic numbers, unpublished note, 1996.

Crossrefs

Programs

  • Mathematica
    PalindromicQ[n_, base_] := FromDigits[Reverse[IntegerDigits[n, base]], base] == n; PalindromicBases[n_] := Select[Range[2, n-2], PalindromicQ[n, # ] &]; StrictlyPalindromicQ[n_] := PalindromicBases[n] == {}; Select[Range[150], StrictlyPalindromicQ] (* Herman Beeksma, Jul 16 2005*)
    palindromicBases[n_] := Module[{p}, Table[p = IntegerDigits[n, b]; If[ p == Reverse[p], {b, p}, Sequence @@ {}], {b, 2, n - 2}]]; lst = {0, 1, 4, 6}; Do[ If[ Length@ palindromicBases@ Prime@n == 0, AppendTo[lst, Prime@n]], {n, 10000}]; lst (* Robert G. Wilson v, Mar 08 2008 *)
    Select[Range@ 1500, Function[n, NoneTrue[Range[2, n - 2], PalindromeQ@ IntegerDigits[n, #] &]]] (* Michael De Vlieger, Dec 24 2017 *)
  • PARI
    is(n)=!for(b=2,n\2,Vecrev(d=digits(n,b))==d&&return) \\ M. F. Hasler, Sep 08 2015
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.factor_ import digits
    def A016038_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n: all((s := digits(n,b)[1:])[:(t:=len(s)+1>>1)]!=s[:-t-1:-1] for b in range(2,n-1)), count(max(startvalue,0)))
    A016038_list = list(islice(A016038_gen(),30)) # Chai Wah Wu, Jan 17 2024

Formula

a(n) = A047811(n-4) for n > 4. - M. F. Hasler, Sep 08 2015

Extensions

Extended and corrected by Patrick De Geest, Oct 15 1999
Edited by N. J. A. Sloane, Apr 09 2008

A037144 Numbers with at most 3 prime factors (counted with multiplicity).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 85, 86
Offset: 1

Views

Author

Keywords

Comments

Complement of A033987: A001222(a(n))<=3; A117358(a(n))=1. - Reinhard Zumkeller, Mar 10 2006
Also numbers such that exist permutations of all proper divisors only with coprime adjacent elements: A178254(a(n))>0. - Reinhard Zumkeller, May 24 2010

Crossrefs

A037143 is a subsequence.

Programs

  • Magma
    [ n: n in [1..86] | n eq 1 or &+[ t[2]: t in Factorization(n) ] le 3 ]; /* Klaus Brockhaus, Mar 20 2007 */
    
  • Mathematica
    Select[Range[100],PrimeOmega[#]<4&] (* Harvey P. Dale, Oct 15 2015 *)
  • PARI
    is(n)=bigomega(n)<4 \\ Charles R Greathouse IV, Sep 14 2015
    
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A037144(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-2-primepi(x)-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(2,4)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 23 2024

Formula

a(n) ~ 2n log n/(log log n)^2. - Charles R Greathouse IV, Sep 14 2015

Extensions

More terms from Reinhard Zumkeller, Mar 10 2006
More terms from Klaus Brockhaus, Mar 20 2007

A002135 Number of terms in a symmetrical determinant: a(n) = n*a(n-1) - (n-1)*(n-2)*a(n-3)/2.

Original entry on oeis.org

1, 1, 2, 5, 17, 73, 388, 2461, 18155, 152531, 1436714, 14986879, 171453343, 2134070335, 28708008128, 415017867707, 6416208498137, 105630583492969, 1844908072865290, 34071573484225549, 663368639907213281, 13580208904207073801
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of collections of necklaces created by using exactly n different colored beads (to make the entire collection). - Geoffrey Critzer, Apr 19 2009
a(n) is the number of ways that a deck with 2 cards of each of n types may be dealt into n hands of 2 cards each, assuming that the order of the hands and the order of the cards in each hand are irrelevant. See the Art of Problem Solving link for proof. - Joel B. Lewis, Sep 30 2012
From Bruce Westbury, Jan 22 2013: (Start)
It follows from the respective exponential generating functions that A002135 is the binomial transform of A002137:
A002135(n) = Sum_{k=0..n} binomial(n,k)*A002137(k),
2 = 1.1 + 2.0 + 1.1,
5 = 1.1 + 3.0 + 3.1 + 1.1,
17 = 1.1 + 4.0 + 6.1 + 4.1 + 1.6, ...
A002137 arises from looking at the dimension of the space of invariant tensors of the r-th tensor power of the adjoint representation of the symplectic group Sp(2n) (for n large compared to r).
(End)
a(n) is the number of representations required for the symbolic central moments of order 2 for the multivariate normal distribution, that is, E[X1^2 X2^2 .. Xn^2|mu=0, Sigma] (Phillips 2010). These representations are the upper-triangular, positive integer matrices for which for each i, the sum of the i-th row and i-th column equals 2, the power of each component. This can be shown starting from the formulation by Joel B Lewis. See "Proof for multivariate normal moments" link below for a proof. - Kem Phillips, Aug 20 2014
Equivalent to Critzer's comment, a(n) is the number of ways to cover n labeled vertices by disjoint undirected cycles, hence the exponential transform of A001710(n - 1). - Gus Wiseman, Oct 20 2018

Examples

			For n = 3, the a(3) = 5 ways to deal out the deck {1, 1, 2, 2, 3, 3} into three two-card hands are {11, 22, 33}, {12, 12, 33}, {13, 13, 22}, {11, 23, 23}, {12, 13, 23}. - _Joel B. Lewis_, Sep 30 2012
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 260, #12, a_n.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.2.9 and Problem 5.22.

Crossrefs

A diagonal of A260338.
Row sums of A215771.
Column k=2 of A257463 and A333467.

Programs

  • Maple
    G:=proc(n) option remember; if n <= 1 then 1 elif n=2 then
    2 else n*G(n-1)-binomial(n-1,2)*G(n-3); fi; end;
  • Mathematica
    a[x_]:=Log[1/(1-x)^(1/2)]+x/2+x^2/4;Range[0, 20]! CoefficientList[Series[Exp[a[x]], {x, 0, 20}], x]
    RecurrenceTable[{a[0]==a[1]==1,a[2]==2,a[n]==n*a[n-1]-(n-1)(n-2)* a[n-3]/2}, a,{n,30}] (* Harvey P. Dale, Dec 16 2011 *)
    Table[Sum[Binomial[k, i] Binomial[i - 1/2, n - k] (3^(k - i) n!)/(4^k k!) (-1)^(n - k - i), {k, 0, n}, {i, 0, k}], {n, 0, 12}] (* Emanuele Munarini, Aug 25 2017 *)
  • Maxima
    a(n):=sum(sum(binomial(k,i)*binomial(i-1/2,n-k)*(3^(k-i)*n!)/(4^k*k!)*(-1)^(n-k-i),i,0,k),k,0,n);
    makelist(a(n),n,0,12); /* Emanuele Munarini, Aug 25 2017 */
  • PARI
    a(n) = if(n<3, [1,1,2][n+1], n*a(n-1) - (n-1)*(n-2)*a(n-3)/2 ); /* Joerg Arndt, Apr 07 2013 */
    

Formula

E.g.f.: (1-x)^(-1/2)*exp(x/2+x^2/4).
D-finite with recurrence a(n+1) = (n+1)*a(n) - binomial(n, 2)*a(n-2). See Comtet.
Asymptotics: a(n) ~ sqrt(2)*exp(3/4-n)*n^n*(1+O(1/n)). - Pietro Majer, Oct 27 2009
E.g.f.: G(0)/sqrt(1-x) where G(k) = 1 + x*(x+2)/(4*(2*k+1) - 4*x*(x+2)*(2*k+1)/(x*(x+2) + 8*(k + 1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 31 2013
a(n) = Sum_{k=0..n} Sum_{i=0..k} binomial(k,i)*binomial(i-1/2,n-k)*(3^(k-i)*n!)/(4^k*k!)*(-1)^(n-k-i). - Emanuele Munarini, Aug 25 2017

A339114 Least semiprime whose prime indices sum to n.

Original entry on oeis.org

4, 6, 9, 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: 2

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

Converges to A100484.
After a(4) = 9, also the least squarefree semiprime whose prime indices sum to n.
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}     106: {1,16}    254: {1,31}
      6: {1,2}     118: {1,17}    262: {1,32}
      9: {2,2}     122: {1,18}    274: {1,33}
     14: {1,4}     134: {1,19}    278: {1,34}
     21: {2,4}     142: {1,20}    298: {1,35}
     26: {1,6}     146: {1,21}    302: {1,36}
     34: {1,7}     158: {1,22}    314: {1,37}
     38: {1,8}     166: {1,23}    326: {1,38}
     46: {1,9}     178: {1,24}    334: {1,39}
     58: {1,10}    194: {1,25}    346: {1,40}
     62: {1,11}    202: {1,26}    358: {1,41}
     74: {1,12}    206: {1,27}    362: {1,42}
     82: {1,13}    214: {1,28}    382: {1,43}
     86: {1,14}    218: {1,29}    386: {1,44}
     94: {1,15}    226: {1,30}    394: {1,45}
		

Crossrefs

A024697 is the sum of the same semiprimes.
A098350 has this sequence as antidiagonal minima.
A338904 has this sequence as row minima.
A339114 (this sequence) is the squarefree case for n > 4.
A339115 is the greatest among the same semiprimes.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A037143 lists primes and semiprimes.
A056239 gives the sum of prime indices of n.
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A320655 counts factorizations into semiprimes.
A332765/A332877 is the greatest squarefree semiprime of weight n.
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.
A338907/A338906 list semiprimes of odd/even weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.

Programs

  • Mathematica
    Table[Min@@Table[Prime[k]*Prime[n-k],{k,n-1}],{n,2,30}]
    Take[DeleteDuplicates[SortBy[{Times@@#,Total[PrimePi[#]]}&/@Tuples[ Prime[ Range[ 200]],2],{Last,First}],GreaterEqual[#1[[2]],#2[[2]]]&][[All,1]],60] (* Harvey P. Dale, Sep 06 2022 *)
  • PARI
    a(n) = vecmin(vector(n-1, k, prime(k)*prime(n-k))); \\ Michel Marcus, Dec 03 2020

A361200 Product of the left half (exclusive) of the multiset of prime factors of n; a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 4, 5, 2, 3, 2, 1, 2, 1, 4, 3, 2, 5, 4, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 4, 7, 2, 3, 2, 1, 6, 5, 4, 3, 2, 1, 4, 1, 2, 3, 8, 5, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 7, 2, 1, 4, 9, 2, 1, 4, 5, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Mar 10 2023

Keywords

Examples

			The prime factors of 250 are {2,5,5,5}, with left half (exclusive) {2,5}, with product 10, so a(250) = 10.
		

Crossrefs

Positions of 1's are A000040.
Positions of 2's are A037143.
The inclusive version is A347043.
The right inclusive version A347044.
The right version is A361201.
A000005 counts divisors.
A001221 counts distinct prime factors.
A006530 gives greatest prime factor.
A112798 lists prime indices, length A001222, sum A056239.
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

  • Mathematica
    Table[If[n==1,0,Times@@Take[Join@@ConstantArray@@@FactorInteger[n],Floor[PrimeOmega[n]/2]]],{n,100}]
    a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]}, Times @@ p[[1 ;; Floor[Length[p]/2]]]]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)

Formula

a(n) * A347044(n) = n.
A361201(n) * A347043(n) = n.
a(n) = Product_{k=1..floor(A001222(n)/2)} A027746(n,k) for n >= 2. - Amiram Eldar, Nov 02 2024

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

A322353 Number of factorizations of n into distinct semiprimes; a(1) = 1 by convention.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 1, 1, 1, 1, 0, 2, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Dec 06 2018

Keywords

Comments

A semiprime (A001358) is a product of any two prime numbers. In the even case, these factorizations have A001222(n)/2 factors. - Gus Wiseman, Dec 31 2020
Records 1, 2, 3, 4, 5, 9, 13, 15, 17, ... occur at 1, 60, 210, 840, 1260, 4620, 27720, 30030, 69300, ...

Examples

			a(4) = 1, as there is just one way to factor 4 into distinct semiprimes, namely as {4}.
From _Gus Wiseman_, Dec 31 2020: (Start)
The a(n) factorizations for n = 60, 210, 840, 1260, 4620, 12600, 18480:
  4*15   6*35    4*6*35    4*9*35    4*15*77    4*6*15*35    4*6*10*77
  6*10   10*21   4*10*21   4*15*21   4*21*55    4*6*21*25    4*6*14*55
         14*15   4*14*15   6*10*21   4*33*35    4*9*10*35    4*6*22*35
                 6*10*14   6*14*15   6*10*77    4*9*14*25    4*10*14*33
                           9*10*14   6*14*55    4*10*15*21   4*10*21*22
                                     6*22*35    6*10*14*15   4*14*15*22
                                     10*14*33                6*10*14*22
                                     10*21*22
                                     14*15*22
(End)
		

Crossrefs

Unlabeled multiset partitions of this type are counted by A007717.
The version for partitions is A112020, or A101048 without distinctness.
The non-strict version is A320655.
Positions of zeros include A320892.
Positions of nonzero terms are A320912.
The case of squarefree factors is A339661, or A320656 without distinctness.
Allowing prime factors gives A339839, or A320732 without distinctness.
A322661 counts loop-graphs, ranked by A320461.
A001055 counts factorizations, with strict case A045778.
A001358 lists semiprimes, with squarefree case A006881.
A027187 counts partitions of even length, ranked by A028260.
A037143 lists primes and semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes.
A339846 counts even-length factorizations, with ordered version A174725.

Programs

Formula

a(n) = Sum_{d|n} (-1)^A001222(d) * A339839(n/d). - Gus Wiseman, Dec 31 2020

A338910 Numbers of the form prime(x) * prime(y) where x and y are both odd.

Original entry on oeis.org

4, 10, 22, 25, 34, 46, 55, 62, 82, 85, 94, 115, 118, 121, 134, 146, 155, 166, 187, 194, 205, 206, 218, 235, 253, 254, 274, 289, 295, 298, 314, 334, 335, 341, 358, 365, 382, 391, 394, 415, 422, 451, 454, 466, 482, 485, 514, 515, 517, 527, 529, 538, 545, 554
Offset: 1

Views

Author

Gus Wiseman, Nov 20 2020

Keywords

Examples

			The sequence of terms together with their prime indices begins:
      4: {1,1}     146: {1,21}    314: {1,37}
     10: {1,3}     155: {3,11}    334: {1,39}
     22: {1,5}     166: {1,23}    335: {3,19}
     25: {3,3}     187: {5,7}     341: {5,11}
     34: {1,7}     194: {1,25}    358: {1,41}
     46: {1,9}     205: {3,13}    365: {3,21}
     55: {3,5}     206: {1,27}    382: {1,43}
     62: {1,11}    218: {1,29}    391: {7,9}
     82: {1,13}    235: {3,15}    394: {1,45}
     85: {3,7}     253: {5,9}     415: {3,23}
     94: {1,15}    254: {1,31}    422: {1,47}
    115: {3,9}     274: {1,33}    451: {5,13}
    118: {1,17}    289: {7,7}     454: {1,49}
    121: {5,5}     295: {3,17}    466: {1,51}
    134: {1,19}    298: {1,35}    482: {1,53}
		

Crossrefs

A338911 is the even instead of odd version.
A339003 is the squarefree case.
A001221 counts distinct prime indices.
A001222 counts prime indices.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A289182/A115392 list the positions of odd/even terms of A001358.
A300912 lists semiprimes with relatively prime indices.
A318990 lists semiprimes with divisible indices.
A338904 groups semiprimes by weight.
A338906/A338907 are semiprimes of even/odd weight.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give prime indices of squarefree semiprimes.
A338909 lists semiprimes with non-relatively prime indices.

Programs

  • Maple
    q:= n-> (l-> add(i[2], i=l)=2 and andmap(i->
        numtheory[pi](i[1])::odd, l))(ifactors(n)[2]):
    select(q, [$1..1000])[];  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    Select[Range[100],PrimeOmega[#]==2&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A338910(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) if a&1)
        return bisection(f,n,n) # Chai Wah Wu, Apr 03 2025

Formula

Numbers m such that A001222(m) = A195017(m) = 2. - Peter Munn, Jan 17 2021
Previous Showing 11-20 of 70 results. Next