OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..168
EXAMPLE
4k+1 primes are written in base 1, while 4k+3 primes are in base 3.
MATHEMATICA
Table[FromDigits@ If[#2 == 1, ConstantArray[1, #1], IntegerDigits[#1, #2]] & @@ {#, Mod[#, 4]} &@ Prime@ w, {w, 17}] (* Michael De Vlieger, Sep 04 2019 *)
PROG
(PARI) a(n) = {my(p=prime(n)); if ((p % 4) != 1, fromdigits(digits(p, p % 4), 10), fromdigits(vector(p, k, 1), 10)); } \\ Michel Marcus, Sep 04 2019
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 12 2002
STATUS
approved