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

A185201 10^n - second largest prime less than 10^n.

Original entry on oeis.org

5, 11, 9, 33, 11, 21, 27, 29, 71, 57, 53, 39, 137, 29, 53, 83, 23, 33, 57, 27, 113, 71, 53, 303, 321, 249, 107, 261, 53, 17, 81, 119, 47, 513, 237, 179, 123, 123, 173, 27, 203, 137, 119, 77, 119, 147, 83, 47, 183, 161, 333, 339, 611, 579
Offset: 1

Views

Author

Washington Bomfim, Jan 24 2012

Keywords

Examples

			a(1) = 5 because precprime(10) = 7, and precprime(6) = 5.
From _M. F. Hasler_, Jul 19 2024: (Start)
Further examples: (where pp = prevprime = A151799)
    n |   pp(pp(10^n))  | a(n)
  ----+-----------------+------
    1 |               5 |   5
    2 |              89 |  11
    3 |             991 |   9
    4 |            9967 |  33
    5 |           99989 |  11
    6 |          999979 |  21
    7 |         9999973 |  27
    8 |        99999971 |  29
    9 |       999999929 |  71
   10 |      9999999943 |  57
   11 |     99999999947 |  53
   12 |    999999999961 |  39
   13 |   9999999999863 | 137
   14 |  99999999999971 |  29
   15 | 999999999999947 |  53
(End)
		

References

  • D. E. Knuth, The Art of Computer Programming, Second Edition, Vol. 2, Seminumerical Algorithms, Chapter 4.5.4 Factoring into Primes, Table 1, Page 390, Addison-Wesley, Reading, MA, 1981.

Crossrefs

Cf. A033874.
Cf. A003618 (largest prime < 10^n), A151799 (prevprime function).

Programs

  • Maple
    seq(10^n - prevprime(prevprime(10^n)),n=1..100); # Robert Israel, May 28 2017
  • Mathematica
    Table[10^n - NextPrime[10^n, -2], {n,1,50}] (* G. C. Greubel, Jun 24 2017 *)
  • PARI
    apply( {A185201(n)=10^n-precprime(precprime(10^n)-1)}, [1..66]) \\ M. F. Hasler, Jul 19 2024

Formula

a(n) = 10^n - precprime(precprime(10^n)-1)

A097519 Prime differences between nextprime(2^n) and 2^n.

Original entry on oeis.org

3, 5, 3, 3, 7, 5, 3, 17, 3, 29, 3, 7, 17, 43, 29, 3, 11, 3, 11, 17, 53, 31, 7, 23, 29, 7, 59, 5, 5, 3, 131, 29, 13, 131, 3, 29, 11, 29, 37, 11, 7, 23, 13, 17, 3, 7, 29, 59, 61, 7, 277, 281, 43, 71, 29, 41, 277, 67, 7, 29, 17, 67, 37, 5, 5, 97, 7, 107, 19, 83, 7, 5, 107, 101
Offset: 1

Views

Author

Cino Hilliard, Aug 27 2004

Keywords

Comments

Primes in A013597. - Bill McEachen, Oct 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Table[NextPrime[2^n]-2^n, {n,200}], PrimeQ] (* Harvey P. Dale, Dec 13 2011 *)
    Select[NextPrime[#]-#&/@(2^Range[200]),PrimeQ] (* Harvey P. Dale, Jan 05 2024 *)

Extensions

Definition corrected by Harvey P. Dale, Dec 13 2011

A120099 Numbers n such that the closest primes surrounding 10^n are the same distance modulo 100.

Original entry on oeis.org

17, 45, 87, 101, 112, 230, 270, 341, 468, 472, 473, 479, 517, 554, 555, 568, 650, 657, 663, 696, 718, 727, 810, 830, 836, 900, 917, 952, 984, 988, 1020, 1021, 1022, 1059, 1140, 1142, 1167, 1200, 1295, 1326, 1400, 1401, 1405, 1406, 1418, 1449, 1499, 1503, 1526
Offset: 1

Views

Author

Keywords

Comments

17 {3, 3}, 45 {9, 9}, 87 {373, 273}, 101 {3, 203}, 112 {207, 807}, 230 {753, 1053}, 270 {361, 861}, 341 {831, 1331}, 468 {301, 801}, 472 {1569, 2669}, 473 {99, 599}, 479 {109, 209}, 554 {937, 437}, 555 {151, 2151}, 568 {501, 801}, 650 {1999, 899}, 657 {1791, 291}, 663 {6333, 33},
696 {61, 1361}, 718 {5863, 1463}, 727 {273, 1073}, 810 {1591, 2891}, 830 {2853, 1253}, 836 {2809, 1209}, 900 {1873, 773}, 917 {693, 5393}, 952 {4827, 27}, 984 {1867, 2867}, 988 {753, 1053}, 1020 {793, 1193}, 1021 {1609, 6209}, 1022 {853, 1053} 1059 {5793, 1293}, 1140 {357, 4857},
1142 {4329, 5829}, 1167 {1131, 3231}, 1200 {5227, 4127}, 1295 {5169, 2369}, 1326 {907, 4007}, 1400 {13317, 2517}, 1401 {10549, 2249}, 1405 {4329, 629}, 1406 {7477, 10277}, 1418 {841, 8741}, 1449 {2989, 3089}, 1499 {2001, 1901}, 1503 {439, 339}, 1526 {4603, 603}, 1534 {2409, 3209}, ...,.

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ@k, k++ ]; k]; PrevPrim[n_] := Block[{k = n - 1}, While[ ! PrimeQ@k, k-- ]; k]; Do[ If[ Mod[ NextPrim[10^n], 100] == Mod[10^n - PrevPrim[10^n], 100], Print[{n, a, b}]], {n, 1320}]
    Select[Range[1530],Mod[NextPrime[10^#]-10^#,100]==Mod[10^# -NextPrime[ 10^#,-1],100]&] (* Harvey P. Dale, Sep 24 2021 *)

Formula

A033873 (mod 100) == A033874 (mod 100).

Extensions

More terms from Robert G. Wilson v, Jun 09 2006
Corrected (term 517 added) by Harvey P. Dale, Sep 25 2021

A340902 Distance from the largest prime with less than 10^n decimal digits to 10^(10^n-1).

Original entry on oeis.org

63, 621, 6101, 11333, 59511, 172473
Offset: 1

Views

Author

Jeppe Stig Nielsen, Jan 26 2021

Keywords

Comments

The prime number related to a(n) is the prime immediately preceding the prime related to A096548(n).
a(5) and a(6) appear to have been first found by Patrick De Geest.

Examples

			a(4) = 11333 because 10^9999 - 11333 is the largest prime not exceeding 10^9999.
a(5) = 59511 because 10^99999 - 59511 is the largest prime not exceeding 10^99999.
		

Crossrefs

Formula

a(n) = 10^(10^n-1) - precprime(10^(10^n-1)) = A064722(10^A002283(n)).
Previous Showing 11-14 of 14 results.