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 21-30 of 46 results. Next

A110896 Difference between prime(10^n) and prime(10^(n-1)).

Original entry on oeis.org

27, 512, 7378, 96810, 1194980, 14186154, 163938810, 1858650070, 20763688746, 229296037134, 2508629501894, 27235496973316, 293784284670498, 3151605249578196, 33649122286540910, 357782405858669892, 3790389667563960340, 40026493653364473662, 421463674881774896218
Offset: 1

Views

Author

Cino Hilliard, Sep 20 2005

Keywords

Examples

			The (10^1)th prime is 29. The (10^0)th prime is 2 and the difference is 27 the first entry.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[10^n] - Prime[10^(n - 1)], {n, 1, 12}] (* Marvin Ray Burns, Dec 09 2007 *)
    Differences[Table[Prime[10^n],{n,0,12}]] (* Harvey P. Dale, Jul 03 2017 *)
  • PARI
    a(n) = prime(10^n) - prime(10^(n-1)); \\ Jinyuan Wang, Nov 14 2020; adapted to offset by Georg Fischer, Jun 22 2022
    
  • Python
    from sympy import prime
    def a(n): return prime(10**n)-prime(10**(n-1))
    print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Jun 22 2022

Formula

a(n) = A006988(n) - A006988(n-1) = prime(10^n) - prime(10^(n-1)). - Marvin Ray Burns, Dec 09 2007; corrected by Michel Marcus, Jun 22 2022

Extensions

Corrected and extended by Marvin Ray Burns, Dec 09 2007
More terms from Jinyuan Wang, Nov 14 2020

A120044 The 10^n-th 3-almost prime.

Original entry on oeis.org

8, 45, 412, 3918, 38991, 395085, 4046429, 41657362, 429891626, 4439956573, 45851698382, 473238120286, 4880292241955, 50280826966354
Offset: 0

Views

Author

Robert G. Wilson v, Feb 15 2006

Keywords

Crossrefs

