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-20 of 35 results. Next

A091088 a(n) is the minimum odd number that must be appended to n to form a prime.

Original entry on oeis.org

3, 1, 3, 1, 1, 3, 1, 1, 3, 7, 1, 3, 7, 1, 9, 1, 3, 3, 1, 1, 11, 1, 3, 3, 1, 1, 3, 1, 1, 3, 7, 1, 17, 1, 7, 3, 7, 3, 3, 7, 1, 9, 1, 1, 3, 7, 1, 9, 7, 1, 3, 13, 1, 23, 1, 7, 3, 1, 7, 3, 1, 3, 11, 1, 1, 3, 1, 3, 3, 1, 1, 9, 7, 3, 3, 1, 1, 3, 7, 7, 9, 1, 1, 9, 19, 3, 3, 7, 1, 23, 7, 1, 9, 7, 1, 3, 7, 1, 3, 1, 9, 3
Offset: 0

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

This is really a duplicate of A068695. See that entry for existence proof. - N. J. A. Sloane, Nov 07 2020
Note that of course a(n) is not allowed to begin with 0.
Many numbers become prime by appending a one-digit odd number. Some numbers (such as 20, 32, 51, etc.) require a 2 digit odd number (A032352 has these). In the first 100,000 values of n there are only 22 that require a 3 digit odd number (A091089). There probably are some values that require odd numbers of 4 or more digits, but these are likely to be very large.

Examples

			a(0)=3 because 3 is the minimum odd number which when appended to 0 forms a prime (03 = 3 = prime).
a(20)=11 because 11 is the minimum odd number which when appended to 20 forms a prime (201, 203, 205, 207, 209 are all nonprime, 2011 is prime).
		

Crossrefs

Essentially the same as A068695, which is the main entry for this sequence.
Cf. A032352 (a(n) requires at least a 2 digit odd number), A091089 (a(n) requires at least a 3 digit odd number).

Programs

  • Mathematica
    Table[Block[{k = 1}, While[! PrimeQ@ FromDigits[IntegerDigits[n] ~Join~ IntegerDigits[k]], k += 2]; k], {n, 0, 101}] (* Michael De Vlieger, Nov 24 2017 *)
  • PARI
    a(n) = forstep(x=1, +oo, 2, if(isprime(eval(concat(Str(n), x))), return(x))) \\ Iain Fox, Nov 23 2017

A216288 Prime-free decades such that the next decade is also prime-free.

Original entry on oeis.org

113, 133, 134, 167, 218, 248, 314, 323, 347, 374, 418, 430, 476, 484, 512, 524, 536, 545, 560, 575, 596, 640, 650, 674, 692, 708, 713, 726, 737, 776, 797, 833, 839, 847, 848, 890, 907, 935, 944, 956, 998, 1001, 1004, 1037, 1040, 1080, 1081, 1091, 1133, 1175
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Comments

Numbers n such that 10n+1, 10n+3, 10n+7, 10n+9, 10n+11, 10n+13, 10n+17, and 10n+19 are composite. - Charles R Greathouse IV, Sep 07 2012

Crossrefs

Cf. A219998 (upper decade).

Programs

  • Magma
    /* After the Greathouse's comment: */ [n: n in [0..1200] | forall{10*n+i: i in [1,3,7,9,11,13,17,19] | not IsPrime(10*n+i)}]; // Bruno Berselli, Sep 14 2012
    
  • Mathematica
    ps0 = {2, 3, 5, 7}; t = {}; Do[ps1 = Select[Range[10*n, 10*n + 9], PrimeQ]; If[Length[ps0] == Length[ps1] == 0, AppendTo[t, n-1]]; ps0 = ps1, {n, 2, 1000}]; t (* T. D. Noe, Sep 03 2012 *)
  • PARI
    is(n)=nextprime(10*n)-10*n>20 \\ Charles R Greathouse IV, Sep 07 2012
    
  • PARI
    is(n)=!(isprime(10*n+1) || isprime(10*n+3) || isprime(10*n+7) || isprime(10*n+9) || isprime(10*n+11) || isprime(10*n+13) || isprime(10*n+17) || isprime(10*n+19)) \\ Charles R Greathouse IV, Sep 07 2012
    
  • PARI
    for(i=2, 1200, if(isprime(10*i+1)==0&&isprime(10*i+3)==0&&isprime(10*i+7)==0&&isprime(10*i+9)==0&&isprime(10*i+11)==0&&isprime(10*i+13)==0&&isprime(10*i+17)==0&&isprime(10*i+19)==0, print1(i", "))) /* V. Raman, Dec 08 2012 */

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 07 2012
a(n) = A219998(n) - 1. - V. Raman, Dec 08 2012

