%I #9 Jul 31 2020 16:41:56
%S 11,61,101,601,661,1061,1361,1601,2161,6011,6101,6361,6661,10061,
%T 10111,10601,11161,12161,16001,16061,16111,16361,16661,21601,21611,
%U 21661,36011,36061,36161,60101,60161,60601,60611,60661,61001
%N Primes which can be expressed as concatenation of powers of 6 and 0's.
%H Robert Israel, <a href="/A066597/b066597.txt">Table of n, a(n) for n = 1..10000</a>
%e 1361 is a term as it is a concatenation of 1, 36 and 1 which are powers of 6.
%p P[1]:= {1}: R:= NULL:
%p for d from 2 to 6 do
%p P[d]:= P[d-1]:
%p for i from 0 do
%p q:= 6^i; dq:= ilog10(q)+1;
%p if dq >= d then break fi;
%p qq:= 10^(d-dq)*q;
%p C:= map(t -> t + qq, P[d-dq]);
%p R:= R, op(select(isprime,C));
%p P[d]:= P[d] union C;
%p od
%p od:
%p A:= sort([R]); # _Robert Israel_, Jul 31 2020
%K base,easy,nonn,look
%O 1,1
%A _Amarnath Murthy_, Dec 21 2001
%E Corrected and extended by Christopher Lund (clund(AT)san.rr.com), Apr 14 2002
|