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

A116428 The number of n-almost primes less than or equal to 8^n, starting with a(0)=1.

Original entry on oeis.org

1, 4, 22, 125, 669, 3410, 16677, 78369, 359110, 1612613, 7133274, 31185350, 135062165, 580556958, 2480278767, 10542976739, 44626102826, 188215850830, 791374442571, 3318478309647, 13882441625034, 57952990683107
Offset: 0

Views

Author

Robert G. Wilson v, Feb 14 2006

Keywords

Crossrefs

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}]]]]];
    Table[ AlmostPrimePi[n, 8^n], {n, 14}] (* Eric W. Weisstein, Feb 07 2006 *)
  • PARI
    almost_prime_count(N, k) = if(k==1, return(primepi(N))); (f(m, p, k, j=0) = my(c=0, s=sqrtnint(N\m, k)); if(k==2, forprime(q=p, s, c += primepi(N\(m*q))-j; j += 1), forprime(q=p, s, c += f(m*q, q, k-1, j); j += 1)); c); f(1, 2, k);
    a(n) = if(n == 0, 1, almost_prime_count(8^n, n)); \\ Daniel Suteu, Jul 10 2023

Extensions

a(15)-a(18) from Donovan Johnson, Oct 01 2010
a(19)-a(21) from Daniel Suteu, Jul 10 2023

A116429 The number of n-almost primes less than or equal to 9^n, starting with a(0)=1.

Original entry on oeis.org

1, 4, 26, 181, 1095, 6416, 35285, 187929, 973404, 4934952, 24628655, 121375817, 592337729, 2868086641, 13798982719, 66043675287, 314715355786, 1494166794434, 7071357084444, 33374079939405
Offset: 0

Views

Author

Robert G. Wilson v, Feb 10 2006

Keywords

Crossrefs

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 *)
    Table[ AlmostPrimePi[n, 9^n], {n, 13}]
  • PARI
    almost_prime_count(N, k) = if(k==1, return(primepi(N))); (f(m, p, k, j=0) = my(c=0, s=sqrtnint(N\m, k)); if(k==2, forprime(q=p, s, c += primepi(N\(m*q))-j; j += 1), forprime(q=p, s, c += f(m*q, q, k-1, j); j += 1)); c); f(1, 2, k);
    a(n) = if(n == 0, 1, almost_prime_count(9^n, n)); \\ Daniel Suteu, Jul 10 2023

Extensions

a(14)-a(16) from Donovan Johnson, Oct 01 2010
a(16) corrected and a(17)-a(19) from Daniel Suteu, Jul 10 2023

A116431 The number of n-almost primes less than or equal to 12^n, starting with a(0)=1.

Original entry on oeis.org

1, 5, 48, 434, 3695, 29165, 218283, 1569995, 10950776, 74621972, 499495257, 3297443264, 21533211312, 139411685398, 896352197825, 5730605551626, 36465861350230
Offset: 0

Views

Author

Robert G. Wilson v, Feb 10 2006

Keywords

