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 31-40 of 53 results. Next

A091538 Triangle built from m-primes as columns.

Original entry on oeis.org

1, 0, 2, 0, 3, 4, 0, 5, 6, 8, 0, 7, 9, 12, 16, 0, 11, 10, 18, 24, 32, 0, 13, 14, 20, 36, 48, 64, 0, 17, 15, 27, 40, 72, 96, 128, 0, 19, 21, 28, 54, 80, 144, 192, 256, 0, 23, 22, 30, 56, 108, 160, 288, 384, 512, 0, 29, 25, 42, 60, 112, 216, 320, 576, 768, 1024
Offset: 0

Views

Author

Wolfdieter Lang, Feb 13 2004

Keywords

Comments

m-primes (also called m-almost primes) are the numbers which have precisely m prime factors counting multiple factors. 1 is included as 0-prime.
The number N>=1 appears in column no. m = A001222(N).

Examples

			From _Michael De Vlieger_, May 24 2017: (Start)
Chart a(n,m) read by antidiagonals:
  n | m ->
  ------------------------------------------------
  0 |    1     0     0     0     0     0     0 ... (A000007)
  1 |    2     3     5     7    11    13    17     (A000040)
  2 |    4     6     9    10    14    15    21     (A001358)
  3 |    8    12    18    20    27    28    30     (A014612)
  4 |   16    24    36    40    54    56    60     (A014613)
  5 |   32    48    72    80   108   112   120     (A014614)
  6 |   64    96   144   160   216   224   240     (A046306)
  7 |  128   192   288   320   432   448   480     (A046308)
  8 |  256   384   576   640   864   896   960     (A046310)
       ...
Triangle begins:
  0 |    1
  1 |    0    2
  2 |    0    3    4
  3 |    0    5    6    8
  4 |    0    7    9   12   16
  5 |    0   11   10   18   24   32
  6 |    0   13   14   20   36   48    64
  7 |    0   17   15   27   40   72    96   128
  8 |    0   19   21   28   54   80   144   192   256
       ...
(End)
		

Crossrefs

The column sequences (without leading zeros) are: A000007, A000040 (primes), A001358, A014612-4, A046306, A046308, A046310, A046312, A046314, A069272-A069281 for m=0..20, respectively.
A078840 is this table with the zeros omitted.

