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!)
A242990 Numbers n such that concatenating 1 with five instances of n produces a prime. 4

%I #16 Aug 19 2014 00:51:43

%S 9,21,41,101,143,171,249,251,297,329,333,347,357,489,509,531,537,557,

%T 569,611,629,653,657,669,731,773,821,843,861,941,957,983,993,1133,

%U 1143,1209,1229,1239,1313,1361,1409,1427,1451,1497,1539,1647,1673,1791,1833

%N Numbers n such that concatenating 1 with five instances of n produces a prime.

%H Jens Kruse Andersen, <a href="/A242990/b242990.txt">Table of n, a(n) for n = 1..10000</a>

%e 143 is included because 1143143143143143 is a prime.

%t cQ[n_,i_]:=Module[{idn=IntegerDigits[n]},PrimeQ[FromDigits[Flatten[Join[ {1},Table[ idn,{i}]]]]]]; Select[Range[2000],cQ[#,5]&]

%o (Python)

%o from sympy import isprime

%o for n in range(2*10**3):

%o ..if isprime(int('1'+5*str(n))):

%o ....print(n,end=', ')

%o # _Derek Orr_, Aug 17 2014

%o (PARI) s=[]; for(n=1, 10^4, d=length(Str(n)); if(isprime(10^(5*d)+(10^(5*d)-1)/(10^d-1)*n), s=concat(s, n))); s \\ _Jens Kruse Andersen_, Aug 18 2014

%Y Cf. A242987, A242988, A242989.

%K nonn,base,easy

%O 1,1

%A _Harvey P. Dale_, Aug 17 2014

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 16 00:59 EDT 2024. Contains 371696 sequences. (Running on oeis4.)