Crossrefs

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 *)
    Table[ AlmostPrimePi[n, 12^n], {n, 12}]
  • PARI
    almost_prime_count(N, k) = if(k==1, return(primepi(N))); (f(m, p, k, j=0) = my(c=0, s=sqrtnint(N\m, k)); if(k==2, forprime(q=p, s, c += primepi(N\(m*q))-j; j += 1), forprime(q=p, s, c += f(m*q, q, k-1, j); j += 1)); c); f(1, 2, k);
    a(n) = if(n == 0, 1, almost_prime_count(12^n, n)); \\ Daniel Suteu, Jul 10 2023
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A116431(n):
        if n<=1: return 4*n+1
        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)))
        return int(sum(primepi(12**n//prod(c[1] for c in a))-a[-1][0] for a in g(12**n,0,1,1,n))) # Chai Wah Wu, Sep 28 2024

Extensions

a(13)-a(14) from Donovan Johnson, Oct 01 2010
a(15)-a(16) from Daniel Suteu, Jul 10 2023

A116432 The number of n-almost primes less than or equal to e^n, starting with a(0)=1.

Original entry on oeis.org

1, 1, 2, 4, 5, 7, 12, 18, 24, 37, 54, 74, 107, 159, 218, 315, 450, 634, 888, 1269, 1782, 2496, 3520, 4933, 6899, 9681, 13555, 18888, 26407, 36855, 51352, 71526, 99654, 138608, 192708, 267833, 372107, 516420, 716816, 994191, 1378195, 1909694
Offset: 0

Views

Author

Robert G. Wilson v, Feb 10 2006

Keywords

Crossrefs

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 *)
    Table[ AlmostPrimePi[n, E^n], {n, 42}]

A122943 Odd numbers n ordered by n/2^BigOmega(n), where BigOmega(n) is the number of prime divisors of n with repetition.

Original entry on oeis.org

1, 3, 9, 5, 27, 7, 15, 81, 21, 11, 45, 25, 13, 243, 63, 33, 135, 17, 35, 75, 19, 39, 729, 23, 189, 49, 99, 405, 51, 105, 55, 225, 57, 29, 117, 31, 125, 65, 2187, 69, 567, 147, 37, 297, 1215, 153, 77, 315, 41, 165, 675, 85, 171, 43, 87, 175, 351, 91, 93, 375, 47, 95, 195
Offset: 1

Views

Author

Keywords

Comments

This is the limit of the sequence of largest odd factors of the k-almost primes as k -> infinity.
The location of 3^k in this sequence is A078843(k).
Removing 1 and prime numbers from this sequence gives A374074. - Friedjof Tellkamp, Nov 27 2024

Crossrefs

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}]]]]] (* from Eric 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]; f[n_] := Block[{ kap = AlmostPrime[20, n]}, kap / 2^IntegerExponent[ kap, 2]]; Array[f, 64] (* or *)
    f[n_] := n/2^PrimeOmega[n]; Take[2 Ordering[ Table[ f[ 2n - 1], {n, 1100}]] - 1, 63] (* Robert G. Wilson v, Feb 08 2011 *)
    f[n_] := n/2^PrimeOmega[n]; nn=9; t = Select[Table[{f[2 n - 1], 2 n - 1}, {n, 3^nn/2 + 1}], #[[1]] <= f[3^nn] &]; Transpose[Sort[t]][[2]]

Formula

A101695(n) = a(n) * 2^(n - BigOmega(a(n))). a(n) = A101695(n) / 2^A007814(A101695(n)) = A000265(A101695(n)).

A215405 Largest prime factor of the n-th n-almost prime.

Original entry on oeis.org

2, 3, 3, 5, 3, 7, 5, 3, 7, 11, 5, 5, 13, 3, 7, 11, 5, 17, 7, 5, 19, 13, 3, 23, 7, 7, 11, 5, 17, 7, 11, 5, 19, 29, 13, 31, 5, 13, 3, 23, 7, 7, 37, 11, 5, 17, 11, 7, 41, 11, 5, 17, 19, 43, 29, 7, 13, 13, 31, 5, 47, 19, 13, 3, 23, 53, 7, 7, 37
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 09 2012

Keywords

Comments

Technically, the prime numbers are "1-almost prime."
Prime(m) (m>=1) occurs first at index n = 1, 2, 4, 6, 10, 13, 18, 21, 24, 34, 36, 43, 49, 54, 61, 66, 75, 79, 91, 97, 101, 107, 113, 124, 138, 144, 148, 157, 162, 167, 187, 194, 202, 207, 224, 229,... in the sequence. - R. J. Mathar, Aug 09 2012
n <= a(n) at 1, 2, 3, 4, 6, 10, 13,...
n < 2*a(n) at n = 1, 2, 3, 4, 6, 7, 9, 10, 13, 16, 18, 21, 22, 24, 29, 33, 34, 36, 40, 43, 49, 54, 55, 59, 61, 66, 69,...
Also largest prime factor of A122943(n) for n>1. - Eric Desbiaux, Mar 20 2016

Examples

			a(2) = 3 because the 2nd 2-almost prime (semiprime, A001358) is 6 = 2 * 3, the largest prime factor there being 3.
a(3) = 3 because the 3rd 3-almost prime (A014612) is 18 = 2 * 3^2, the largest prime factor there being 3.
a(4) = 5 because the 4th 4-almost prime (A014613) is 40 = 2^3 * 5, the largest prime factor there being 5.
		

Crossrefs

Programs

Extensions

Corrected by R. J. Mathar, Aug 09 2012
Previous Showing 11-16 of 16 results.