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!)
A210511 Primes formed by concatenating k, k, and 1 for k >= 1. 8

%I #36 Jul 26 2022 21:59:03

%S 331,661,881,991,18181,20201,21211,26261,27271,32321,33331,41411,

%T 48481,51511,54541,57571,60601,65651,69691,71711,78781,86861,89891,

%U 90901,92921,98981,99991,1041041,1051051,1131131,1191191,1201201,1221221,1231231,1261261,1281281

%N Primes formed by concatenating k, k, and 1 for k >= 1.

%C This sequence is similar to A030458 and A052089.

%H Vincenzo Librandi, <a href="/A210511/b210511.txt">Table of n, a(n) for n = 1..1000</a>

%t Select[Table[FromDigits[Flatten[{IntegerDigits[n], IntegerDigits[n], {1}}]], {n, 100}], PrimeQ] (* _Alonso del Arte_, Jan 27 2013 *)

%t With[{nn=200},Select[FromDigits[Flatten[IntegerDigits[#]]]&/@Thread[ {Range[ nn],Range[nn],1}],PrimeQ]] (* _Harvey P. Dale_, Aug 17 2013 *)

%o (Python)

%o import numpy as np

%o def factors(n):

%o return reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))

%o for i in range(1,2000):

%o p1=int(str(i)+str(i)+"1")

%o if len(factors(p1))<3:

%o print(p1)

%o (Python)

%o from sympy import isprime

%o from itertools import count, islice

%o def agen(): yield from filter(isprime, (int(str(k)+str(k)+'1') for k in count(1)))

%o print(list(islice(agen(), 36))) # _Michael S. Branicky_, Jul 26 2022

%o (Magma) [nn1: n in [1..130] | IsPrime(nn1) where nn1 is Seqint([1] cat Intseq(n) cat Intseq(n))]; // _Bruno Berselli_, Jan 30 2013

%Y Cf. A030458, A052089.

%K nonn,easy,base

%O 1,1

%A _Abhiram R Devesh_, Jan 26 2013

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 September 14 10:49 EDT 2024. Contains 375921 sequences. (Running on oeis4.)