A260853 Base-3 representation of a(n) is the concatenation of the base-3 representations of 1, 2, ..., n, n-1, ..., 1.
0, 1, 16, 439, 35350, 2864599, 232046890, 18795930559, 1522471570630, 369960528437035, 269701223137448146, 196612191672080116867, 143330287729139571972130, 104487779754548024866115515, 76171591441065652665051372946, 55529090160536864641400481743827
Offset: 0
Examples
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.
Links
- D. Broadhurst, Primes from concatenation: results and heuristics, NmbrThry List, August 1, 2015
- Index entries for sequences related to Most Wanted Primes video
Crossrefs
Programs
-
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 *)
-
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))
Comments