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.

A098224 Number of primes <=10^n in which decimal digits are all distinct.

This page as a plain text file.
%I A098224 #22 Apr 24 2021 10:25:57
%S A098224 4,24,121,631,3160,13399,47349,137859,283086,283086,283086,283086,
%T A098224 283086,283086,283086,283086,283086,283086,283086,283086,283086,
%U A098224 283086,283086,283086,283086,283086,283086,283086,283086,283086,283086,283086,283086,283086,283086
%N A098224 Number of primes <=10^n in which decimal digits are all distinct.
%C A098224 Partial sums of A073532. - _Lekraj Beedassy_, Aug 02 2008
%C A098224 No number with more than 10 digits can have all of its decimal digits distinct, and no number that uses all ten distinct decimal digits can be prime (because the sum of all ten decimal digits is 45 so any such number is divisible by 3).  Therefore, every term in the sequence from and after a(9) is the same, i.e., 283086. - _Harvey P. Dale_, Dec 12 2010
%F A098224 a(n) = 283086 for n >= 9.
%t A098224 okQ[n_]:=Max[DigitCount[n]]==1
%t A098224 Table[Length[Select[Prime[Range[PrimePi[10^i]]],okQ]],{i,9}] (* _Harvey P. Dale_, Dec 12 2010 *)
%o A098224 (Python)
%o A098224 from sympy import sieve
%o A098224 def distinct_digs(n): s = str(n); return len(s) == len(set(s))
%o A098224 def aupton(terms):
%o A098224   ps, alst = 0, []
%o A098224   for n in range(1, terms+1):
%o A098224     if n >= 10: alst.append(ps); continue
%o A098224     ps += sum(distinct_digs(p) for p in sieve.primerange(10**(n-1), 10**n))
%o A098224     alst.append(ps)
%o A098224   return alst
%o A098224 print(aupton(35)) # _Michael S. Branicky_, Apr 24 2021
%Y A098224 Cf. A006880, A006879, A073532, A098226-A098227.
%K A098224 base,nonn
%O A098224 1,1
%A A098224 _Labos Elemer_, Oct 26 2004