login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A012884 Numbers such that every prefix and suffix is 1 or a prime. 5

%I #17 Nov 20 2019 07:52:08

%S 1,2,3,5,7,11,13,17,23,31,37,53,71,73,113,131,137,173,197,311,313,317,

%T 373,797,1373,1997,3137,3797,7331,73331,739397

%N Numbers such that every prefix and suffix is 1 or a prime.

%C Last term is 739397 (confirmed by _David W. Wilson_).

%C Intersection of A012883 and A143390. [_Reinhard Zumkeller_, Aug 13 2008]

%t prQ[n_] := n == 1 || PrimeQ[n];

%t okQ[n_] := Module[{dd, nd}, dd = IntegerDigits[n]; nd = Length[dd]; AllTrue[Range[nd], prQ@ FromDigits@ Take[dd, #]&] && AllTrue[Range[nd-1], prQ@ FromDigits@ Drop[dd, #]&]];

%t {1}~Join~Select[Prime@Range[60000], okQ] (* _Jean-François Alcover_, Nov 20 2019 *)

%Y Cf. A068669.

%K nonn,fini,full,nice,base

%O 1,2

%A Larry Calmer (larry(AT)wri.com), _Simon Plouffe_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)