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

A036351 Number of numbers <= 10^n that are products of two distinct primes.

Original entry on oeis.org

2, 30, 288, 2600, 23313, 209867, 1903878, 17426029, 160785135, 1493766851, 13959963049, 131125938680, 1237087821006, 11715901643501, 111329815346924, 1061057287065814, 10139482896634686, 97123037634329553, 932300026078297246, 8966605849186166511, 86389956292394285653, 833671466547121873095, 8056846659972421004731
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[ PrimePi[n/Prime[i]] - i, {i, PrimePi[ Sqrt[ n]] }]; Table[ f[10^n], {n, 14}] (* Robert G. Wilson v, Feb 07 2012 and modified Dec 28 2016 *)
  • PARI
    a(n)=my(s);forprime(p=2,sqrt(10^n),s+=primepi(10^n\p)); s-binomial(primepi(sqrt(10^n))+1,2) \\ Charles R Greathouse IV, Apr 23 2012
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A036351(n): return -(t:=primepi(s:=isqrt(m:=10**n)))-(t*(t-1)>>1)+sum(primepi(m//k) for k in primerange(1, s+1)) # Chai Wah Wu, Aug 15 2024

Formula

a(n) = (1/2)*(pi(10^(n/2)) + Sum_{i=1..pi(10^n)} pi((10^n-1)/P_i)) -1 = Sum_{i=1..pi(sqrt(10^n))} (pi((10^n-1)/P_i) -1) - binomial(pi(sqrt(10^n)), 2). - Robert G. Wilson v, May 19 2005
a(n) = A036352(n) - A122121(n). - Robert G. Wilson v, Feb 07 2012

Extensions

a(14) from Robert G. Wilson v, May 19 2005
a(15)-a(16) from Donovan Johnson, Oct 16 2010
Corrected a(15) and a(16) by Henri Lifchitz, Nov 11 2012
a(17)-a(19) from Henri Lifchitz, Nov 11 2012
a(20)-a(21) from Henri Lifchitz, Jul 03 2015
a(22)-a(23) from Henri Lifchitz, Nov 09 2024

A126280 Triangle read by rows: T(k,n) is number of numbers <= 10^n that are products of k primes.

Original entry on oeis.org

4, 4, 1, 25, 34, 22, 12, 4, 2, 168, 299, 247, 149, 76, 37, 14, 7, 2, 1229, 2625, 2569, 1712, 963, 485, 231, 105, 47, 22, 7, 3, 1, 9592, 23378, 25556, 18744, 11185, 5933, 2973, 1418, 671, 306, 138, 63, 25, 11, 4, 2, 78498, 210035, 250853, 198062, 124465, 68963
Offset: 1

Views

Author

Keywords

Comments

The n-th row's sum is 10^n - 1.

Examples

			4 4 1
25 34 22 12 4 2
168 299 247 149 76 37 14
7 2
1229 2625 2569 1712 963 485 231
105 47 22 7 3 1
9592 23378 25556 18744 11185 5933 2973
1418 671 306 138 63 25 11 4 2
78498 210035 250853 198062 124465 68963 35585 17572
8491 4016 1878 865 400 179 79 35 14 7 2
664579 1904324 2444359 2050696 1349779 774078 409849 207207
101787 49163 23448 11068 5210 2406 1124 510 233 102 45 21 7 3 1
		

Crossrefs

The n-th row's sum: A002283 = 10^n -1, A116430, A126279: same array but for powers of two.

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[m, 10^n], {n, 6}, {m, Floor[Log[2, 10^n]] }] // Flatten

A123386 Largest difference between successive semiprimes up to 10^n inclusive.

Original entry on oeis.org

3, 7, 14, 24, 38, 47, 74, 74, 95, 112, 146, 163, 174
Offset: 1

Views

Author

Alexander Adamchuk, Nov 09 2006

Keywords

Comments

There are 4 semiprimes up to 10^1 {4, 6, 9, 10}. The differences between successive semiprimes are {2, 3, 1}. Thus a(1) = Max[ {2, 3, 1} ] = 3.

Crossrefs

Programs

  • PARI
    A001358(prev)={ local(a=prev+1) ; while(bigomega(a)!=2, a++ ; ) ; return(a) ; }
    A123386(n)={ local(sp1=4,sp2=6,a=2) ; while(sp2<=10^n, a=max(a,sp2-sp1) ; sp1=sp2 ; sp2=A001358(sp1) ; ) ; return(a) ; }
    { for(n=1,13, print(A123386(n)) ; ) ; } \\ 2 more terms from R. J. Mathar, Jan 17 2008

Extensions

2 more term from R. J. Mathar, Jan 17 2008
a(8)-a(9) from Donovan Johnson, Sep 05 2008
a(10)-a(11) from Donovan Johnson, Apr 14 2010
a(12)-a(13) from Donovan Johnson, Sep 20 2012

A216593 Number of semiprimes among n-th million natural numbers.

Original entry on oeis.org

210035, 197249, 193162, 190540, 188288, 187308, 185657, 184788, 183856, 183441, 182123, 181556, 181125, 180878, 180234, 179649, 179055, 178710, 178652, 178034, 178015, 177307, 177391, 177003, 176568, 176419, 176021, 175788, 175655, 175189, 174915, 175357
Offset: 1

Views

Author

Zak Seidov, Sep 09 2012

Keywords

Comments

Let f(m) = number of semiprimes
a(n) = 0 for almost all n. It seems infeasible to find the first such n. - Charles R Greathouse IV, Sep 09 2012

Crossrefs

Programs

  • Mathematica
    f[m_] := Sum[ PrimePi[(m - 1)/Prime[i]], {i, PrimePi[ Sqrt[m]]}] - Binomial[ PrimePi[ Sqrt[m]], 2]; ta=Table[f[n*10^6],{n,0,1000}];s=Rest[ta]-Most[ta] (* for first 1000 terms *)
    (* using Mmca code by Robert G. Wilson v in A066265 - Zak Seidov, Sep 09 2012 *)
  • PARI
    a(n)=sum(k=10^6*(n-1),10^6*n,bigomega(k)==2) \\ Charles R Greathouse IV, Sep 09 2012

Formula

a(n) ~ 1000000 n log log n / log n. - Charles R Greathouse IV, Sep 23 2012

A115854 Difference between number of semiprimes <= 10^n and the asymptotic approximation round(10^n*loglog(10^n)/log(10^n)).

Original entry on oeis.org

0, 0, 0, 19, 214, 2154, 19974, 179590, 1610937, 14515403, 131560754, 1199914216, 11009605949, 101581094033, 942018562525
Offset: 0

Author

Jonathan Vos Post, Mar 14 2006

Keywords

Examples

			a(5) = A036352(5) - round(...10^5...) = 23378 - 21224 = 2154.
		

Crossrefs

Extensions

Edited by Don Reble, Mar 29 2006
Previous Showing 11-15 of 15 results.