login
Primes written in the factorial base.
2

%I #28 Mar 18 2013 18:28:25

%S 10,11,21,101,121,201,221,301,321,1021,1101,1201,1221,1301,1321,2021,

%T 2121,2201,2301,2321,3001,3101,3121,3221,4001,4021,4101,4121,4201,

%U 4221,10101,10121,10221,10301,11021,11101,11201,11301,11321,12021,12121,12201,12321

%N Primes written in the factorial base.

%C The factorial base system uses 1!, 2!, 3!, ..., n! instead of powers of b, b^0, b^1, b^2, ... for some base b.

%C To be consistent with the normal base 10 system, the largest factorial used appears on the left.

%H Alois P. Heinz, <a href="/A214617/b214617.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A007623(A000040(n)).

%e prime(6) = 13 = 2*3! + 1! so a(6) = 201.

%p b:= proc(n, i) local r; `if`(n<i, n,

%p 10*b(iquo(n, i, 'r'), i+1)+ r)

%p end:

%p a:= n-> b(ithprime(n), 2):

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Mar 16 2013

%Y Cf. A000040, A007623.

%K nonn,base

%O 1,1

%A _Jon Perry_, Mar 06 2013