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

A175040 Product of the n-th block of identical consecutive values of A072000.

Original entry on oeis.org

0, 1, 8, 3, 256, 5, 46656, 7, 512, 9, 10000000, 11, 12, 2197, 14, 170859375, 4096, 289, 104976, 361, 20, 194481, 10648, 279841, 7962624, 15625, 11881376, 19683, 28, 29, 810000, 961, 32, 33, 70188843638032384, 52521875, 1679616, 50653, 38, 1521
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 13 2009

Keywords

Examples

			0*0*0, 1*1, 2*2*2, 3, 4*4*4*4, 5, 6*6*6*6*6*6, 7, 8*8*8, 9, ...
		

Crossrefs

Cf. A072000, A151916 (fixed points), A167895 (primes).

Extensions

a(1) = 0, a(28) = 28, a(29) = 29 corrected by Giovanni Teofilatto, Nov 14 2009
Edited by Jason Kimberley, Sep 26 2018

A001358 Semiprimes (or biprimes): products of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form p*q where p and q are primes, not necessarily distinct.
These numbers are sometimes called semiprimes or 2-almost primes.
Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.
Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log(n)/log(log(n)) goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.
For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.
Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011
The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015
An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016
The above characterization can be simplified to "Composite numbers not divisible by a smaller term." This shows that this is the equivalent of primes computed via Eratosthenes's sieve, but starting with the set of composite numbers (i.e., complement of 1 union primes) instead of all positive integers > 1. It's easy to see that iterating the method (using Eratosthenes's sieve each time on the remaining numbers, complement of the previously computed set) yields numbers with bigomega = k for k = 0, 1, 2, 3, ..., i.e., {1}, A000040, this, A014612, etc. - M. F. Hasler, Apr 24 2019
For all n except n = 2, a(n) is a deficient number. - Amrit Awasthi, Sep 10 2024
It is reasonable to assume that the "comforting numbers" which John T. Williams found in Chapter 3 of Milne's book "The House at Pooh Corner" are these semiprimes. Winnie-the-Pooh wonders whether he has 14 or 15 honey pots and concludes: "It's sort of comforting." To arrange a semiprime number of honey pots in a rectangular way, let's say on a shelf, with the larger divisor parallel to the wall, there is only one solution and this is for a simple mind like Winnie-the-Pooh comforting. - Ruediger Jehn, Dec 12 2024

Examples

			From _Gus Wiseman_, May 27 2021: (Start)
The sequence of terms together with their prime factors begins:
   4 = 2*2     46 = 2*23     91 = 7*13    141 = 3*47
   6 = 2*3     49 = 7*7      93 = 3*31    142 = 2*71
   9 = 3*3     51 = 3*17     94 = 2*47    143 = 11*13
  10 = 2*5     55 = 5*11     95 = 5*19    145 = 5*29
  14 = 2*7     57 = 3*19    106 = 2*53    146 = 2*73
  15 = 3*5     58 = 2*29    111 = 3*37    155 = 5*31
  21 = 3*7     62 = 2*31    115 = 5*23    158 = 2*79
  22 = 2*11    65 = 5*13    118 = 2*59    159 = 3*53
  25 = 5*5     69 = 3*23    119 = 7*17    161 = 7*23
  26 = 2*13    74 = 2*37    121 = 11*11   166 = 2*83
  33 = 3*11    77 = 7*11    122 = 2*61    169 = 13*13
  34 = 2*17    82 = 2*41    123 = 3*41    177 = 3*59
  35 = 5*7     85 = 5*17    129 = 3*43    178 = 2*89
  38 = 2*19    86 = 2*43    133 = 7*19    183 = 3*61
  39 = 3*13    87 = 3*29    134 = 2*67    185 = 5*37
(End)
		

References

  • Archimedeans Problems Drive, Eureka, 17 (1954), 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York (1974). See p. 211.
  • 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).
  • John T. Williams, Pooh and the Philosophers, Dutton Books, 1995.

Crossrefs

Cf. A064911 (characteristic function).
Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).
These are the Heinz numbers of length-2 partitions, counted by A004526.
The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).
Including primes gives A037143.
The odd/even terms are A046315/A100484.
Partial sums are A062198.
The prime factors are A084126/A084127.
Grouping by greater factor gives A087112.
The product/sum/difference of prime indices is A087794/A176504/A176506.
Positions of even/odd terms are A115392/A289182.
The terms with relatively prime/divisible prime indices are A300912/A318990.
Factorizations using these terms are counted by A320655.
The prime indices are A338898/A338912/A338913.
Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.
The terms with even/odd weight are A338906/A338907.
The terms with odd/even prime indices are A338910/A338911.
The least/greatest term of weight n is A339114/A339115.

