%I #16 Jun 29 2019 11:26:39
%S 0,1,64,3249,160000,7845601,384473664,131870760799,316621469105950,
%T 760208147660763999,1825259762561514314050,4382448689911580334132199,
%U 10522259304477772232578647150,25263944590051134455098854865399,60658730960712773989601560650105250
%N Base-7 representation of a(n) is the concatenation of the base-7 representations of 1, 2, ..., n, n-1, ..., 1.
%C Base-7 variant of A173426 (base 10) and A173427 (base 2). See A260853 - A260866 for variants in other bases.
%C The base 7 is not listed in A260343, because a(7) = A260851(7) = 131870760799 = 12345610654321_7 is not prime and therefore not in A260852. See these sequences for more information.
%H D. Broadhurst, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;af419558.1508">Primes from concatenation: results and heuristics</a>, NmbrThry List, August 1, 2015
%e a(0) = 0 is the result of the empty sum corresponding to 0 digits.
%e a(2) = 64 = (7+1)^2 = 7^2 + 2*7 + 1 = 121_7 is the concatenation of (1, 2, 1).
%e 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.
%t 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 *)
%o (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))
%K nonn,base
%O 0,3
%A _M. F. Hasler_, Aug 01 2015
|