cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A090151 Primes of the form identical digits preceded by a 3.

This page as a plain text file.
%I A090151 #11 Oct 03 2022 13:16:08
%S A090151 3,31,37,311,311111,31111111111,311111111111,377777777777,
%T A090151 31111111111111,377777777777777777,
%U A090151 31111111111111111111111111111111111,311111111111111111111111111111111111111111111111
%N A090151 Primes of the form identical digits preceded by a 3.
%H A090151 Vincenzo Librandi, <a href="/A090151/b090151.txt">Table of n, a(n) for n = 1..18</a>
%t A090151 Select[ FromDigits /@ Flatten[ Table[ PadRight[{3}, i, # ] & /@ {1, 2, 3, 4, 5, 6, 7, 8, 9}, {i, 2, 24}], 1], PrimeQ[ # ] &]
%t A090151 Select[Union[Flatten[Table[FromDigits[PadRight[{3},n,c]],{n,1000},{c,{1,7}}]]],PrimeQ] (* _Harvey P. Dale_, Oct 03 2022 *)
%o A090151 (Python)
%o A090151 from sympy import isprime
%o A090151 def afind(terms):
%o A090151   print(3, end=", ")
%o A090151   digits, n = 1, 1
%o A090151   while n < terms:
%o A090151     for id in "17":
%o A090151       t = int('3' + id*digits)
%o A090151       if isprime(t): print(t, end=", "); n += 1
%o A090151     digits += 1
%o A090151 afind(12) # _Michael S. Branicky_, Mar 31 2021
%K A090151 nonn,base
%O A090151 1,1
%A A090151 _Robert G. Wilson v_, Nov 22 2003