Programs

  • Haskell
    a001358 n = a001358_list !! (n-1)
    a001358_list = filter ((== 2) . a001222) [1..]
    
  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; 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:
    seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)
    Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ M. F. Hasler, Apr 09 2008; added select() Apr 24 2019
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrt(lim), t=p;forprime(q=p, lim\t, listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011
    
  • PARI
    A1358=List(4); A001358(n)={while(#A1358M. F. Hasler, Apr 24 2019
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 2
    print([k for k in range(1, 190) if ok(k)]) # Michael S. Branicky, Apr 30 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A001358(n):
        def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].
Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002
A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010
a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 24 2012
sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1. mu(a(n)) = ceiling(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013
mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function (A008683), Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014
a(n) = A078840(2,n). - R. J. Mathar, Jan 30 2019
A100484 UNION A046315. - R. J. Mathar, Apr 19 2023
Conjecture: a(n)/n ~ (log(n)/log(log(n)))*(1-(M/log(log(n)))) as n -> oo, where M is the Mertens's constant (A077761). - Alain Rocchelli, Feb 02 2025

Extensions

More terms from James Sellers, Aug 22 2000

A064911 If n is semiprime (or 2-almost prime) then 1 else 0.

Original entry on oeis.org

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

Views

Author

Patrick De Geest, Oct 13 2001

Keywords

Crossrefs

Programs

  • Haskell
    a064911 = a010051 . a032742 -- Reinhard Zumkeller, Mar 13 2011
    
  • Maple
    with(numtheory):
    a:= n-> `if`(bigomega(n)=2, 1, 0):
    seq(a(n), n=1..120);  # Alois P. Heinz, Mar 16 2011
  • Mathematica
    Table[If[PrimeOmega[n] == 2, 1, 0], {n, 105}] (* Jayanta Basu, May 25 2013 *)
  • PARI
    a(n)=bigomega(n)==2 \\ Charles R Greathouse IV, Mar 13 2011

Formula

a(n) = 1 iff n is in A001358 (semiprimes), a(n) = 0 iff n is in A100959 (non-semiprimes). - Reinhard Zumkeller, Nov 24 2004
Dirichlet g.f.: (primezeta(2s) + primezeta(s)^2)/2. - Franklin T. Adams-Watters, Jun 09 2006
a(n) = A057427(A174956(n)); a(n)*A072000(n) = A174956(n). - Reinhard Zumkeller, Apr 03 2010
a(n) = A010051(A032742(n)) (i.e., largest proper divisor is prime). - Reinhard Zumkeller, Mar 13 2011
From Antti Karttunen, Apr 24 2018 & Apr 22 2022: (Start)
a(n) = A280710(n) + A302048(n) = A101040(n) - A010051(n).
a(n) = A353478(n) + A353480(n) = A353477(n) + A353478(n) + A353479(n).
a(n) = A353475(n) + A353476(n).
(End)
a(n) = [Omega(n) = 2], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jul 22 2025

Extensions

Edited by M. F. Hasler, Oct 18 2017

A066265 a(n) = number of semiprimes < 10^n.

Original entry on oeis.org

0, 3, 34, 299, 2625, 23378, 210035, 1904324, 17427258, 160788536, 1493776443, 13959990342, 131126017178, 1237088048653, 11715902308080, 111329817298881, 1061057292827269, 10139482913717352, 97123037685177087, 932300026230174178, 8966605849641219022, 86389956293761485464, 833671466551239927908, 8056846659984852885191
Offset: 0

Views

Author

Patrick De Geest, Dec 10 2001

Keywords

Comments

Apart from the first nonzero term the sequence is identical to A036352. - Hugo Pfoertner, Jul 22 2003

Examples

			Below 10 there are three semiprimes: 4 (2*2), 6 (2*3) and 9 (3*3).
		

Crossrefs

Cf. A001358, A064911, A072000, A036352 (identical starting from a(2)), A220262, A292785.

Programs

  • Mathematica
    f[n_] := Sum[ PrimePi[(10^n - 1)/Prime[i]], {i, PrimePi[ Sqrt[10^n]]}] - Binomial[ PrimePi[ Sqrt[10^n]], 2]; Do[ Print[ f[n]], {n, 0, 14}] (* Robert G. Wilson v, May 16 2005 *)
    SemiPrimePi[n_] := Sum[ PrimePi[n/Prime@ i] - i + 1, {i, PrimePi@ Sqrt@ n}]; Array[ SemiPrimePi[10^# - 1] &, 14, 0] (* Robert G. Wilson v, Jan 21 2015 *)
  • PARI
    a(n)=my(s);forprime(p=2,sqrt(10^n),s+=primepi((10^n-1)\p)); s-binomial(primepi(sqrt(10^n)),2) \\ Charles R Greathouse IV, Apr 23 2012
    
  • Perl
    use Math::Prime::Util qw/:all/; use integer; sub countsp { my($k,$sum,$pc)=($[0]-1,0,1); prime_precalc(60_000_000); forprimes { $sum += prime_count($k/$) + 1 - $pc++; } int(sqrt($k)); $sum; } foreach my $n (0..16) { say "$n: ", countsp(10**$n); } # Dana Jacobsen, May 11 2014
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A066265(n): return int((-(t:=primepi(s:=isqrt(m:=10**n)))*(t-1)>>1)+sum(primepi(m//k) for k in primerange(1, s+1))) if n>1 else 3*n # Chai Wah Wu, Aug 16 2024

Formula

(1/2)*( pi(10^(n/2)) + Sum_{i=1..pi(10^n)} pi( (10^n-1)/P_i) ) = Sum_{i=1..pi(sqrt(10^n))} pi( (10^n-1)/P_i ) - binomial( pi(sqrt(10^n)), 2). - Robert G. Wilson v, May 16 2005

Extensions

More terms from Hugo Pfoertner, Jul 22 2003
a(14) from Robert G. Wilson v, May 16 2005
a(15)-a(16) from Donovan Johnson, Mar 18 2010
a(17)-a(18) from Dana Jacobsen, May 11 2014
a(19)-a(21) from Henri Lifchitz, Jul 04 2015
a(22)-a(23) from Henri Lifchitz, Nov 09 2024

A128301 Indices of squares (of primes) in the semiprimes.

Original entry on oeis.org

1, 3, 9, 17, 40, 56, 90, 114, 164, 253, 289, 404, 484, 533, 634, 783, 973, 1031, 1233, 1373, 1452, 1683, 1842, 2112, 2483, 2676, 2779, 2995, 3108, 3320, 4124, 4384, 4775, 4926, 5593, 5741, 6172, 6644, 6962, 7448, 7955, 8108, 8978, 9147, 9512, 9697, 10842
Offset: 1

Views

Author

Rick L. Shepherd, Feb 25 2007

Keywords

Comments

A001358(a(n)) = A001248(n) = A000040(n)^2.
Numbers n with property that tau(semiprime(n)) is not semiprime. - Juri-Stepan Gerasimov, Oct 15 2010

Examples

			a(4) = 17 as 49 = 7^2 = prime(4)^2, the fourth square in the semiprimes, is the seventeenth semiprime.
		

Crossrefs

Programs

  • Mathematica
    With[{sp=Select[Range[50000],PrimeOmega[#]==2&]},Flatten[Table[ Position[ sp,Prime[ n]^2],{n,Floor[Sqrt[Length[sp]]]}]]] (* Harvey P. Dale, Nov 17 2014 *)
  • PARI
    a(n)=my(s=0,i=0); n=prime(n)^2; forprime(p=2, sqrt(n), s+=primepi(n\p); i++); s - i * (i-1)/2
    \\ Charles R Greathouse IV, Apr 21 2011
    
  • Perl
    -MMath::Pari=factorint,PARI -wle 'my $c = 0; my $s = PARI 1; while (1) { ++$s; my($sp, $si) = @{factorint($s)}; next if @$sp > 2; next if $si->[0] + (@$si > 1 ? $si->[1] : 0) != 2; ++$c; print "$s => $c" if @$sp == 1}' # Hugo van der Sanden, Sep 25 2007
    
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A128301(n):
        m = prime(n)**2
        return int(sum(primepi(m//prime(k))-k+1 for k in range(1,n+1))) # Chai Wah Wu, Jul 23 2024

A120033 Number of semiprimes s such that 2^n < s <= 2^(n+1).

Original entry on oeis.org

0, 1, 1, 4, 4, 12, 20, 40, 75, 147, 285, 535, 1062, 2006, 3918, 7548, 14595, 28293, 54761, 106452, 206421, 401522, 780966, 1520543, 2962226, 5777162, 11272279, 22009839, 43006972, 84077384, 164482781, 321944211, 630487562, 1235382703
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_2(2^n) = A125527(n).

Examples

			(2^2, 2^3] there is one semiprime, namely 6. 4 was counted in the previous entry.
		

Crossrefs

Programs

A100949 Number of partitions of n into a prime and a semiprime.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 2, 0, 3, 2, 2, 1, 2, 2, 5, 1, 2, 2, 3, 2, 4, 2, 3, 3, 5, 5, 4, 1, 2, 4, 5, 2, 4, 3, 5, 6, 4, 5, 6, 3, 4, 5, 6, 5, 4, 3, 4, 4, 8, 7, 6, 4, 3, 7, 8, 6, 4, 4, 3, 10, 7, 6, 7, 4, 6, 10, 7, 6, 5, 6, 4, 7, 8, 9, 7, 5, 6, 9, 8, 9, 4, 5, 7, 8, 9, 11, 8, 4, 4, 11, 12, 10, 6, 10, 7, 13, 9, 9, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 23 2004

Keywords

Comments

Marnell conjectures that a(n) > 0 for n > 10 after analyzing "many thousands of whole numbers". I find no exceptions below 100 million. - Charles R Greathouse IV, May 04 2010

Examples

			a(21) = #{7+2*7, 11+2*5, 17+2*2} = 3.
		

References

  • Geoffrey R. Marnell, "Ten Prime Conjectures", Journal of Recreational Mathematics 33:3 (2004-2005), pp. 193-196.

Crossrefs

Programs

  • Haskell
    a100949 n = sum $ map (a010051 . (n -)) $ takeWhile (< n) a001358_list
    -- Reinhard Zumkeller, Jun 26 2013
  • Mathematica
    Table[Count[Sort/@(PrimeOmega/@IntegerPartitions[n,{2}]),{1,2}],{n,110}] (* Harvey P. Dale, Mar 25 2018 *)
  • PARI
    list(lim)=my(p=primes(primepi(lim)),sp=select(n->bigomega(n)==2, vector(lim\1,i,i)),x=O('x^(lim\1+1))+'x); concat([0,0,0,0,0], Vec(sum(i=1,#p,x^p[i])*sum(i=1,#sp,x^sp[i]))) \\ Charles R Greathouse IV, Jun 14 2013
    

Formula

A100951(n) <= A100950(n) <= a(n) <= min(A000720(n), A072000(n)).
a(n) = Sum_{i=1..floor(n/2)} A010051(i) * A064911(n-i) + A010051(n-i) * A064911(i). - Wesley Ivan Hurt, May 02 2019

A174956 0 unless n is the k-th semiprime when a(n) = k.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 03 2010

Keywords

Comments

a(A001358(n)) = n; a(A100959(n)) = 0.

Crossrefs

Cf. A049084.

Programs

  • Haskell
    import Data.List (unfoldr)
    a174956 n = a174956_list !! (fromInteger n - 1)
    a174956_list = unfoldr x (1, 1, a001358_list) where
       x (i, z, ps'@(p:ps)) | i == p = Just (z, (i + 1, z + 1, ps))
                            | i /= p = Just (0, (i + 1, z, ps'))
    -- Reinhard Zumkeller, Oct 27 2012
    
  • Mathematica
    nn = 100; With[{tbl = Table[If[PrimeOmega[n] == 2, 1, 0], {n, nn}]},
    Table[If[tbl[[i]] == 0, 0, Total[Take[tbl, i]]], {i, nn}]] (* Harvey P. Dale, Oct 13 2012 *)
  • PARI
    first(n)=my(v=List(),u=vector(n)); forprime(p=2,n\2, forprime(q=2,min(p,n\p), listput(v,p*q))); v=Set(v); for(i=1,#v, u[v[i]]=i); u \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n) = A064911(n)*A072000(n).

A125527 Number of semiprimes <= 2^n.

Original entry on oeis.org

0, 1, 2, 6, 10, 22, 42, 82, 157, 304, 589, 1124, 2186, 4192, 8110, 15658, 30253, 58546, 113307, 219759, 426180, 827702, 1608668, 3129211, 6091437, 11868599, 23140878, 45150717, 88157689, 172235073, 336717854, 658662065, 1289149627, 2524532330
Offset: 1

Views

Author

Robert G. Wilson v, Dec 29 2006

Keywords

Crossrefs

Programs

  • Mathematica
    SemiPrimePi[n_] := Sum[ PrimePi[ n/Prime@i] - i + 1, {i, PrimePi@ Sqrt@n}]; Table[ SemiPrimePi[2^n], {n, 47}]
  • PARI
    a(n)=my(s,i,N=2^n); forprime(p=2, sqrtint(N), s+=primepi(N\p); i++); s - i * (i-1)/2 \\ Charles R Greathouse IV, May 12 2013
    
  • Perl
    use ntheory ":all"; print "$ ",semiprime_count(1 << $),"\n" for 1..48; # Dana Jacobsen, Sep 10 2018

Formula

a(n) = A072000(2^n). - R. J. Mathar, Aug 26 2011

A113877 Semiprimes to semiprime powers.

Original entry on oeis.org

256, 1296, 4096, 6561, 10000, 38416, 46656, 50625, 194481, 234256, 262144, 390625, 456976, 531441, 1000000, 1048576, 1185921, 1336336, 1500625, 2085136, 2313441, 4477456, 5764801, 6765201, 7529536, 9150625, 10077696, 10556001, 11316496, 11390625, 14776336
Offset: 1

Views

Author

Jonathan Vos Post, Jan 27 2006

Keywords

Comments

This is the semiprime analog of A053810.

Examples

			a(1) = 256 = 4^4 = semiprime(1)^semiprime(1).
a(2) = 1296 = 6^4 = semiprime(2)^semiprime(1).
a(3) = 4096 = 4^6 = semiprime(1)^semiprime(2).
a(4) = 6561 = 9^4 = semiprime(3)^semiprime(1).
a(5) = 10000 = 10^4.
		

Crossrefs

Programs

  • Mathematica
    lim = 10^8; s = Select[Range[lim^(1/4)], Total[Transpose[FactorInteger[#]][[2]]] == 2 &]; t = {}; j = 1; While[b = s[[j]]; i = 1; While[a = s[[i]]; e = a^b; If[e <= lim, AppendTo[t, e]]; e < lim && i < Length[s], i++]; i > 1, j++]; t = Union[t] (* T. D. Noe, Jun 05 2013 *)
  • PARI
    is(n)=my(b,e=ispower(n,,&b),o); if(e==0,return(0)); o=bigomega(e); (o==2 && bigomega(b)==2) || (e%2==0 && o==3 && isprime(b)) \\ Charles R Greathouse IV, Jun 05 2013
    
  • PARI
    list(lim)=my(v=List());for(e=4,log(lim\=1+.5)\log(4), if(bigomega(e)!=2, next); for(b=4,(lim+.5)^(1/e), if(bigomega(b)==2, listput(v,b^e)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 05 2013
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, factorint
    def A113877(n):
        def A072000(n): return int(-((t:=primepi(s:=isqrt(n)))*(t-1)>>1)+sum(primepi(n//p) for p in primerange(s+1)))
        def f(x): return int(n+x-sum(A072000(integer_nthroot(x, p)[0]) for p in range(4,x.bit_length()) if sum(factorint(p).values())==2))
        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,n,n) # Chai Wah Wu, Sep 12 2024

Formula

{a(n)} = {a^b where a and b are elements of A001358}.
{a(n)} = {(p*q)^(r*s) = (p^(r*s))*(q^r*s) for distinct primes p, q, r, s} UNION {(p*q)^(p*r) = (p^(p*r))*(q^(p*r)) for distinct primes p, q, r} UNION {(p*q)^(r*r) = (p^(r^2))*(q^(r^2)) for distinct primes p, q, r} UNION {(p*q)^(p*q)= (p^(p*q))*(q^(p*q)) for distinct primes p, q} UNION {(p^2)^(p^2) = p^(2*(p^2)) for prime p}.
a(n) ~ (n log n/log log n)^4. - Charles R Greathouse IV, Jun 05 2013

Extensions

Terms corrected by Charles R Greathouse IV, Jun 05 2013
Showing 1-10 of 34 results. Next