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

A069489 Primes > 1000 in which every substring of length 3 is also prime.

Original entry on oeis.org

1013, 1019, 1031, 1097, 1277, 1373, 1499, 1571, 1733, 1811, 1997, 2113, 2239, 2293, 2719, 3079, 3137, 3313, 3373, 3491, 3499, 3593, 3673, 3677, 3733, 3739, 3797, 4013, 4019, 4211, 4337, 4397, 4673, 4877, 4919, 5233, 5419, 5479, 6011, 6073, 6079, 6131
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Comments

Minimum number of digits is taken to be 4 as all 3-digit primes would be trivial members.
Zero may occur only as second digit from left. - Zak Seidov, Dec 28 2020
All the digits after the two first digits from left are necessarily odd. - Bernard Schott, Mar 20 2022

Examples

			11317 is a term as the three substrings of length 3 i.e. 113,131 and 317 all are primes.
		

Crossrefs

Programs

  • Haskell
    a069489 n = a069489_list !! (n-1)
    a069489_list = filter g $ dropWhile (<= 1000) a000040_list where
       g x = x < 100 || a010051 (x `mod` 1000) == 1 && g (x `div` 10)
    -- Reinhard Zumkeller, Apr 07 2014
  • Mathematica
    Do[ If[ Union[ PrimeQ[ Map[ FromDigits, Partition[ IntegerDigits[ Prime[n]], 3, 1]]]] == {True}, Print[ Prime[n]]], {n, PrimePi[1000] + 1, 10^3}]
    Select[Prime[Range[169,800]],AllTrue[FromDigits/@Partition[ IntegerDigits[ #],3,1], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 05 2019 *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 12 2002

A069490 Primes > 1000 in which every substring of lengths 2 and 3 are also prime.

Original entry on oeis.org

1373, 3137, 3797, 6131, 6173, 6197, 9719, 11311, 11317, 17971, 31379, 61379, 71971, 113131, 113173, 113797, 131311, 131317, 131797, 179719, 317971, 431311, 431797, 617971, 1131131, 1131379, 1311311, 1313797, 1317971, 3131137, 3131311
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Comments

For all terms: substrings of length 3 correspond to one of the first 21 terms of A069489. - Reinhard Zumkeller, Jun 08 2015

Examples

			11317 is a term as the substrings of length 2, i.e., 11, 13, 31, 17 and the three substrings of length 3, i.e., 113, 131 and 317 are all prime.
		

Crossrefs

Programs

  • Haskell
    import Data.Set (fromList, deleteFindMin, union)
    a069490 n = a069490_list !! (n-1)
    a069490_list = f $ fromList [1..9] where
       f s | m < 1000               = f s''
           | h m && a010051' m == 1 = m : f s''
           | otherwise              = f s''
           where s'' = union s' $ fromList $ map (+ (m * 10)) [1, 3, 7, 9]
                 (m, s') = deleteFindMin s
       h x = x < 100 && a010051' x == 1 ||
             a010051' (x `mod` 1000) == 1 &&
             a010051' (x `mod` 100) == 1 && h (x `div` 10)
    -- Reinhard Zumkeller, Jun 08 2015
  • Mathematica
    Do[ If[ Union[ PrimeQ[ Map[ FromDigits, Partition[ IntegerDigits[ Prime[n]], 2, 1]]]] == Union[ PrimeQ[ Map[ FromDigits, Partition[ IntegerDigits[ Prime[n]], 3, 1]]]] == {True}, Print[ Prime[n]]], {n, PrimePi[1000] + 1, 10^5}]
     Select[Prime[Range[169,226000]],AllTrue[FromDigits/@Flatten[Table[ Partition[ IntegerDigits[ #],k,1],{k,{2,3}}],1],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 02 2021 *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 12 2002

A131648 Primes > 100 in which every multi-digit substring is also prime.

Original entry on oeis.org

113, 131, 137, 173, 179, 197, 311, 313, 317, 373, 379, 419, 431, 479, 613, 617, 619, 673, 719, 797, 971, 1373, 3137, 3797, 6131, 6173, 6197, 9719
Offset: 1

Views

Author

Tanya Khovanova, Sep 09 2007

Keywords

Comments

Minimum number of digits is taken to be 3 as all two-digit primes would be trivial members.

Examples

			9719 is a member becauase 97, 71, 19, 971, 719, 9719 are all primes.
		

Crossrefs

Cf. This sequence is a subsequence of A069488 - Primes > 100 in which every substring of length 2 is also prime.

Programs

  • Mathematica
    Select[Prime[Range[26,1300]],And@@PrimeQ[Flatten[Table[FromDigits/@ Partition[ IntegerDigits[#],n,1],{n,2,IntegerLength[#]-1}]]]&] (* Harvey P. Dale, Nov 03 2012 *)

A226108 Primes remaining prime if all but two digits are deleted.

Original entry on oeis.org

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 131, 137, 173, 179, 197, 311, 317, 431, 617, 719, 1117, 1171, 4111, 11113, 11117, 11119, 11131, 11171, 11173, 11197, 11311, 11317, 11719, 11731, 13171, 13711, 41113
Offset: 1

Views

Author

Tim Cieplowski, May 26 2013

Keywords

Comments

Subsequence of A069488.

Examples

			For a(3)=137, all pairs of two digits (in their original order) 13, 17, and 37 are prime.
		

References

  • C. Caldwell, Truncatable primes, J. Recreational Math., 19:1 (1987) 30-33.

Crossrefs

Programs

  • Mathematica
    testQ[n_] := n > 9 && Catch[Block[{d = IntegerDigits@n}, Do[If[! PrimeQ[ d[[j]] + 10*d[[i]]], Throw@False], {j, 2, Length@d}, {i, j-1}]; True]]; Select[Prime@ Range[10^5], testQ] (* Giovanni Resta, May 28 2013 *)

A242377 Greatest n-digit prime in which every two-digit string is also a prime.

Original entry on oeis.org

7, 97, 971, 9719, 97973, 979717, 9797371, 97973731, 979797979, 9797979713, 97979797171, 979797973117, 9797979797971, 97979797973173, 979797979797317, 9797979797979719, 97979797979797373, 979797979797971179, 9797979797979737971
Offset: 1

Views

Author

Robert G. Wilson v, May 12 2014

Keywords

Comments

To stay parallel with A090534, a(1) exists.
The greatest potential candidate, gpc(n), is of the form floor(10^n*97/99). The following is gpc(n)-a(n): 2, 0, 8, 78, 6, 80, 608, 6066, 0, 84, 808, 6680, 8, 6624, 662, 78, 606, 8618, 60008, 86, 600, 6000, 660, 608060, 808, ... .

Crossrefs

Programs

  • Mathematica
    fQ[p_] := Block[{id = IntegerDigits@ p}, Union@ PrimeQ[ FromDigits@# & /@ Partition[id, 2, 1]] == {True}]; f[n_] := Block[{p = NextPrime[10^n*97/99, -1]}, While[ !fQ@ p, p = NextPrime[p, -1]]; p]; f[1] = 7; Array[f, 19]

A070024 First prime > 10^n in which every substring of length n is prime.

Original entry on oeis.org

23, 113, 1013, 10139, 100379, 1000037, 10000379, 100000193, 1000001237, 10000000097, 100000000193, 1000000000193, 10000000001777, 100000000001831, 1000000000036931, 10000000000001873, 100000000000000691
Offset: 1

Views

Author

Robert G. Wilson v, Apr 12 2002

Keywords

Crossrefs

Cf. A179335. [From Reinhard Zumkeller, Jul 11 2010]

Programs

  • Mathematica
    Do[k = 10^n; While[ !PrimeQ[k] || Union[ PrimeQ[ Map[ FromDigits, Partition[ IntegerDigits[k], n, 1]]]] != {True}, k++ ]; Print[k], {n, 1, 25}]

A211683 Numbers > 100 such that all the substrings of length = 2 are primes.

Original entry on oeis.org

111, 113, 117, 119, 131, 137, 171, 173, 179, 197, 231, 237, 297, 311, 313, 317, 319, 371, 373, 379, 411, 413, 417, 419, 431, 437, 471, 473, 479, 531, 537, 597, 611, 613, 617
Offset: 1

Views

Author

Hieronymus Fischer, Jun 08 2012

Keywords

Comments

Only numbers > 100 are considered, since all 2-digit primes are trivial members. See A069488 for the sequence with prime terms > 100.
The sequence is infinite (for example, consider the continued concatenation of ‘11’ or of ‘13’: 111, 1111, 11111, ..., 131, 1313, 13131, ... are members).
Infinitely many terms are palindromic.

Examples

			a(2)=113, since all substrings of length = 2 are primes (11 and 13).
a(10)=197, since all substrings of length = 2 (19, 97) are primes.
		

Crossrefs

Showing 1-7 of 7 results.