A216295 Values of k such that 10k + 1 is the only prime between 10k and 10k + 9.

Original entry on oeis.org

18, 21, 24, 42, 63, 66, 69, 81, 102, 105, 117, 120, 138, 147, 151, 153, 180, 181, 183, 195, 216, 222, 225, 231, 252, 262, 273, 286, 297, 300, 312, 319, 327, 333, 336, 339, 357, 393, 411, 420, 423, 426, 462, 469, 480, 483, 486, 501, 526, 528, 535, 553, 558
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1}, AppendTo[t, n]], {n, 0, 669}]; t (* T. D. Noe, Sep 03 2012 *)

Formula

a(n) ~ 0.4 n log n. - Charles R Greathouse IV, Sep 07 2012

A216296 Values of k such that 10k + 3 is the only prime between 10k and 10k + 9.

Original entry on oeis.org

11, 29, 68, 74, 77, 86, 95, 98, 116, 119, 137, 152, 158, 173, 182, 191, 200, 205, 215, 221, 224, 227, 242, 250, 263, 266, 275, 284, 302, 341, 343, 359, 362, 364, 380, 383, 386, 436, 437, 446, 449, 452, 458, 460, 466, 470, 473, 494, 497, 515, 532, 533, 548
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 3}, AppendTo[t, n]], {n, 0, 647}]; t (* T. D. Noe, Sep 03 2012 *)

Formula

a(n) ~ 0.4 n log n. - Charles R Greathouse IV, Sep 07 2012

A216297 Values of k such that 10k + 7 is the only prime between 10k and 10k + 9.

Original entry on oeis.org

9, 12, 30, 36, 39, 45, 48, 55, 58, 72, 78, 79, 87, 90, 93, 96, 108, 111, 144, 156, 159, 163, 165, 177, 184, 198, 243, 246, 261, 264, 270, 276, 277, 288, 289, 291, 292, 303, 313, 321, 340, 345, 360, 372, 384, 387, 390, 396, 417, 429, 432, 435, 450, 498, 507
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 7}, AppendTo[t, n]], {n, 0, 639}]; t (* T. D. Noe, Sep 03 2012 *)

Formula

a(n) ~ 0.4 n log n. - Charles R Greathouse IV, Sep 07 2012

A216298 Values of k such that 10k + 9 is the only prime between 10k and 10k + 9.

Original entry on oeis.org

14, 41, 47, 71, 80, 83, 92, 100, 104, 124, 125, 131, 139, 140, 170, 188, 194, 203, 209, 212, 217, 230, 245, 257, 260, 272, 278, 281, 287, 293, 299, 307, 310, 311, 329, 335, 338, 344, 365, 371, 377, 398, 404, 422, 434, 440, 488, 491, 503, 509, 518, 520, 551
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 9}, AppendTo[t, n]], {n, 0, 677}]; t (* T. D. Noe, Sep 03 2012 *)

Formula

a(n) ~ 0.4 n log n. - Charles R Greathouse IV, Sep 07 2012

A216299 Numbers k such that 10k+1 is composite but 10k+3, 10k+7, 10k+9 are all prime.

Original entry on oeis.org

