login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068669 Noncomposite numbers in which every substring is noncomposite. 8

%I

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

%T 1373,3137

%N Noncomposite numbers in which every substring is noncomposite.

%C It is easy to see that this sequence is complete - the only potential 5-digit candidate 31373 is not prime. - _Tanya Khovanova_, Dec 09 2006

%e 137 is a member as all the substrings, i.e. 1, 3, 7, 13, 37, 137, are noncomposite.

%e All substrings of 3137 are noncomposite numbers: 1, 3, 7, 13, 37, 137, 313, 3137. - _Jaroslav Krizek_, Dec 25 2011

%t noncompositeQ[n_] := n == 1 || PrimeQ[n]; Reap[ Do[ id = IntegerDigits[n]; lid = Length[id]; test = And @@ noncompositeQ /@ FromDigits[#, 10]& /@ Flatten[ Table[ Take[id, {i, j}], {i, 1, lid}, {j, i, lid}], 1]; If[test, Sow[n]], {n, Join[{1}, Prime /@ Range[10000]]}]][[2, 1]](* _Jean-Fran├žois Alcover_, May 09 2012 *)

%Y Cf. A012884, A062115, A202262.

%K base,nonn,fini,full

%O 1,2

%A _Amarnath Murthy_, Mar 02 2002

%E 1 added following a redefinition by _Jaroslav Krizek_. - _R. J. Mathar_, Jan 20 2012

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 14 01:55 EDT 2020. Contains 336476 sequences. (Running on oeis4.)