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.

Showing 1-10 of 10 results.

A075597 a(1) = 3 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

3, 131, 11311, 3113111, 231131111, 22311311119, 3223113111199, 132231131111993, 11322311311119931, 7113223113111199313, 171132231131111993137, 31711322311311119931373, 3317113223113111199313733
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[Select[Flatten[Table[FromDigits[Join[{a},IntegerDigits[#],{b}]],{a,9},{b,1,9,2}]],PrimeQ][[1]]&,3,12] (* Harvey P. Dale, Nov 11 2022 *)

Extensions

More terms from Sascha Kurz, Jan 20 2003
One more term from David Wasserman, Jan 20 2005

A075598 a(1) = 5 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

5, 151, 11519, 2115193, 121151939, 21211519397, 4212115193971, 342121151939719, 43421211519397199, 2434212115193971993, 224342121151939719937, 122434212115193971993787, 51224342121151939719937871, 2512243421211519397199378719, 325122434212115193971993787197, 93251224342121151939719937871973
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,d,d1,v,x,y,y0,z,found;
      m:= ilog10(n);
      v:= infinity;
      for d from 2 do
        for d1 from 1 to d-1 do
          found:= false;
          for x from 10^(d1-1) to 10^d1-1 while not found do
            if d-d1=1 then y0:= 1 else y0:= 10^(d-d1-1)+1 fi;
            for y from y0 to 10^(d-d1)-1 by 2 do
              z:= y+10^(d-d1)*n + 10^(d-d1+m+1)*x;
              if isprime(z) then v:= min(v,z); found:= true; break fi
          od od;
        od;
        if v < infinity then return v fi
      od
    end proc:
    A[1]:= 5:
    for n from 2 to 20 do
      A[n]:= f(A[n-1])
    od:
    seq(A[n],n=1..20); # Robert Israel, Aug 28 2018

Extensions

More terms from Sascha Kurz, Jan 20 2003
Terms a(13) and beyond from Robert Israel, Aug 28 2018

A075596 a(1) = 2 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

2, 127, 11273, 1112731, 411127319, 34111273199, 3341112731993, 233411127319933, 32334111273199339, 3323341112731993391, 633233411127319933919, 66332334111273199339193, 1663323341112731993391937
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Jan 20 2003
One more term from David Wasserman, Jan 20 2005

A075599 a(1) = 7 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

7, 173, 11731, 2117317, 421173173, 34211731733, 1342117317337, 813421173173377, 28134211731733771, 4281342117317337713, 142813421173173377131, 21428134211731733771317, 2214281342117317337713171, 2022142813421173173377131711, 1120221428134211731733771317111
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Jan 20 2003
Further terms from Ray G. Opao, Nov 26 2004
a(14)-a(15) corrected by Sean A. Irvine, Feb 26 2025

A075600 a(1) = 11 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

11, 1117, 211177, 12111773, 1121117731, 1112111773139, 811121117731399, 18111211177313993, 5181112111773139933, 351811121117731399339, 63518111211177313993399, 11635181112111773139933991
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Jan 20 2003

A075601 a(1) = 13 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

13, 2131, 121313, 51213137, 3512131379, 135121313797, 21351213137977, 5213512131379777, 352135121313797771, 63521351213137977713, 16352135121313797771319, 9163521351213137977713193
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

Corrected and extended by Sascha Kurz, Jan 23 2003

A075602 a(1) = 17 and then the smallest prime that is obtained by placing digits on both sides of the previous term. Or smallest prime that encompasses a(n-1).

Original entry on oeis.org

17, 1171, 211711, 32117117, 6321171179, 263211711799, 42632117117999, 6426321171179993, 564263211711799931, 15642632117117999311, 1156426321171179993119, 311564263211711799931199
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Jan 23 2003

A224953 Number of ways a digit can be appended or prepended to n and form a prime.

Original entry on oeis.org

4, 9, 3, 9, 3, 3, 2, 9, 2, 6, 4, 6, 1, 7, 1, 2, 2, 5, 1, 9, 0, 4, 3, 6, 1, 2, 2, 6, 2, 5, 1, 8, 0, 5, 2, 2, 1, 6, 2, 6, 2, 6, 1, 7, 2, 1, 3, 6, 1, 5, 2, 3, 2, 5, 2, 1, 2, 8, 1, 6, 2, 7, 0, 6, 3, 2, 1, 7, 1, 4, 2, 5, 1, 7, 1, 2, 2, 6, 1, 5, 1, 4, 4, 7, 0, 3, 1
Offset: 0

Views

Author

Keywords

Comments

The prime number may be formed by adding a digit either before or after n, though only odd numbers can become prime by having digits added before n.
Appending a zero before n produces a prime if and only if n is prime. Conversely, for all prime numbers p, a(p) > 0.
In theory, a maximum of 7 digits could be added before any n, and 3 of the odd digits after n in cases where [10*n, 10*n+9] contains a number that is a factor of 3, 5 and 7 (the three single-digit odd primes). In practice, it appears that all 10 possibilities are never realized. There are 9 possibilities for n = {1, 3, 7, 19}.
The only example of a prime being formed two different ways is for n = 1, which can become 11 if a 1 is appended to either the front or the back. These are naively counted as two distinct alternatives. [This would also be true for n = A002275(A004023(k) - 1) for k > 1 as appending a 1 to either the front or the back forms the k-th repunit prime. - Michael S. Branicky, May 22 2024]
The term a(29587) is the first occurrence of 10. The primes are 29587, 129587, 329587, 429587, 729587, 929587, 295871, 295873, 295877, and 295879. This is the only occurrence of 10 for n < 10^8. - T. D. Noe, Apr 21 2013

Examples

			a(0) = 4 because there are 4 ways to concatenate a digit to 0 to produce a prime number: 02, 03, 05, and 07.
a(3) = 9 because a digit can be concatenated to 3 in 9 ways to produce a prime number: 03, 13, 23, 43, 53, 73, 83, 31, and 37.
		

Crossrefs

Cf. A069686.
Cf. A075595.
Index of zeros in this sequence: A124665.

Programs

  • Mathematica
    Table[num = IntegerDigits[n]; cnt = 0; Do[If[PrimeQ[FromDigits[Prepend[num, k]]], cnt++], {k, 0, 9}]; Do[If[PrimeQ[FromDigits[Append[num, k]]], cnt++], {k, 0, 9}]; cnt, {n, 0, 86}] (* T. D. Noe, Apr 20 2013 *)
  • R
    sapply(1:100, function(x) sum(sapply(as.numeric(c(paste0(0:9,x), paste0(x,c(1,3,7,9)))), is_prime  ))) # Christian N. K. Anderson, Apr 30 2024

A133781 Prime sequence overlaying the central digits of prime numbers. If possible, the value is greater than the previous one. Zero if no such embedding is possible.

Original entry on oeis.org

127, 131, 151, 173, 1117, 2131, 2179, 3191, 4231, 4297, 6311, 6373, 7411, 7433, 7477, 7537, 7591, 9613, 9677, 9719, 9733, 9791, 9833, 2897, 2971, 21011, 21031, 31079, 31091, 31139, 31271, 31319, 31379, 31391, 41491, 41513, 41579, 51631, 51673
Offset: 1

Views

Author

Enoch Haga, Sep 23 2007

Keywords

Comments

Breaks occur in the monotonic sequence at 2897, 12277, 12511, 24499, etc.
Each prime is exactly two digits longer than the embedded central prime.

Examples

			a(5) is 1117 because the 5th prime, 11, overlays the central digits of 1117, exactly. The prime 1117 is in monotonically increasing order beginning 127, 131, 151, 173, 1117, ....
		

Crossrefs

Programs

  • UBASIC
    10 C=26:Q=str(C):T=443
    20 'monotonically increasing primes
    30 'centered in primes
    40 'change val(m) in 100
    50 'adjust T in line 10 after every break
    60 N=101
    70 A=3:S=sqrt(N)
    80 B=N\A
    90 if B*A=N then N=N+2:goto 70
    100 A=A+2
    110 if A<=sqrt(N) then 80
    120 Z=str(N):W=alen(N):W=W-2:M=mid(Z,3,W): if M=Q then print C,N:stop
    130 if val(M)=nxtprm(T) then print Q,M,Z:T=val(M):stop
    140 C=C+1:Q=str(C)
    150 N=N+2:goto 70

Formula

Overlay the prime sequence in the exact center of a larger monotonically increasing prime sequence. If a break occurs resume at the break point and continue.

Extensions

Edited by Franklin T. Adams-Watters, Oct 04 2012

A133782 Indices of monotonically increasing primes which centrally enclose the prime sequence in A133781.

Original entry on oeis.org

31, 32, 36, 40, 187, 321, 327, 452, 580, 590, 821, 831, 940, 942, 946, 955, 965, 1186, 1194, 1198, 1200, 1208, 1213, 419, 429, 2362, 2367, 3348, 3350, 3353, 3372, 3375, 3381, 3383, 4339, 4341, 4347, 5284, 5288, 7995, 8000, 8001, 8009, 8011, 8016, 8887
Offset: 1

Views

Author

Enoch Haga, Sep 23 2007

Keywords

Comments

A break occurs at index 1213 of 9833 and 89 must be centrally located at index 419 prime 2897 and the monotonic sequence resumed from that point onward until the next break occurs

Examples

			a(23) is the index 1213 of prime 9833 where the prime 83 is centrally located.
		

Crossrefs

Programs

  • UBASIC
    10 C=26:Q=str(C):T=443 20 'monotonically increasing primes 30 'centered in primes 40 'change val(m) in 100 50 'adjust T in line 10 after every break 60 N=101 70 A=3:S=sqrt(N) 80 B=N\A 90 if B*A=N then N=N+2:goto 70 100 A=A+2 110 if A<=sqrt(N) then 80 120 Z=str(N):W=alen(N):W=W-2:M=mid(Z,3,W): if M=Q then print C,N:stop 130 if val(M)=nxtprm(T) then print Q,M,Z:T=val(M):stop 140 C=C+1:Q=str(C) 150 N=N+2:goto 70

Formula

Centrally enclose the prime sequence in another montotonically increasing prime sequence (if a break occurs begin over at that point)
Showing 1-10 of 10 results.