[Question]
  [
Given a number > 0, output the sum with all digits (1 .. n) concatenated and reversed and add them up. For example, with n = 6:
The numbers 1 to 6 concatenated:
```
123456
```
Reversed:
```
654321
```
Adding them up together will result in: 777777. Another example is n = 11:
```
1 2 3 4 5 6 7 8 9 10 11 > 1234567891011
```
and
```
11 10 9 8 7 6 5 4 3 2 1 > 1110987654321
```
Adding them up together will result in `2345555545332`. This is also known as [A078262](https://oeis.org/A078262).
Shortest code wins!
  
[Answer]
# 05AB1E, 7 bytes
```
LDRJsJ+
```
[Try it online.](http://05ab1e.tryitonline.net/#code=TERSSnNKKw&input=Ng)
## Explanation
```
LDRJsJ+
L        range from 1 .. input
 D       duplicate
  R      reverse
   JsJ   convert both arrays to strings
      +  add (coerces both strings to ints)
```
[Answer]
# Jelly, 9 bytes
```
R,U$DF€ḌS
```
[![livecoding](https://i.stack.imgur.com/rOqhk.gif)](https://i.stack.imgur.com/rOqhk.gif)  
[Answer]
## CJam, ~~15~~ 14 bytes
Thanks to Martin for shaving a byte!
```
ri,:)_W%si\si+
```
[Try it online!](http://cjam.aditsu.net/#code=ri%2C%3A)_W%25si%5Csi%2B&input=11)
[Answer]
## Pyth, ~~12~~ 10 bytes
```
ssMjLk_BSQ
```
Thanks to [@FryAmTheEggman](https://codegolf.stackexchange.com/users/31625/fryamtheeggman) for 2 bytes!
`Q` is the input, `S` turns it into `[1, 2, ..., input()]`, `_B` bifurcates it over `_` (reverse) to create `[rng, rev(rng)]`, `jLk` maps it over `join` by `k` (which is the "empty string" variable), `sM` maps `int` over *this* resulting array, and `s` finally calculates the sum.
[Answer]
# Python 3, 74
Saved 6 bytes thanks to DSM.
Nothing too exciting, join the ranges and then convert to ints and add them.
```
lambda x:sum(int(''.join(list(map(str,range(1,x+1)))[::i]))for i in(1,-1))
```
[Answer]
# JavaScript (ES6), ~~70~~ ~~67~~ 64 bytes
```
a=>(z=[...Array(a)].map((b,c)=>c+1)).join``- -z.reverse().join``
```
Fixed to meet requirement, as old code was made under misunderstanding of the input.
[Answer]
# [Retina](https://github.com/mbuettner/retina), 71
* 7 bytes saved thanks to @daavko.
* 3 bytes saved thanks to [version 0.7.3 features](http://chat.stackexchange.com/transcript/message/27728253#27728253)
Because its blatantly the wrong tool for the job.
```
.+
$*a:$&$*
+`^(a+)a\b(.*)\b1(1+)$
$1 $& $3
 ?(\w)+ ?
$#1
\d+:?
$&$*c
c
```
[Try it online.](http://retina.tryitonline.net/#code=LisKJCphOiQmJCoKK2BeKGErKWFcYiguKilcYjEoMSspJAokMSAkJiAkMwogPyhcdykrID8KJCMxClxkKzo_CiQmJCpjCmM&input=Ng)
Works for inputs up to 6, but the online interpreter times out after that.
[Answer]
# Jolf, 9 bytes
[Try it here!](http://conorobrien-foxx.github.io/Jolf/#code=K1AQzrN6alBfzrM) Replace `►` with `\x10`.
```
+P►γzjP_γ
    zj    range 1...j
   γ      γ = ^
  ►        ^ .join("")
 P         as a number
+     P_γ  and γ reversed
```
I *may* be able to golf it by moving around the type casting.
[Answer]
## JavaScript (ES6), ~~67~~ 66 bytes
```
n=>(a=[...Array(n+1).keys()].slice(1)).join``- -a.reverse().join``
```
Yes, that's a space. Ugh. At least @Downgoat helped me save a byte.
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal) `s`, 5 bytes
```
ɾḂWvṅ
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=s&code=%C9%BE%E1%B8%82Wv%E1%B9%85&inputs=11&header=&footer=)
```
ɾ         range: [1 .. x]
 Ḃ        pop x, push x, reversed(x) [bifurcate]
  W       wrap the stack
   v      for each
    ṅ     join on ""
s (flag)  sum
```
-2 bytes thanks to Razetime
[Answer]
## Seriously, 12 bytes
```
,R;Rεj≈@εj≈+
```
[Try it online!](http://seriously.tryitonline.net/#code=LFI7Us61auKJiEDOtWriiYgr&input=Ng)
Explanation:
```
,R;Rεj≈@εj≈+
,R;           push two copies of range(1, input()+1)
   R          reverse one copy
    εj≈@εj≈   concatenate both and cast both to ints
           +  add
         
```
[Answer]
## PowerShell, 35 bytes
```
param($a)+-join(1..$a)+-join($a..1)
```
Converts the input to ranges with `..`, then `-join`s them together, and adds 'em up.
Will work for input numbers up to `138`, while `139` will give `Infinity`, and `140` and above will barf out an awesomely verbose casting error:
```
Cannot convert value "12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413
5136137138139140" to type "System.Int32". Error: "Value was either too large or too small for an Int32."
```
[Answer]
# Pyth - 8 bytes
```
siRT_BSQ
```
[Try it online here](https://pyth.herokuapp.com/?code=siRT_BSQ&input=6&debug=0).
[Answer]
# JavaScript (ES6), 99
This adds digit by digit, so it can handle numbers well above the 53 bits of precision of javascript
```
n=>eval("for(a=b=c=r='';n;a+=n--)b=n+b;for(i=a.length;i--;r=c%10+r)c=(c>9)-(-a[i]-b[i]);c>9?1+r:r")
```
**Test**
```
f=n=>eval("for(a=b=c=r='';n;a+=n--)b=n+b;for(i=a.length;i--;r=c%10+r)c=(c>9)-(-a[i]-b[i]);c>9?1+r:r")
// Less golfed
U=n=>{
  for(a=b=c=r=''; n; --n)
      b=n+b, a+=n;
  for(i=a.length; i--; r = c%10+r) 
      c=(c>9)-(-a[i]-b[i]);
  return c>9? 1+r : r;
}
function test() {
  var n=+I.value
  R.textContent=f(n)
}  
test()
```
```
N: <input id=I value=11 oninput="test()"> -> <span id=R></span>
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 24 bytes
```
:1fLrcC,Lc+C=.,{,.:1re?}
```
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 13 bytes
```
:tP2:"wVXvU]+
```
*EDIT (May 20, 2016) The code in the link uses `Xz` instead of `Xv`, owing to recent changes in the language.*
[**Try it online!**](http://matl.tryitonline.net/#code=OnRQMjoid1ZYelVdKw&input=MTE)
```
:                % range [1,2,...,n], where n is input
 tP              % duplicate and flip
   2:"     ]     % do this twice
      w          % swap
       V         % convert array of numbers to string with numbers and spaces
        Xv       % remove spaces
          U      % convert to number
            +    % add the two numbers
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 5 bytes
```
LJDR+
```
Explanation:
```
L     # Pushes an array containing 1 .. [implicit] input
 J    # Join the array to a string (eg. [1, 2, 3] -> 123)
  D   # Duplicate the array
   R  # Reverse the duplicate
    + # Add them together
```
[Try it online!](https://tio.run/nexus/05ab1e#@@/j5RKk/f@/2de8fN3kxOSMVAA "05AB1E – TIO Nexus")
[Answer]
# Bash + coreutils, 39
```
eval echo {1..$1} + {$1..1}|tr -d \ |bc
```
Or:
```
bc<<<`eval printf %s {1..$1} + {$1..1}`
```
[Ideone.](https://ideone.com/r43Gyg)
[Answer]
# [Perl 6](http://perl6.org), 25 bytes
```
{([~] @_=1..$^n)+[R~] @_}
```
```
{
  (
    [~]           # reduce with the string concatenation infix op:
    @_ = 1 .. $^n # the range 1 to input ( also stored in @_ )
  )
  +               # add that to
  [R~] @_         # @_ reduced in reverse
}
```
### Usage:
```
for 6, 11, 12 -> $n {
  say {([~] @_=1..$^n)+[R~] @_}( $n )
}
```
```
777777
2345555545332
244567776755433
```
[Answer]
# R, ~~34~~ ~~60~~ 64 bytes
```
f=pryr::f;g=f(as.numeric(paste(x,collapse='')));f(g(1:n)+g(n:1))
```
Assumes `pryr` package is installed. this gives `f` as a shorthand for creating functions.
Edit added 26 bytes but returns a function that works, not something entirely wrong.
Edit added another 4 bytes to handle cases above n=10 where strtoi (previously used) was returning `NA`
[Answer]
# Lua, 57
```
a=''b=''for i=1,...do a=a..i b=b.. ...-i+1 end return a+b
```
[Answer]
## Lua, 53 Bytes
This program takes `n` as a command-line argument.
```
s=""r=s for i=1,arg[1]do r,s=i..r,s..i end print(s+r)
```
I assumed that outputing a number with a decimal part of 0 was okay (in the form `777777.0` because this is the default way to output a number in lua (there's no distinction between integer and float)
[Answer]
# Perl 5, 37 bytes
25 bytes, plus 1 for `-p` and 11 for `-MList::Gen`
```
$_=<[.]1..$_>+<[R.]1..$_>
```
---
Previous solution, 40 bytes: 39, plus one for `-p`
```
@a=reverse@_=1..$_;$"=$\;$_="@a"+"@_"
```
[Answer]
# Perl, 36 bytes
Includes +1 for `-p`
Run with on STDIN
```
perl -p reverse.pl <<< 6
```
`reverse.pl`
```
$_=eval join"",map{abs||"+"}-$_..$_
```
[Answer]
## Haskell, ~~57~~ ~~56~~ 48 bytes
This could probably be golfed a bit more, but here it goes:
```
f x=read y+(read.reverse$y)where y=[1..x]>>=show
```
Edit: shaved off a space before the where.
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), 17 bytes
```
+/⍎¨∊¨⍕¨¨x(⌽x←⍳⎕)
```
`⎕` prompt for input  
`⍳`' enumerate until input  
`x←` store list in x  
`⌽` reverse x  
`x(`…`)` prepend reversed list with original list  
`⍕¨¨` convert each number of each list into character string  
`∊¨` make each list of character strings into single character strings  
`⍎¨` convert each character string into a number  
`+/` sum the two numbers.
[Answer]
# [Factor](https://factorcode.org/), 59 bytes
```
[ [1,b] dup reverse [ [ present ] map concat dec> ] bi@ + ]
```
[Try it online!](https://tio.run/##PYyxDsIwDER3vuJ2UKWsICE2xMKCmKoMrmugIqSpkyLx9cF0YDu9e3c34jJqvV5O5@MWLyqPRineJeMpGiUgqWSJBVmmWSJbsUiJNIsu@aeU8kk6mLZbOVdbtG7TefRzgspbTIWx/5e3XQKPkamgF94b6YYD1vCVKQQ09Qs "Factor – Try It Online")
* `[1,b]` Create a range from 1 to the input, inclusive.
* `dup reverse` Make a copy and reverse it.
* `[ [ present ] map concat dec> ] bi@` Convert them both to numbers of concatenated numbers.
* `+` Add.
[Answer]
# [Python 3](https://docs.python.org/3/), 79 bytes
```
a=''.join([str(i+1) for i in range(int(input()))])
print(int(a)+(int(a[::-1])))
```
[Try it online!](https://tio.run/##K6gsycjPM/7/P9FWXV0vKz8zTyO6uKRII1PbUFMhLb9IIVMhM0@hKDEvPVUjM68EiAtKSzQ0NTVjNbkKiiAiJRqJmtoQOtrKStcwFij9/78ZAA "Python 3 – Try It Online")
[Answer]
# [Thunno 2](https://github.com/Thunno/Thunno2) `s`, 4 [bytes](https://github.com/Thunno/Thunno2/blob/main/docs/codepage.md)
```
RJNḲ
```
[Try it online!](https://Not-Thonnu.github.io/run#aGVhZGVyPSZjb2RlPVJKTiVFMSVCOCVCMiZmb290ZXI9JmlucHV0PTExJmZsYWdzPXNl)
#### Explanation
```
RJNḲ  # Implicit input
R     # Push [1..input]
 J    # Join into a string
  N   # Convert to integer
   Ḳ  # Duplicate and reverse
      # Sum the stack
      # Implicit output
```
[Answer]
# Mathematica, 64 bytes
```
Plus@@FromDigits/@#&[""<>ToString/@#&/@{#,Reverse@#}&[Range@#]]&
```
]