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

A101638 Number of distinct 4-almost primes A014613 which are factors of 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, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1
Offset: 1

Views

Author

Jonathan Vos Post, Dec 10 2004

Keywords

Comments

This is the inverse Moebius transform of A101637. If we take the prime factorization of n = (p1^e1)*(p2^e2)* ... * (pj^ej) then a(n) = |{k: ek>=4}| + ((j-1)/2)*|{k: ek>=3}| + C(|{k: ek>=2}|,2) + C(j,4). The first term is the number of distinct 4th powers of primes in the factors of n (the first way of finding a 4-almost prime). The second term is the number of distinct cubes of primes, each of which can be multiplied by any of the other distinct primes, halved to avoid double-counts (the second way of finding a 4-almost prime). The third term is the number of distinct pairs of squares of primes in the factors of n (the third way of finding a 4-almost prime). The 4th term is the number of distinct products of 4 distinct primes, which is the number of combinations of j primes in the factors of n taken 4 at a time, A000332(j), (the 4th way of finding a 4-almost prime).

Examples

			a(96) = 2 because 96 = 16 * 6 hence divisible by the 4-almost prime 16 and also 96 = 24 * 4 hence divisible by the 4-almost prime 24.
		

References

  • Hardy, G. H. and Wright, E. M. Section 17.10 in An Introduction to the Theory of Numbers, 5th ed. Oxford, England: Clarendon Press, 1979.

Crossrefs

Programs

  • PARI
    a(n)=my(f=factor(n)[,2], v=apply(k->sum(i=1,#f,f[i]>k), [0..3])); v[4] + v[3]*(v[1]-1) + binomial(v[2],2) + v[2]*binomial(v[1]-1,2) + binomial(v[1],4) \\ Charles R Greathouse IV, Sep 14 2015

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

A180150 Numbers n such that n and n+2 are both divisible by exactly 4 primes (counted with multiplicity).

Original entry on oeis.org

54, 88, 150, 196, 232, 248, 294, 306, 328, 340, 342, 348, 460, 488, 490, 568, 570, 664, 712, 738, 774, 850, 856, 858, 868, 870, 948, 1012, 1014, 1060, 1096, 1110, 1148, 1190, 1204, 1206, 1208, 1210, 1218, 1254, 1274, 1276, 1290, 1302, 1314, 1420, 1430, 1448
Offset: 1

Views

Author

Jonathan Vos Post, Aug 12 2010

Keywords

Comments

"Quadruprimes" or "4-almost primes" that keep that property when incremented by 2. This sequence is to 4 as 3 is to A180117, as A092207 is to 2, and as A001359 is to 1. That is, this sequence is the 4th row of the infinite array A[k,n] = n-th natural number m such that m and m+2 are both divisible by exactly k primes (counted with multiplicity). The first row is the lesser of twin primes. The second row is the sequence such that m and m+2 are both semiprimes.

Examples

			a(1) = 54 because 54 = 2 * 3^3 is divisible by exactly 4 primes (counted with multiplicity), and so is 54+2 = 56 = 2^3 * 7.
		

Crossrefs

Cf. A000040, A001222, A001358, A014614, A033987, A101637, A114106 (number of 4-almost primes <= 10^n).

Programs

Formula

{m in A014613 and m+2 in A014613} = {m such that bigomega(m) = bigomega(m+2) = 4} = {m such that A001222(m) = A001222(m+2) = 4}.

Extensions

More terms from R. J. Mathar, Aug 13 2010

A082996 a(n) = card{ x <= n : bigomega(x) = 4 }.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, May 30 2003

Keywords

Crossrefs

Partial sums of A101637.

Programs

  • PARI
    a(n)=sum(i=1,n,bigomega(i)==4)
    
  • PARI
    a(n)=my(j,s);forprime(p=2,(n+.5)^(1/4),forprime(q=p,(n/p+.5)^(1/3),j=primepi(q)-2;forprime(r=q,sqrtint(n\(p*q)),s+=primepi(n\(p*q*r))-j++)));s \\ Charles R Greathouse IV, Mar 21 2012
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A082996(n): return int(sum(primepi(n//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(n,4)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(n//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(n//(k*m))+1),b))) # Chai Wah Wu, Mar 29 2025

Formula

a(n) ~ (1/6)*(n/log(n))*log(log(n))^3.

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

A180151 Numbers k such that k and k + 2 are both divisible by exactly five primes (counted with multiplicity).

Original entry on oeis.org

270, 592, 700, 750, 918, 1168, 1240, 1638, 1648, 1672, 1710, 1750, 2070, 2310, 2392, 2548, 2550, 2608, 2728, 2860, 2862, 2896, 2898, 3184, 3330, 3568, 3630, 3822, 3848, 3850, 3942, 3976, 4230, 4264, 4648, 4662, 5070, 5080, 5236, 5238, 5390, 5550, 5560
Offset: 1

Views

Author

Jonathan Vos Post, Aug 12 2010

Keywords

Comments

"5-almost primes" that keep that property when incremented by 2. This sequence is to 5 as 4 is to A180150, as 3 is to A180117, as A092207 is to 2, and as A001359 is to 1. That is, this sequence is the 5th row of the infinite array A[k,n] = n-th natural number m such that m and m+2 are both divisible by exactly k primes (counted with multiplicity). The first row is the lesser of twin primes. The second row is the sequence such that m and m+2 are both semiprimes.

Examples

			a(1) = 270 because 270 = 2 * 3^3 * 5 is divisible by exactly 5 primes (counted with multiplicity), and so is 270+2 = 272 = 2^4 * 17.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (Last@# & /@ FactorInteger@n); fQ[n_] := f[n] == 5 == f[n + 2]; Select[ Range@ 10000, fQ] (* Robert G. Wilson v, Aug 15 2010 *)
  • PARI
    for(x=2,10^4,if(bigomega(x)==5&&bigomega(x+2)==5,print1(x", "))) \\ Zak Seidov, Aug 12 2010

Formula

{m in A014614 and m+2 in A014614} = {m such that bigomega(m) = bigomega(m+2) = 5} = {m such that A001222(m) = A001222(m+2) = 5}.

Extensions

Corrected and extended by Zak Seidov and R. J. Mathar, Aug 12 2010

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