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!)
A143390 Numbers in which every suffix (in base 10) is 1 or a prime. 5

%I #11 Nov 20 2019 07:52:35

%S 1,2,3,5,7,11,13,17,23,31,37,41,43,47,53,61,67,71,73,83,97,101,103,

%T 107,113,131,137,167,173,197,211,223,241,271,283,307,311,313,317,331,

%U 337,347,353,367,373,383,397,401,431,443,461,467,503,523,541,547,571,601

%N Numbers in which every suffix (in base 10) is 1 or a prime.

%C Subsequence of A042986 apart from first term; a(n+1)=A042986(n) for n<25.

%H Reinhard Zumkeller, <a href="/A143390/b143390.txt">Table of n, a(n) for n = 1..1000</a>

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

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

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

%o (PARI) is(n)=my(d=digits(n,10)); for(i=1,#d-1, if(!isprime(fromdigits(d[i..#d],10)), return(0))); isprime(d[#d]) || d[#d]==1 \\ _Charles R Greathouse IV_, Nov 26 2016

%Y Cf. A012883, A012884.

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Aug 13 2008

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 18 21:51 EDT 2024. Contains 371781 sequences. (Running on oeis4.)