OFFSET
1,2
EXAMPLE
For n = 7 we have 111 or 7 in base 2. For 8 we have 22 which is 8 in base 3.
MATHEMATICA
Table[If[PrimeQ[n], FromDigits[IntegerDigits[n, 2]], FromDigits[ IntegerDigits[ n, 3]]], {n, 50}] (* Harvey P. Dale, Apr 19 2015 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Cino Hilliard, Aug 29 2004
STATUS
approved