OFFSET
1,3
MAPLE
A171008 := proc(n) local p2 ; p2 := convert(ithprime(n), base, 2) ; add( (1-op(i, p2)) *10^(i-1), i=1..nops(p2)) ; end proc: seq(A171008(n), n=1..80) ; # R. J. Mathar, Sep 04 2010
MATHEMATICA
FromDigits/@(IntegerDigits[#, 2]&/@Prime[Range[40]]/.{0->1, 1->0}) (* Harvey P. Dale, Aug 19 2017 *)
PROG
(PARI) a(n)=my(v=binary(prime(n)), k=1/10); sum(i=0, #v-1, k*=10; (1-v[ #v-i])*k) \\ Charles R Greathouse IV, Sep 08 2010
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 03 2010
EXTENSIONS
More terms from Charles R Greathouse IV and R. J. Mathar, Sep 04 2010
STATUS
approved