Programs

  • Mathematica
    ThreeAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j)] - j + 1, {i, PrimePi[n^(1/3)]}, {j, i, PrimePi@ Sqrt[n/Prime@i]}]; ThreeAlmostPrime[n_] := Block[{e = Floor[Log[2, n]], a, b}, a = 2^e; Do[b = 2^p; While[ThreeAlmostPrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Do[ Print@ThreeAlmostPrime[10^n], {n, 0, 13}]
    ThreePrime[n_] := Block[{e = Floor[ Log[2, n] +2], a, b}, a = 2^e; Do[b = 2^p; While[ ThreePrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Table[ ThreePrime[n], {n, 0, 13}]

A120045 The (10^n)-th 4-almost prime.

Original entry on oeis.org

16, 88, 693, 5958, 54328, 511725, 4922511, 47997635, 472514554, 4683086217, 46636297326, 466032880556
Offset: 0

Views

Author

Robert G. Wilson v, Feb 15 2006

Keywords

Crossrefs

Programs

  • Mathematica
    FourAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k)] - k + 1, {i, PrimePi[n^(1/4)]}, {j, i, PrimePi[(n/Prime@i)^(1/3)]}, {k, j, PrimePi@Sqrt[n/(Prime@i*Prime@j)]}];
    FourAlmostPrime[n_] := Block[{e = Floor[Log[2, n] +3], a, b}, a = 2^e; Do[b = 2^p; While[FourAlmostPrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Do[ Print@FourAlmostPrime[10^n], {n, 0, 11}]

A120046 The 10^n-th 5-almost prime.

Original entry on oeis.org

32, 176, 1272, 10374, 89896, 810220, 7475818, 70185558, 667561977, 6411296283, 62037096770, 603813941738
Offset: 0

Views

Author

Robert G. Wilson v, Feb 15 2006

Keywords

Crossrefs

Programs

  • Mathematica
    FiveAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k*Prime@l)] - l + 1, {i, PrimePi[n^(1/5)]}, {j, i, PrimePi[(n/Prime@i)^(1/4)]}, {k, j, PrimePi[(n/(Prime@i*Prime@j)^(1/3))]}, {l, k, PrimePi@Sqrt[(n/(Prime@i*Prime@j*Prime@k))]}];
    FiveAlmostPrime[n_] := Block[{e = Floor[Log[2, n] +4], a, b}, a = 2^e; Do[b = 2^p; While[FiveAlmostPrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Do[ Print@FiveAlmostPrime[10^n], {n, 0, 13}]
  • PARI
    lista(nmax) = {my(pow = 1, c = 0, n = 0); for(k = 1, oo, if(bigomega(k) == 5, c++; if(c == pow, print1(k, ", "); if(n == nmax, break); pow *= 10; n++)));} \\ Amiram Eldar, Apr 29 2024

Formula

a(n) = A014614(10^n). - Amiram Eldar, Apr 29 2024

Extensions

a(6) corrected and a(7)-a(9) added by Amiram Eldar, Apr 29 2024
a(10)-a(11) from David A. Corneth, Apr 29 2024

A134182 Difference between the sums of the first 10^n odd primes and the first 10^n odd positive integers > 1.

Original entry on oeis.org

38, 14478, 2688838, 396250152, 52261798440, 6472980453364, 770530574266708, 89262852894258444, 10138479465982004008, 1134379338819040693132, 125436174619351016716668, 13738971133578180130155676, 1493061976858459711065006050, 161191473337955042966337346114
Offset: 1

Views

Author

Enoch Haga, Oct 13 2007

Keywords

Comments

Original name: 10^n-th difference between cumulative prime and odd sums.
Beginning at 3, compute the sums of the prime and odd sequences at 10^n and take the difference.

Examples

			a(1) = (3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31) - (3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21) = 158 - 120 = 38.
a(2) = 14478 because at 10^2, 100 sums of primes and odds, the prime sum is 24678, the odd sum is 10200 and the difference is 14478.
		

Crossrefs

Programs

  • UBASIC
    10 N=1: A=2
    20 A=nxtprm(A): B=B+A
    30 N=N+2: D=D+N
    40 if C=9 then print A;N;B;D;B-D: stop
    50 C=C+1: if C<10 then 20

Formula

a(n) = A134181(10^n).
a(n) = A099824(n) + prime(10^n+1) - (10^n*(10^n+2)) - 2. - Chai Wah Wu, Mar 30 2020
a(n) = A071148(10^n) - (10^n+1)^2 + 1, where A071148 are the partial sums of odd primes, and N^2 is the sum of the first N odd integers. - M. F. Hasler, Aug 08 2025

Extensions

Edited by M. F. Hasler, Aug 08 2025

A049035 Number of pairs of twin primes whose smaller element is <= 10^n-th prime.

Original entry on oeis.org

5, 25, 174, 1270, 10250, 86027, 738597, 6497407, 58047180, 524733511, 4789919653, 44073509102, 408231310520
Offset: 1

Views

Author

Dennis S. Kluk (mathemagician(AT)ameritech.net)

Keywords

Comments

a(0) = 0. - Eduard Roure Perdices, Dec 23 2022

Examples

			a(1) = 5 since the 10th prime is 29 and the first 5 twin primes are {3,5}, {5,7}, {11,13}, {17,19} and {29,31}.
		

Crossrefs

See A093683 for another version.

Programs

  • Python
    from sympy import prime, sieve # use primerange for larger terms
    def afind(terms):
      c, prevp = 0, 1
      for n in range(1, terms+1):
        for p in sieve.primerange(prevp+1, prime(10**n)+3):
          if prevp == p - 2: c += 1
          prevp = p
        print(c, end=", ")
    afind(6) # Michael S. Branicky, Apr 25 2021

Extensions

More terms from Labos Elemer, Oct 13 2000; Jud McCranie, Dec 30 2000
a(9) from Michael S. Branicky, Apr 25 2021
a(10) from Eduard Roure Perdices, May 08 2021
a(11) from Eduard Roure Perdices, Feb 03 2022
a(12) from Eduard Roure Perdices, Dec 23 2022
a(13) from Eduard Roure Perdices, Jan 24 2024

A049040 Number of Sophie Germain primes <= prime(10^n).

Original entry on oeis.org

1, 6, 26, 167, 1222, 9668, 82237, 711154, 6284076, 56325540, 510628554, 4672267109
Offset: 0

Views

Author

Dennis S. Kluk (mathemagician(AT)ameritech.net)

Keywords

Comments

Sophie Germain primes are primes p such that 2p+1 is also prime.

Examples

			The first 10 primes are 2,3,5,7,11,13,17,23,29 and 31. 6 of these are Sophie Germain primes, namely: 2,3,5,11,23 and 29.
		

Crossrefs

Programs

  • Mathematica
    cnt = 0; currentPrime = 1; For[ i = 1, i == i, i ++, currentPrime = NextPrime[ currentPrime ]; If[ PrimeQ[ 2*currentPrime + 1 ], cnt++ ]; If[ IntegerQ[ Log[ 10, i ] ], Print[ cnt ] ]; ]
  • PARI
    list(len) = {my(c = 0, k = 0, pow = 1, pmax = prime(pow)); forprime(p = 1, , if(isprime(2*p+1), c++); if(p == pmax, print1(c, ", "); k++; if(k == len, break); pow *= 10; pmax = prime(pow)));} \\ Amiram Eldar, Jul 25 2025

Extensions

More terms from Alexander D. Healy, Mar 19 2001
Offset changed to 0, a(0) prepended and a(9)-a(11) added by Amiram Eldar, Jul 25 2025

A049386 Binary order of 2^n-th prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72
Offset: 0

Views

Author

Keywords

Examples

			The 549755813888th = (2^39)th prime is 16149760533341, whose binary order is 44: it is ceiling(43.87657801)=44, so a(39)=44;
a(0)=1 is the binary order of the (2^0)th = 1st prime (= 2), which is log_2(2) = 1.
		

Crossrefs

Programs

  • PARI
    a(n) = ceil(log(prime(2^n))/log(2)); \\ Michel Marcus, Aug 07 2021

Formula

a(n) = A029837(A033844(n)).
a(n) = ceiling(log_2(prime(2^n))).

Extensions

a(40)-a(57) from Michel Marcus, Aug 25 2019
More terms from Jinyuan Wang, Aug 07 2021

A074383 Difference between (1+10^n)-th and (10^n)-th primes.

Original entry on oeis.org

1, 2, 6, 8, 14, 12, 4, 18, 8, 24, 6, 42, 18, 48, 60, 52, 48, 8, 22, 20, 60, 38, 54, 48, 58
Offset: 0

Views

Author

Labos Elemer, Aug 22 2002

Keywords

Examples

			a(18)=22 because the (10^18)th prime is 44211790234832169331, the (1+10^18)th prime is 44211790234832169353.
		

Crossrefs

Formula

a(n) = prime(1+10^n) - prime(10^n).
a(n) = A151800(A006988(n)) - A006988(n).

Extensions

a(19) from Max Alekseyev, May 08 2009
a(20)-a(22) from Max Alekseyev, Dec 04 2014
a(23)-a(24) from Chai Wah Wu using the terms in A006988, Sep 18 2018

A092251 Lesser of the smallest twin prime pair on or after the 10^n-th prime.

Original entry on oeis.org

3, 29, 569, 7949, 104759, 1299917, 15486257, 179424797, 2038074947, 22801763729, 252097801757, 2760727302647, 29996224276019, 323780508946379, 3475385758524917, 37124508045066647, 394906913903736539, 4185296581467696419, 44211790234832169821, 465675465116607069659
Offset: 0

Views

Author

Cino Hilliard, Feb 19 2004

Keywords

Examples

			a(1) = 29 since the 10th prime is 29 and (29, 31) is the first twin prime pair on or after the 10th prime.
		

Crossrefs

Cf. A006988.

Extensions

More terms from Amiram Eldar, Jan 01 2020
Previous Showing 21-30 of 46 results. Next