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!)
A045708 Primes with first digit 2. 24
2, 23, 29, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
See A045707 for comments on density of these sequences.
MATHEMATICA
Select[Table[Prime[n], {n, 3000}], First[IntegerDigits[#]]==2 &] (* Vincenzo Librandi, Aug 08 2014 *)
PROG
(Haskell)
a045708 n = a045708_list !! (n-1)
a045708_list = filter ((== 2) . a000030) a000040_list
-- Reinhard Zumkeller, Mar 16 2012
(Magma) [p: p in PrimesUpTo(2300) | Intseq(p)[#Intseq(p)] eq 2]; // Vincenzo Librandi, Aug 08 2014
(Python)
from sympy import isprime
def agen(limit=float('inf')):
yield 2
digits, adder = 1, 20
while True:
for i in range(1, 10**digits, 2):
test = adder + i
if test > limit: return
if isprime(test): yield test
digits, adder = digits+1, adder*10
agento = lambda lim: agen(limit=lim)
print(list(agento(2222))) # Michael S. Branicky, Feb 23 2021
CROSSREFS
Cf. A000040.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
Cf. A000030, subsequence of A208272.
Column k=2 of A262369.
Sequence in context: A062653 A208272 A306086 * A090150 A106102 A053232
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
Offset fixed by Reinhard Zumkeller, Mar 15 2012
STATUS
approved

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 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)