OFFSET
0,3
COMMENTS
See A260343 for the bases b such that B(b) = A_b(b) = b*c + (c - b)*(1 + b*c), is prime, where A_b is the base-b sequence, as here with b=16, and c = R(b,b) = (b^n-1)/(b-1) is the base-b repunit of length b.
LINKS
D. Broadhurst, Primes from concatenation: results and heuristics, NmbrThry List, August 1, 2015
FORMULA
For n < b = 16, we have a(n) = A_b(n) = R(b,n)^2, where R(b,n) = (b^n-1)/(b-1) are the base-b repunits.
EXAMPLE
a(0) = 0 is the result of the empty sum corresponding to 0 digits.
a(2) = (16+1)^2 = 16^2 + 2*16 + 1 = 121_16, concatenation of (1, 2, 1).
a(17) = 123456789abcdef101110fedcba987654321_16 is the concatenation of (1, 2, 3, ..., 9, a, ..., f, 10, 11, 10, f, e, ..., 1), where the middle "10, 11, 10" are the base-16 representations of 16, 17, 16.
PROG
(PARI) a(n, b=16)=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