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) = 64 = (7+1)^2 = 7^2 + 2*7 + 1 = 121_7 is the concatenation of (1, 2, 1).
a(8) = 316621469105950 = 123456101110654321_7 is the concatenation of (1, 2, 3, 4, 5, 6, 10, 11, 10, 6, 5, 4, 3, 2, 1), where the middle "10, 11, 10" are the base-7 representations of 7, 8, 7.
MATHEMATICA
Table[FromDigits[Flatten[Join[IntegerDigits[Range[n], 7], IntegerDigits[ Range[ n-1, 1, -1], 7]]], 7], {n, 0, 20}] (* Harvey P. Dale, Nov 02 2017 *)
PROG
(PARI) a(n, b=7)=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