The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A090151 Primes of the form identical digits preceded by a 3. 2

%I #11 Oct 03 2022 13:16:08

%S 3,31,37,311,311111,31111111111,311111111111,377777777777,

%T 31111111111111,377777777777777777,

%U 31111111111111111111111111111111111,311111111111111111111111111111111111111111111111

%N Primes of the form identical digits preceded by a 3.

%H Vincenzo Librandi, <a href="/A090151/b090151.txt">Table of n, a(n) for n = 1..18</a>

%t Select[ FromDigits /@ Flatten[ Table[ PadRight[{3}, i, # ] & /@ {1, 2, 3, 4, 5, 6, 7, 8, 9}, {i, 2, 24}], 1], PrimeQ[ # ] &]

%t Select[Union[Flatten[Table[FromDigits[PadRight[{3},n,c]],{n,1000},{c,{1,7}}]]],PrimeQ] (* _Harvey P. Dale_, Oct 03 2022 *)

%o (Python)

%o from sympy import isprime

%o def afind(terms):

%o print(3, end=", ")

%o digits, n = 1, 1

%o while n < terms:

%o for id in "17":

%o t = int('3' + id*digits)

%o if isprime(t): print(t, end=", "); n += 1

%o digits += 1

%o afind(12) # _Michael S. Branicky_, Mar 31 2021

%K nonn,base

%O 1,1

%A _Robert G. Wilson v_, Nov 22 2003

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 May 25 12:29 EDT 2024. Contains 372788 sequences. (Running on oeis4.)