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

A101695 a(n) = n-th n-almost prime.

Original entry on oeis.org

2, 6, 18, 40, 108, 224, 480, 1296, 2688, 5632, 11520, 25600, 53248, 124416, 258048, 540672, 1105920, 2228224, 4587520, 9830400, 19922944, 40894464, 95551488, 192937984, 396361728, 822083584, 1660944384, 3397386240, 6845104128
Offset: 1

Views

Author

Jonathan Vos Post, Dec 12 2004

Keywords

Comments

A k-almost-prime is a positive integer that has exactly k prime factors, counted with multiplicity.
This is the diagonalization of the set of sequences {j-almost prime(k)}. The cumulative sums of this sequence are in A101696. This is the diagonal just below A078841.

Examples

			a(1) = first 1-almost prime = first prime = A000040(1) = 2.
a(2) = 2nd 2-almost prime = 2nd semiprime = A001358(2) = 6.
a(3) = 3rd 3-almost prime = A014612(3) = 18.
a(4) = 4th 4-almost prime = A014613(4) = 40.
a(5) = 5th 5-almost prime = A014614(5) = 108.
		

Crossrefs

Programs

  • Maple
    A101695 := proc(n)
        local s,a ;
        s := 0 ;
        for a from 2^n do
            if numtheory[bigomega](a) = n then
                s := s+1 ;
                if s = n then
                    return a;
                end if;
            end if;
        end do:
    end proc: # R. J. Mathar, Aug 09 2012
  • Mathematica
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    AlmostPrime[k_, n_] := Block[{e = Floor[ Log[2, n] + k], a, b}, a = 2^e; Do[b = 2^p; While[ AlmostPrimePi[k, a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; AlmostPrime[1, 1] = 2; lst = {}; Do[ AppendTo[lst, AlmostPrime[n, n]], {n, 30}]; lst (* Robert G. Wilson v, Oct 07 2007 *)
  • Python
    from math import prod, isqrt
    from sympy import primerange, primepi, integer_nthroot
    def A101695(n):
        if n == 1: return 2
        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-1+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n)))
        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

Conjecture: lim_{ n->inf.} a(n+1)/a(n) = 2. - Robert G. Wilson v, Oct 07 2007, Nov 13 2007
Stronger conjecture: a(n)/(n * 2^n) is polylogarithmic in n. That is, there exist real numbers b < c such that (log n)^b < a(n)/(n * 2^n) < (log n)^c for large enough n. Probably b and c can be chosen close to 0. - Charles R Greathouse IV, Aug 28 2012

Extensions

a(21)-a(30) from Robert G. Wilson v, Feb 11 2006
a(12) corrected by N. J. A. Sloane, Nov 23 2007

A101696 a(n) = sum(i=1,n)(i-th i-almost prime). Cumulative sums of A101695.

Original entry on oeis.org

2, 8, 26, 66, 174, 398, 878, 2174, 4862, 10494, 22014, 45054, 98302, 222718, 480766, 1021438, 2127358, 4355582, 8943102, 18773502, 38696446, 79590910, 175142398, 368080382, 764442110, 1586525694, 3247470078, 6644856318, 13489960446
Offset: 1

Views

Author

Jonathan Vos Post, Dec 12 2004, Sep 28 2006

Keywords

Comments

It seems that this sum can never be a prime after a(1) = 2, since the n-th n-almost prime is always even. The number of prime factors (with multiplicity) of a(n) is 1, 3, 2, 3, 3, 2, 2, 2, 4, 5, 4, 4, 3, 3, 5, 4, 3, 4, 7, 4, 2, 5, 5, 2, 3, 7, 4, 3, 4.
This is the diagonalization of the set of sequences {j-almost prime(k)}. The cumulative sums of this sequence are in A101696. a(1)=2 is prime. a(2)=8 is a 3-almost prime. a(3)=26 is a semiprime. a(4)=66 is a 3-almost prime. a(5)= 174 is a 3-almost prime. a(6)=398 is a semiprime. a(7)=878 is a semiprime. a(8)=2174 is a semiprime. a(9)=4862 is a 4-almost prime. a(10)=10494 is a 5-almost prime. a(11)=22014 is a 4-almost prime. a(12)=45054 is a 3-almost prime. a(13)=98302 is a 3-almost prime. a(14)=222718 is a 3-almost prime. a(15)=480766 is a 5-almost prime. a(16)=1021438 is a 4-almost prime. a(17)=2127358 is a 3-almost prime. a(18)=4355582 is a 4-almost prime. a(19)=8943102 is a 7-almost prime. a(20)=18773502 is a 4-almost prime. 21-almost numbers are not yet listed in the OEIS.

Examples

			a(1) = first 1-almost prime = first prime = A000040(1) = 2.
a(2) = 2 + 2nd 2-almost prime = 2 + A001358(2) = 2+ 6 = 8.
a(3) = a(2) + 3rd 3-almost prime = 8+A014612(3) = 8+18 = 26.
a(4) = a(3) + 4th 4-almost prime = 26+A014613(4) = 26+40 = 66.
a(5) = a(4) + 5th 5-almost prime = 66+A014614(5) = 66+108=174.
...
a(12) = a(11) + 12th 12-almost prime = 22014 + 23040 = 45054 (the first nontrivial palindrome in the sequence).
		

Crossrefs

Formula

a(1) = first 1-almost prime = first prime = A000040(1). a(2) = a(1) + 2nd 2-almost prime = a(1) + 2nd semiprime = A000040(1)+A001358(2). a(3) = a(2) + 3rd 3-almost prime = a(2) + A014612(3). a(4) = a(3) + 4th 4-almost prime = a(3) + A014613(4)... a(n) = a(n-1) + n-th n-almost prime.

Extensions

Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A321379 Number of ways to write n as n = a*b*c*d with 1 < a <= b <= c <= d < n.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Nov 08 2018

Keywords

Comments

This sequence is different from A101638.
If p is prime, a(p^k) = A026810(k). - Robert Israel, Nov 08 2018

Examples

			16 = 2*2*2*2. So a(16) = 1.
24 = 2*2*2*3. So a(24) = 1.
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N):
    for a from 2 to floor(N^(1/4)) do
      for b from a to floor((N/a)^(1/3)) do
        for c from b to floor((N/a/b)^(1/2)) do
          for d from c to N/(a*b*c) do
            V[a*b*c*d]:= V[a*b*c*d]+1
    od od od od:
    convert(V,list); # Robert Israel, Nov 08 2018

