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!)
A105436 Smallest prime that remains prime when a string of n 1's is appended to it. 1

%I #13 Aug 18 2017 03:13:10

%S 2,3,2,2,13,3,29,7,17,17,3,3,2,3,197,5,13,173,2,13,53,73,199,2,23,73,

%T 599,239,547,59,409,1009,1277,19,3,383,137,13,653,103,139,227,19,127,

%U 359,193,1123,3,97,1447,839,109,3,47,17,7,269,2,1657,1973,709,5233,809

%N Smallest prime that remains prime when a string of n 1's is appended to it.

%e a(2)=2 because it is the first prime followed by 3,41,101,107,113,137,... all remaining primes when 11 is appended to each of them.

%p with(numtheory); for n from 1 to 100 do for i from 1 to 5000 do if isprime(ithprime(i)*10^n + sum(10^j, j=0..n-1)) then printf(`%d,`, ithprime(i)); break; fi: od:od: # _James A. Sellers_, Apr 09 2005

%t f[n_] := Block[{k = 1, t = Table[1, {n}]}, While[id = IntegerDigits[ Prime[k]]; id[[ -1]] == 1 || !PrimeQ[ FromDigits[ Join[id, t]]], k++ ]; Prime[k]]; Table[ f[n], {n, 0, 62}] (* _Robert G. Wilson v_, Apr 09 2005 *)

%Y Cf. A065821, A105437.

%K nonn,base

%O 0,1

%A _Lekraj Beedassy_, Apr 08 2005

%E More terms from _Robert G. Wilson v_ and _James A. Sellers_, Apr 09 2005

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 March 29 09:59 EDT 2024. Contains 371268 sequences. (Running on oeis4.)