OFFSET
0,3
COMMENTS
LINKS
D. Broadhurst, Primes from concatenation: results and heuristics, NmbrThry List, August 1, 2015
EXAMPLE
a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = 16 = 121_3 is the concatenation of (1, 2, 1).
a(3) = 439 = 121021_3 is the concatenation of (1, 2, 10, 2, 1), where the middle "10" is the base-3 representation of 3.
MATHEMATICA
Join[{0}, Table[FromDigits[Join[Flatten[IntegerDigits[Range[n], 3]], Flatten[ Reverse[ Most[ IntegerDigits[Range[n], 3]]]]], 3], {n, 20}]] (* Harvey P. Dale, Mar 11 2019 *)
PROG
(PARI) a(n, b=3)=sum(i=1, #n=concat(vector(n*2-1, k, digits(min(k, n*2-k), b))), n[i]*b^(#n-i))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Aug 01 2015
STATUS
approved