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.

A379150 Smallest prime ending in "3", with n preceding "0" digits.

This page as a plain text file.
%I A379150 #25 Dec 27 2024 13:04:27
%S A379150 103,2003,70003,100003,1000003,20000003,500000003,40000000003,
%T A379150 40000000003,100000000003,2000000000003,230000000000003,
%U A379150 3100000000000003,11000000000000003,20000000000000003,100000000000000003,1000000000000000003,310000000000000000003,500000000000000000003
%N A379150 Smallest prime ending in "3", with n preceding "0" digits.
%C A379150 Leading zeros are not allowed, e.g., "03".
%C A379150 a(997) has 1001 digits. - _Michael S. Branicky_, Dec 16 2024
%H A379150 Michael S. Branicky, <a href="/A379150/b379150.txt">Table of n, a(n) for n = 1..996</a>
%e A379150 a(1) = 103, is the smallest prime ending in "03";
%e A379150 a(2) = 2003, is the smallest prime ending in "003".
%t A379150 Table[i=1;While[!PrimeQ[m=FromDigits[Join[IntegerDigits[i],Table[0,n],{3}]]],i++];m,{n,19}] (* _James C. McMahon_, Dec 23 2024 *)
%o A379150 (Python)
%o A379150 import sympy
%o A379150 def prime3_finder():
%o A379150   outVec = []
%o A379150   power = 2
%o A379150   for n in range(100,999999999):
%o A379150       if not n & 3 == 3: continue # speed-up over simple MOD operation
%o A379150       if not n % 10**power == 3: continue
%o A379150       if not sympy.isprime(n): continue
%o A379150       outVec.append(n)
%o A379150       power += 1
%o A379150   return outVec
%o A379150 outvec = prime3_finder()
%o A379150 print(outvec)
%o A379150 (Python)
%o A379150 from sympy import isprime
%o A379150 from itertools import count
%o A379150 def a(n): return next(i for i in count(10**(n+1)+3, 10**(n+1)) if isprime(i))
%o A379150 print([a(n) for n in range(1, 20)]) # _Michael S. Branicky_, Dec 16 2024
%o A379150 (PARI) a(n)=for(i=1, oo, if(isprime(i*10^(n+1)+3), return(i*10^(n+1)+3))) \\ _Johann Peters_, Dec 27 2024
%Y A379150 Cf. A070854, A070847.
%K A379150 nonn,base
%O A379150 1,1
%A A379150 _James S. DeArmon_, Dec 16 2024
%E A379150 More terms from _Michael S. Branicky_, Dec 16 2024