Programs

  • Mathematica
    With[{nn = 11}, Function[s, Function[t, Table[Function[m, If[m == 1, Boole[k == 1], t[[m, k]]]][n - k + 1], {n, nn}, {k, n, 1, -1}]]@ Map[Position[s, #][[All, 1]] &, Range[0, nn]]]@ PrimeOmega@ Range[2^nn]] (* or *)
    a = {1}; Do[Block[{r = {Prime@ n}}, Do[AppendTo[r, SelectFirst[ Range[a[[-(n - i)]] + 1, 2^n], PrimeOmega@ # == i &]], {i, 2, n - 1}]; a = Join[a, {0}, If[n == 1, {}, r], {2^n}]], {n, 11}]; a (* Michael De Vlieger, May 24 2017 *)
  • Python
    from math import isqrt, comb, prod
    from sympy import prime, primerange, integer_nthroot, primepi
    def A091538(n):
        a = (m:=isqrt(k:=n+1<<1))+(k>m*(m+1))
        r = n-comb(a,2)
        w = a-r
        if r==0: return int(w==1)
        if r==1: return prime(w)
        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 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(w+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,r)))
        return bisection(f,w,w) # Chai Wah Wu, Jun 11 2025

Formula

For n>=m>=1: a(n, m)= (n-m+1)-th member in the strictly monotonically increasing sequence of numbers N satisfying: N=product(p(k)^(e_k), k=1..) with p(k) := A000040(k) (k-th prime) such that sum(e_k, k=1..) = m, where the e_k are nonnegative. if m=0 : a(n, 0)=1 if n=0 else 0. If n

A120038 Number of 7-almost primes 7ap such that 2^n < 7ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 46, 99, 224, 461, 1013, 2093, 4459, 9388, 19603, 40946, 85087, 177200, 366248, 758686, 1565038, 3226717, 6641105, 13648299, 28018956, 57445770, 117667693, 240751326, 492172466, 1005221914, 2051468099
Offset: 0

Author

Keywords

Comments

The partial sum equals the number of Pi_7(2^n).

Examples

			(2^7, 2^8] there is one semiprime, namely 192. 128 was counted in the previous entry.
		

Programs

  • 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 *)
    t = Table[AlmostPrimePi[7, 2^n], {n, 0, 30}]; Rest@t - Most@t

A113739 Pierpont 7-almost primes. 7-almost primes of form (2^K)*(3^L)+1.

Original entry on oeis.org

339738625, 10460353204, 83682825625, 669462604993, 2641807540225, 3761479876609, 7625597484988, 18075490334785, 35184372088833, 481469424205825, 488038239039169, 570630428688385, 1125899906842625
Offset: 1

Author

Jonathan Vos Post, Nov 08 2005

Keywords

Examples

			a(1) = 339738625 = (2^22)*(3^4)+1 = 5 * 5 * 5 * 17 * 29 * 37 * 149.
a(2) = 10460353204 = (2^0)*(3^21)+1 = 2 * 2 * 7 * 7 * 43 * 547 * 2269.
a(3) = 83682825625 = (2^3)*(3^21)+1 = 5 * 5 * 5 * 5 * 7 * 631 * 30313.
a(4) = 669462604993 = (2^6)*(3^21)+1 = 7 * 13 * 19 * 31 * 67 * 277 * 673.
a(7) = 7625597484988 = (2^0)*(3^27)+1 = 2 * 2 * 7 * 19 * 37 * 19441 * 19927.
a(9) = 35184372088833 = (2^45)*(3^0)+1 = 3 * 3 * 3 * 11 * 19 * 331 * 18837001.
a(13) = 1125899906842625 = (2^50)*(3^0)+1 = 5 * 5 * 5 * 41 * 101 * 8101 * 268501.
a(16) = 5559060566555524 = (2^0)*(3^33)+1 = 2 * 2 * 7 * 67 * 661 * 25411 * 176419.
a(28) = 9223372036854775809 = (2^63)*(3^0)+1 = 3 * 3 * 3 * 19 * 43 * 5419 * 77158673929.
		

Crossrefs

Intersection of A046308 and A055600.
A005109 gives the Pierpont primes, which are primes of the form (2^K)*(3^L)+1.
A113432 gives the Pierpont semiprimes, 2-almost primes of the form (2^K)*(3^L)+1.
A112797 gives the Pierpont 3-almost primes, of the form (2^K)*(3^L)+1.
A111344 gives the Pierpont 4-almost primes, of the form (2^K)*(3^L)+1.
A111345 gives the Pierpont 5-almost primes, of the form (2^K)*(3^L)+1.
A111346 gives the Pierpont 6-almost primes, of the form (2^K)*(3^L)+1.
A113740 gives the Pierpont 8-almost primes, of the form (2^K)*(3^L)+1.
A113741 gives the Pierpont 9-almost primes, of the form (2^K)*(3^L)+1.

Programs

  • PARI
    list(lim)=my(v=List(), L=lim\1-1); for(e=0, logint(L, 3), my(t=3^e); while(t<=L, if(bigomega(t+1)==7, listput(v, t+1)); t*=2)); Set(v) \\ Charles R Greathouse IV, Feb 01 2017

Formula

a(n) is in this sequence iff there exist nonnegative integers K and L such that Omega((2^K)*(3^L)+1) = 7.

Extensions

Extended by Ray Chandler, Nov 08 2005

A046333 Palindromes with exactly 7 prime factors (counted with multiplicity).

Original entry on oeis.org

27872, 27972, 29592, 42224, 57375, 63336, 63536, 65056, 67176, 80208, 80608, 80808, 82128, 82728, 83538, 84048, 84348, 86768, 88088, 88288, 232232, 238832, 259952, 279972, 401104, 409904, 414414, 420024, 424424, 441144, 443344, 444444
Offset: 1

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

A125149 a(n) is the least k such that the n-almost prime count is positive and equal to the (n-1)-almost prime count. a(0) = 1.

Original entry on oeis.org

1, 2, 10, 15495, 151165506066
Offset: 0

Author

Keywords

Comments

Unlike any of the prime number races in which any particular form may lead or trail, this sequence demonstrates that although the count of numbers having k prime factors begins by trailing the count for k-1 prime factors, eventually they exchange positions in the race. This can be seen by looking at A126279 or A126280.
The fundamental theorem of arithmetic, or unique factorization theorem, states that every natural number greater than 1 either is itself a prime number, or can be written as a unique product of prime numbers. It had a proof sketched by Euclid, then corrected and completed in "Disquisitiones Arithmeticae" [Carl Friedrich Gauss, 1801]. It fails in many rings of algebraic integers [Ernst Kummer, 1843], a discovery initiating algebraic number theory. Counting the elements in the unique product of prime numbers classifies natural numbers into primes, semiprimes, 3-almost primes and so on. This sequence quantifies a previously undescribed structure to that classification.
We took the first k where the two relevant counts are the same. If instead we took the least k such that the n-almost prime count from k onwards exceeds the (n-1)-almost prime count, the sequence would begin: 3, 34, 15530, ... [see A180126].
The prime count and the semiprime count are identical for 1, 10, 15, 16, 22, 25, 29, 30, 33.
The semiprime count and the 3-almost prime count are identical for 1, 2, 3, 15495, 15496, 15497, 15498, 15508, 15524, 15525, 15529.
The numbers of 3-almost primes and 4-almost primes are equal at 151165506066 and 731 larger numbers, the last one being 151165607041. See A180126. - T. D. Noe, Aug 11 2010
Landau's asymptotic formula suggests that a(n) is about exp(exp(n-1)). - Charles R Greathouse IV, Mar 14 2011

Examples

			a(1) = 2 since 1 has no prime factors and 2 has one prime factor, therefore prime factor counts of 0 and 1 occur equally often in the first 2 integers.
a(2) = 10 since there are 4 primes {2, 3, 5 & 7} and 4 semiprimes {4, 6, 9 & 10} less than or equal to 10.
a(4) = 151165506066 since there are 32437255807 4-almost primes and 3-almost primes <= a(4).
		

Crossrefs

Sequences listing r-almost primes, that is, k such that A001222(k) = r: A000040 (r = 1), A001358 (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).
Cf. A180126.

Programs

  • 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 *)
    f[n_] := Block[{k = 2^n}, While[AlmostPrimePi[n, k] < AlmostPrimePi[n - 1, k], k++ ]; k];

Extensions

Changed 33 to 34 in a comment. - T. D. Noe, Aug 11 2010
Edited by Peter Munn, Dec 17 2022

A046307 Numbers that are divisible by at least 7 primes (counted with multiplicity).

Original entry on oeis.org

128, 192, 256, 288, 320, 384, 432, 448, 480, 512, 576, 640, 648, 672, 704, 720, 768, 800, 832, 864, 896, 960, 972, 1008, 1024, 1056, 1080, 1088, 1120, 1152, 1200, 1216, 1248, 1280, 1296, 1344, 1408, 1440, 1458, 1472, 1512, 1536, 1568, 1584, 1600, 1620
Offset: 1

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Cf. A046308.

Programs

  • Mathematica
    Select[Range[2000],PrimeOmega[#]>6&] (* Harvey P. Dale, Nov 16 2012 *)
  • PARI
    is(n)=bigomega(n)>6 \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A046307(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+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,7)))
        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

Product p_i^e_i with Sum e_i >= 7.

A046320 Odd numbers divisible by exactly 7 primes (counted with multiplicity).

Original entry on oeis.org

2187, 3645, 5103, 6075, 8019, 8505, 9477, 10125, 11907, 12393, 13365, 13851, 14175, 15795, 16767, 16875, 18711, 19845, 20655, 21141, 22113, 22275, 22599, 23085, 23625, 26325, 26973, 27783, 27945, 28125, 28917, 29403, 29889, 31185
Offset: 1

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Cf. A046308.

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

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).
		

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

A114635 Numbers k such that the k-th octagonal number is 7-almost prime.

Original entry on oeis.org

24, 30, 32, 38, 48, 66, 72, 78, 90, 94, 104, 110, 112, 114, 120, 136, 140, 154, 164, 166, 168, 176, 180, 190, 204, 206, 208, 210, 220, 222, 228, 238, 248, 254, 276, 280, 284, 286, 290, 300, 306, 312, 326, 338, 344
Offset: 1

Author

Jonathan Vos Post, Feb 18 2006

Keywords

Comments

It is necessary but not sufficient that k must be prime (A000040), semiprime (A001358), 3-almost prime (A014612), 4-almost prime (A014613), 5-almost prime (A014614), or 6-almost prime (A046308).

Examples

			a(1) = 24 because OctagonalNumber(24) = Oct(24) = 24*(3*24-2) = 96 = 1680 = 2^4 * 3 * 5 * 7 has exactly 7 prime factors (four are all equally 2; factors need not be distinct).
a(2) = 30 because Oct(30) = 30*(3*30-2) = 2640 = 2^4 * 3 * 5 * 11 is 7-almost prime.
a(3) = 32 because Oct(32) = 32*(3*32-2) = 3008 = 2^6 * 47 is 7-almost prime.
		

Programs

  • Mathematica
    Select[Range[400],PrimeOmega[PolygonalNumber[8,#]]==7&] (* Harvey P. Dale, Aug 13 2021 *)

Formula

Numbers k such that k*(3*k-2) has exactly seven prime factors (with multiplicity).
Numbers k such that A000567(k) is a term of A046308.
Numbers k such that A001222(A000567(k)) = 7.
Numbers k such that A001222(k) + A001222(3*k-2) = 7.
Numbers k such that [(3*k-2)*(3*k-1)*(3*k)]/[(3*k-2)+(3*k-1)+(3*k)] is a term of A046308.

A114636 Numbers k such that the k-th octagonal number is 8-almost prime.

Original entry on oeis.org

22, 70, 80, 84, 102, 108, 118, 126, 134, 160, 174, 184, 200, 230, 240, 250, 252, 262, 264, 272, 318, 330, 334, 336, 350, 368, 378, 400, 408, 420, 430, 434, 444, 450, 454, 459, 462, 464, 484, 494, 500, 502, 510, 518, 520, 522, 540, 560, 564, 566, 570, 574, 582
Offset: 1

Author

Jonathan Vos Post, Feb 18 2006

Keywords

Comments

It is necessary but not sufficient that k must be prime (A000040), semiprime (A001358), 3-almost prime (A014612), 4-almost prime (A014613), 5-almost prime (A014614), 6-almost prime (A046306), or 7-almost prime (A046308).

Examples

			a(1) = 22 because OctagonalNumber(22) = Oct(22) = 22*(3*22-2) = 1408 = 2^7 * 11 has exactly 8 prime factors (seven are all equally 2; factors need not be distinct).
a(2) = 70 because Oct(70) = 70*(3*70-2) = 14560 = 2^5 * 5 * 7 * 13 is 8-almost prime.
a(3) = 80 because Oct(80) = 80*(3*80-2) = 19040 = 2^5 * 5 * 7 * 17.
		

Programs

  • Mathematica
    Select[Range[400],PrimeOmega[PolygonalNumber[8,#]]==8&] (* Harvey P. Dale, Aug 31 2020 *)

Formula

Numbers k such that k*(3*k-2) has exactly eight prime factors (with multiplicity).
Numbers k such that A000567(k) is a term of A046310.
Numbers k such that A001222(A000567(k)) = 8.
Numbers k such that A001222(k) + A001222(3*k-2) = 8.
Numbers k such that [(3*k-2)*(3*k-1)*(3*k)]/[(3*k-2)+(3*k-1)+(3*k)] is a term of A046310.
Previous Showing 31-40 of 53 results. Next