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 31-40 of 53 results. Next

A216307 Values of k such that 10*k+3 and 10*k+9 alone are prime between 10*k and 10*k+9.

Original entry on oeis.org

2, 5, 8, 17, 23, 26, 35, 37, 38, 44, 50, 56, 59, 65, 73, 101, 110, 112, 122, 128, 143, 149, 154, 155, 161, 175, 197, 206, 233, 239, 254, 269, 290, 296, 308, 320, 331, 332, 353, 373, 392, 401, 407, 413, 425, 428, 464, 467, 479, 490, 499, 500, 511, 527, 530
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, 10*n + 9}, AppendTo[t, n]], {n, 0, 782}]; t (* T. D. Noe, Sep 04 2012 *)
    Select[Range[800],Boole[PrimeQ[Range[10 #,10 #+9]]]=={0,0,0,1,0,0,0,0,0,1}&] (* Harvey P. Dale, Apr 23 2019 *)

Formula

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

A216308 Values of k such that 10*k+7 and 10*k+9 are the only primes between 10*k and 10*k+9.

Original entry on oeis.org

34, 127, 202, 223, 226, 265, 352, 355, 412, 433, 454, 463, 496, 619, 694, 730, 838, 853, 859, 967, 976, 1000, 1003, 1042, 1093, 1105, 1171, 1177, 1321, 1339, 1399, 1438, 1444, 1486, 1528, 1741, 1759, 1765, 1774, 1783, 1795, 1828, 1969, 2047, 2050, 2071, 2080
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, 10*n + 9}, AppendTo[t, n]], {n, 0, 2599}]; t (* T. D. Noe, Sep 04 2012 *)

Formula

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

A309871 Numbers n for which 18n+1, 18n+5, 18n+7, 18n+11, 18n+13 and 18n+17 are primes.

Original entry on oeis.org

892, 2432, 156817, 806697, 822937, 1377022, 1389412, 1418007, 1619642, 1753552, 2017732, 2058647, 2329302, 2554142, 2703347, 3058772, 3135107, 3326522, 3391797, 3723457, 4126867, 4132782, 4171422, 4411837, 4610252, 6378487, 6440087, 6878987, 6897782, 6991547
Offset: 1

Views

Author

Ely Golden, Aug 21 2019

Keywords

Crossrefs

Programs

  • Mathematica
    tot[n_] := Select[Range[n], CoprimeQ[#, n] &]; m = 18; t = tot[m]; aQ[n_] := AllTrue[m * n + t, PrimeQ]; Select[Range[10^6], aQ] (* Amiram Eldar, Aug 22 2019 *)
  • SageMath
    x = 1
    for i in range(5000000):
        if (18*i+1 in Primes()
        and 18*i+5 in Primes()
        and 18*i+7 in Primes()
        and 18*i+11 in Primes()
        and 18*i+13 in Primes()
        and 18*i+17 in Primes()):
            print(str(x)+" "+str(i))
            x += 1

A354589 Primes p starting a sequence of 4 consecutive primes whose final digits are 1,3,7,9 (in any order).

Original entry on oeis.org

11, 23, 47, 53, 67, 83, 89, 101, 109, 149, 167, 191, 193, 197, 199, 211, 251, 257, 263, 383, 443, 449, 461, 487, 557, 563, 587, 593, 599, 613, 647, 659, 739, 757, 761, 821, 859, 983, 991, 1061, 1063, 1069, 1117, 1217, 1223, 1283, 1301, 1303, 1367, 1433, 1439, 1447, 1481, 1553, 1567, 1571, 1579
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 18 2022

Keywords

Examples

			a(3) = 47 is in the sequence because the 4 consecutive primes starting with 47 are 47, 53, 59, 61, and their final digits 7,3,9,1 are a permutation of 1,3,7,9.
		

Crossrefs

Programs

  • Maple
    P:= select(isprime, [seq(i,i=3..2000,2)]):
    P1:= P mod 10:
    P[select(i -> convert(P1[i..i+3],set) = {1,3,7,9}, [$1..nops(P)-3])];
  • Mathematica
    Select[Partition[Prime[Range[300]], 4, 1], Sort[Mod[#, 10]] == {1, 3, 7, 9} &][[;; , 1]] (* Amiram Eldar, Aug 19 2022 *)
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        p = [2, 3, 5, 7]
        while True:
            if set(map(lambda x: x%10, p)) == {1, 3, 7, 9}: yield p[0]
            p = p[1:] + [nextprime(p[-1])]
    print(list(islice(agen(), 60))) # Michael S. Branicky, Aug 18 2022

A064963 10000n+1, 10000n+3, 10000n+7, 10000n+9 are all primes.

Original entry on oeis.org

676, 1189, 2515, 2830, 8224, 9001, 10621, 10786, 17611, 18640, 20983, 21277, 23419, 28468, 31450, 37720, 41530, 41596, 42025, 45238, 47212, 49912, 50992, 52222, 53815, 65827, 70786, 77044, 82324, 88297, 88918, 96193, 99262, 101992
Offset: 1

Views

Author

Robert G. Wilson v, Oct 29 2001

Keywords

Crossrefs

Cf. A007811 and A064687.

Programs

  • Mathematica
    Select[Range[10^5], PrimeQ[10^4# + 1] && PrimeQ[10^4# + 3] && PrimeQ[10^4# + 7] && PrimeQ[10^4# + 9] &]
    Select[Range[120000],AllTrue[10000#+{1,3,7,9},PrimeQ]&] (* Harvey P. Dale, Mar 18 2022 *)

A064968 Numbers k such that 1000000000k+1, 1000000000k+3, 1000000000k+7, 1000000000k+9 are all primes.

Original entry on oeis.org

14965, 16813, 20767, 23083, 34270, 40198, 93238, 112096, 189802, 192484, 251248, 333946, 334969, 363514, 374107, 375127, 376765, 383473, 405046, 419458, 462928, 498139, 649948, 703246, 704374, 732463, 767101, 781885, 806467, 812902, 842428
Offset: 1

Views

Author

Robert G. Wilson v, Oct 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], PrimeQ[10^9# + 1] && PrimeQ[10^9# + 3] && PrimeQ[10^9# + 7] && PrimeQ[10^9# + 9] &]
  • PARI
    { n=0; for (m=1, 10^9, b=10^9*m; if(isprime(b + 1) && isprime(b + 3) && isprime(b + 7) && isprime(b + 9), write("b064968.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 01 2009

A088264 Smallest number k > 0 such that prefixing k to the n-th quadruple in the set {(1,3,7,9), (11,13,17,19), (21,23,27,29), ...} yields all primes.

Original entry on oeis.org

1, 189, 8, 94, 156, 32, 34, 18, 14, 1, 1653, 101, 2764, 99, 326, 715, 144, 1322, 4300, 768, 122, 67, 72, 500, 427, 3, 77, 22, 285, 119, 25, 294, 632, 55, 51, 3974, 217, 1230, 1022, 346, 1461, 260, 19, 9, 536, 463, 3, 299, 1, 69, 539, 1285, 1833, 116, 397, 3951
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2003

Keywords

Comments

a(n) is the least k such that 10^A055642(n)*k+n is in A007811. - Robert Israel, Jun 18 2017

Examples

			a(2) = 189 as 189 is the smallest number such that 18911, 18913, 18917 and 18919 are all prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local R,k,p;
    R:= map(`+`,[1,3,7,9],10*(n-1));
    p:= 10^(ilog10(R[1])+1);
    for k from 1 do
      if map(t -> isprime(t+p*k), R) = [true,true,true,true] then return k fi
    od
    end proc:
    map(f, [$1..60]); # Robert Israel, Jun 18 2017

Extensions

Corrected and extended by Ray G. Opao, Mar 23 2005
More terms from David Wasserman, Jul 27 2005

A097639 a(n) is the smallest number m such that for the n-digit number s=10^(n-1)+ m, 10*s+1, 10*s+3, 10*s+7 and 10*s+9 are primes.

Original entry on oeis.org

0, 0, 48, 300, 111, 234, 1395, 546, 2526, 5742, 753, 12369, 5658, 94572, 6744, 134649, 32523, 43071, 213927, 256116, 8172, 431904, 57138, 433125, 123225, 711447, 318501, 40758, 150063, 184602, 134661, 377778, 129048, 504678, 88113, 3174738
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 18 2004

Keywords

Comments

a(50)= 10718757, can you find a(100)?

Examples

			a(4)=300 because 10(10^3+300)+ 1, 10(10^3+300)+ 3, 10(10^3+300)+ 7 and 10(10^3+300)+1, are primes and 300 is the smallest number with this property.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=(For[m=0, !(PrimeQ[10^n+10m+1]&&PrimeQ[10^n+10m+3]&&PrimeQ[ 10^n+10m+7]&&PrimeQ[10^n+10m+9]), m++ ];m);Table[a[n], {n, 43}]
    Table[Module[{m=0,s=10^n},While[AnyTrue[10(s+m)+{1,3,7,9},CompositeQ],m++];m],{n,0,35}] (* Harvey P. Dale, Sep 19 2022 *)
  • PARI
    isok(m, n) = my(s=10^(n-1)+ m); ispseudoprime(10*s+1) && ispseudoprime(10*s+3) && ispseudoprime(10*s+7) && ispseudoprime(10*s+9);
    a(n) = my(m=0); while (!isok(m, n), m++); m; \\ Michel Marcus, Aug 09 2023

Formula

a(n) = A097638(n) - 10^(n-1).

A178082 Numbers k for which 5*k-4, 5*k-2, 5*k+2, and 5*k+4 are primes.

Original entry on oeis.org

3, 21, 39, 165, 297, 375, 417, 651, 693, 1131, 1887, 2601, 3129, 3147, 3213, 3609, 3783, 3885, 4203, 4455, 5061, 6345, 6969, 8757, 10269, 11067, 12597, 13443, 13899, 14445, 15453, 15939, 16209, 16545, 17763, 19569, 19827, 20223, 21969, 23307
Offset: 1

Views

Author

Roger L. Bagula, May 19 2010

Keywords

Examples

			The associated prime quadruplets start as:
     11,    13,    17,    19;   (for n =  3)
    101,   103,   107,   109;   (for n = 21)
    191,   193,   197,   199;   (for n = 39)
    821,   823,   827,   829;
   1481,  1483,  1487,  1489;
   1871,  1873,  1877,  1879;
   2081,  2083,  2087,  2089;
   3251,  3253,  3257,  3259;
   3461,  3463,  3467,  3469;
   5651,  5653,  5657,  5659;
   9431,  9433,  9437,  9439;
  13001, 13003, 13007, 13009;
  15641, 15643, 15647, 15649;
  15731, 15733, 15737, 15739;
  16061, 16063, 16067, 16069;
  18041, 18043, 18047, 18049;
  18911, 18913, 18917, 18919;
  19421, 19423, 19427, 19429.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1000]| IsPrime(5*n - 4) and IsPrime(5*n - 2) and IsPrime(5*n + 2) and IsPrime(5*n + 4)]; // Vincenzo Librandi, Nov 30 2010
  • Mathematica
    Flatten[Table[If[PrimeQ[5*n + 2] && PrimeQ[5*n - 2] && PrimeQ[5*n + 4] && PrimeQ[5*n - 4], n, {}], {n, 0, 10000}]]
    Select[Range[25000],AllTrue[5#+{4,2,-2,-4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 03 2018 *)

Formula

a(n) = A173037(n+1)/5.

A216309 The prime ending in 1 is the only prime in a decade.

Original entry on oeis.org

181, 211, 241, 421, 631, 661, 691, 811, 1021, 1051, 1171, 1201, 1381, 1471, 1511, 1531, 1801, 1811, 1831, 1951, 2161, 2221, 2251, 2311, 2521, 2621, 2731, 2861, 2971, 3001, 3121, 3191, 3271, 3331, 3361, 3391, 3571, 3931, 4111, 4201, 4231, 4261, 4621, 4691
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Comments

Primes of the form 10n+1 such that 10n+3, 10n+7, and 10n+9 are composite. - Charles R Greathouse IV, Sep 06 2012

Crossrefs

Subsequence of A030430. Cf. A032352, A007811, A078494.

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1}, AppendTo[t, ps[[1]]]], {n, 0, 588}]; t (* T. D. Noe, Sep 04 2012 *)
    Select[10*Range[500]+1,PrimeQ[#]&&AllTrue[#+{2,6,8},CompositeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 01 2018 *)

Formula

a(n) ~ 4n log n. - Charles R Greathouse IV, Sep 06 2012
Previous Showing 31-40 of 53 results. Next