login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A217407
Numbers of the form 3^r * 5^s whose decimal representation has a prime number of each digit 0-9.
13
38171039656829610443115234375, 129892841018736362457275390625, 1766298261467341813095601383375, 83480063729486358039093017578125, 715350795894273434303718560266875, 172661884789704345166683197021484375, 65186341275865666700926353804318984375, 5280093643345119002775034658149837734375
OFFSET
1,1
COMMENTS
This sequence in particular is motivated by the coincidence that both (2^41)*(3^43) and (3^43)*(5^47) have prime numbers of each digit.
LINKS
FORMULA
a(n) = 3^A217408(n) * 5^A217409(n).
EXAMPLE
The first term here is (3^35)*(5^17), corresponding to A217408(1)=35 and A217409(1)=17. Its decimal representation has two each of 0's, 2's, 7's, 8's and 9's; three each of 4's, 5's and 6's; and 5 each of 1's and 3's.
MAPLE
N:= 10^100: # to get all terms <= N
filter:= proc(n) local L, P, d;
L:= convert(n, base, 10);
P:= Vector(10);
for d in L do P[d+1]:= P[d+1]+1 od:
andmap(isprime, P);
end proc:
sort(select(filter, [seq(seq(3^r*5^s, r=0..floor(log[3](N/5^s))), s=0..floor(log[5](N)))])); # Robert Israel, May 08 2017
PROG
(PARI) prDigits(n)=my(d=digits(n), v=vector(10)); for(i=1, #d, v[d[i]+1]++); for(i=1, 10, if(!isprime(v[i]), return(0))); 1
list(lim)=my(v=List(), t); for(a=0, log(lim+.5)\log(5), t=5^a; while(t<=lim, if(prDigits(t), listput(v, t)); t*=3)); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 19 2013
KEYWORD
nonn,base,less
AUTHOR
James G. Merickel, Oct 02 2012
EXTENSIONS
More terms from Robert Israel, May 08 2017
STATUS
approved