A217404 Numbers of the form 2^r * 7^s whose decimal representation has a prime number of each digit 0-9.
326249942735257021186048, 3059867626981844171358208, 1745397244661045235955007488, 3297183493952696040281709568, 53076679184360679286299951104, 55415762982862962349014692709376
Offset: 1
Examples
A217405(1)=36 and A217406(1)=15, giving this sequence's first value as (2^36)*(7^15). Its decimal representation can be seen to have two each of 0's, 1's, 3's, 5's, 6's, 7's, 8's and 9's; and three each of 2's and 3's (prime number counts of each digit).
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..18
Crossrefs
Programs
-
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(2^r*7^s, r=0..floor(log[2](N/7^s))),s=0..floor(log[7](N)))])); # Robert Israel, May 08 2017
-
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(7), t=7^a; while(t<=lim, if(prDigits(t), listput(v,t)); t<<=1)); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 19 2013
Extensions
Name changed to remove ambiguity by James G. Merickel, Sep 17 2013
Comments