OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
MATHEMATICA
With[{p = Prime@ Range@ PrimePi@ 9}, Array[If[OddQ@ #1, Map[FromDigits@ Join[#, Reverse@ Most@ #] &, #2], Map[FromDigits@ Join[#, Reverse@ #] &, #2]] & @@ {#, Tuples[p, {Ceiling[#/2]}]} &, 5]] // Flatten (* Michael De Vlieger, Jan 28 2020 *)
PROG
(PARI) a(n)={my(k=4); while(n>2*k, n-=2*k; k*=4); my(v=[d*2+1+(!d)|d<-digits(k+n-1, 4)]); fromdigits(concat(v[2..#v-(n<=k)], Vecrev(v[2..#v])))} \\ Andrew Howroyd, Jan 27 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 27 2003
EXTENSIONS
Terms a(33) and beyond from Andrew Howroyd, Jan 27 2020
STATUS
approved