22, 61, 85, 142, 166, 169, 178, 199, 268, 316, 415, 451, 478, 541, 682, 775, 787, 862, 1045, 1111, 1237, 1387, 1618, 1720, 1738, 2014, 2035, 2074, 2131, 2215, 2305, 2362, 2410, 2710, 2773, 2938, 3013, 3055, 3271, 3334, 3361, 3412, 3652, 4012, 4042, 4069
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Magma
    [k:k in [1..4100]| not IsPrime(10*k+1) and forall{m:m in [3,7,9]| IsPrime(10*k+m)}]; // Marius A. Burtea, Feb 02 2020
  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 3, 10*n + 7, 10*n + 9}, AppendTo[t, n]], {n, 0, 4978}]; t (* T. D. Noe, Sep 03 2012 *)
    Select[Range[4100],CompositeQ[10#+1]&&AllTrue[10#+{3,7,9},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 14 2019 *)

Formula

a(n) >> n log^3 n. - Charles R Greathouse IV, Sep 07 2012

A216300 Numbers k such that 10k+3 is composite but 10k+1, 10k+7, 10k+9 are all prime.

Original entry on oeis.org

13, 160, 376, 391, 421, 547, 586, 712, 745, 748, 754, 808, 883, 985, 1006, 1210, 1291, 1333, 1375, 1462, 1513, 1588, 1702, 1798, 2203, 2269, 2302, 2353, 2497, 2584, 2854, 2920, 3205, 3358, 3436, 3583, 3823, 3832, 3856, 3982, 4003, 4084, 4138, 4339, 4402
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1, 10*n + 7, 10*n + 9}, AppendTo[t, n]], {n, 0, 4738}]; t (* T. D. Noe, Sep 03 2012 *)
    Select[Range[5000],Boole[PrimeQ[10 #+{1,3,7,9}]]=={1,0,1,1}&] (* Harvey P. Dale, Jan 29 2025 *)

Formula

a(n) >> n log^3 n. - Charles R Greathouse IV, Sep 07 2012

A216301 Numbers k such that 10k+7 is composite but 10k+1, 10k+3, 10k+9 are all prime.

Original entry on oeis.org

7, 43, 103, 106, 145, 238, 271, 409, 472, 544, 574, 670, 721, 904, 934, 1009, 1183, 1204, 1261, 1282, 1372, 1636, 1669, 1729, 1792, 1921, 1975, 2002, 2149, 2152, 2254, 2320, 2437, 2560, 2593, 2611, 2695, 2779, 2857, 2866, 2875, 3085, 3115, 3118, 3256
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1, 10*n + 3, 10*n + 9}, AppendTo[t, n]], {n, 0, 4999}]; t (* T. D. Noe, Sep 03 2012 *)
    cprQ[n_]:=Module[{c=10n},!PrimeQ[c+7]&&And@@PrimeQ[c+{1,3,9}]]; Select[ Range[ 4000],cprQ] (* Harvey P. Dale, May 28 2014 *)
    Select[Range[4000],Boole[PrimeQ[10 #+{1,3,7,9}]]=={1,1,0,1}&] (* Harvey P. Dale, Dec 09 2022 *)

Formula

a(n) >> n log^3 n. - Charles R Greathouse IV, Sep 07 2012

A216302 Numbers k such that 10k+9 is composite but 10k+1, 10k+3, 10k+7 are all prime.

Original entry on oeis.org

4, 31, 46, 64, 88, 109, 130, 367, 400, 493, 523, 550, 823, 829, 886, 946, 1033, 1117, 1369, 1390, 1408, 1432, 1825, 1999, 2161, 2329, 2356, 2374, 2503, 2626, 2668, 2671, 2794, 2902, 3049, 3139, 3151, 3154, 3232, 3253, 3421, 3553, 3559, 3601, 3799, 3904
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1, 10*n + 3, 10*n + 7}, AppendTo[t, n]], {n, 0, 4903}]; t (* T. D. Noe, Sep 03 2012 *)
    Select[Range[4000],!PrimeQ[10#+9]&&And@@PrimeQ[10#+{1,3,7}]&] (* Harvey P. Dale, May 23 2014 *)
    Select[Range[4000],Boole[PrimeQ[10 #+{1,3,7,9}]]=={1,1,1,0}&] (* Harvey P. Dale, Feb 14 2025 *)

Formula

a(n) >> n log^3 n. - Charles R Greathouse IV, Sep 07 2012
Previous Showing 11-20 of 35 results. Next