A123118 Partial products of A101695.

Original entry on oeis.org

2, 12, 216, 8640, 933120, 209018880, 100329062400, 130026464870400, 349511137571635200, 1968446726803449446400, 22676506292775737622528000, 522466704985552994823045120000, 27820307107070725868337506549760000
Offset: 1

Views

Author

Jonathan Vos Post, Sep 28 2006

Keywords

Comments

The number of prime factors (with multiplicity) of a(n) is T(n) = A000217(n) = n*(n+1)/2.

Examples

			a(1) = 2 = prime(1).
a(2) = 12 = 2 * 6 = prime(1) * semiprime(2) = 2^2 * 3.
a(3) = 216 = 2 * 6 * 18 = prime(1) * semiprime(2) * 3-almostprime(3) = 2^3 * 3^3.
a(4) = 8640 = 2 * 6 * 18 * 40 = prime(1) * semiprime(2) * 3-almostprime(3) * 4-almostprime(4) = 2^6 * 3^3 * 5.
a(15) = 893179304874387947794472921245209518407680000 = 2 * 6 * 18 * 40 * 108 * 224 * 480 * 1296 * 2688 * 5632 * 11520 * 23040 * 53248 * 124416 * 258048 = 2^88 * 3^23 * 5^4 * 7^3 * 11 * 13.
		

Crossrefs

Formula

a(n) = Prod[i=1..n] i-th i-almost prime = Prod[i=1..n] A101695(i).
Previous Showing 11-14 of 14 results.