login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261138 The concatenation of 123456...n and the reverse of this number. 1
11, 1221, 123321, 12344321, 1234554321, 123456654321, 12345677654321, 1234567887654321, 123456789987654321, 1234567891001987654321, 12345678910111101987654321, 123456789101112211101987654321, 1234567891011121331211101987654321, 12345678910111213144131211101987654321 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let R(n) denote the number obtained by formally reversing the digits of n, including any leading zeros that may appear; a(n) is the decimal concatenation of 1,2,...,n,R(n),R(n-1),...,R(3),R(2),R(1). - N. J. A. Sloane, Dec 01 2021
A palindromic version of A173426.
Has same start as A259937, but A259937 generates non-palindromic terms for n>9.
All terms are multiples of 11 (cf. A349805).
LINKS
FORMULA
a(n) = concatenate( A007908(n), A138793(n) retaining leading zeros).
EXAMPLE
For n=10 we concatenate 1,2,3,...,10,01,9,8,...3,2,1 getting 1234567891001987654321.
MAPLE
with(StringTools);
myReverse := n -> Reverse(convert(n, string));
A349804:=proc(n) local i, L, R;
L:=""; R:="";
for i from n to 1 by -1 do
L:=Join( [convert(i, string), L], "");
R:=Join( [R, myReverse(convert(i, string))], "");
od:
parse(Join([L, R], ""));
end proc; # N. J. A. Sloane, Dec 01 2021
# second Maple program:
a:= n-> (s-> parse(cat(s, seq(s[-i], i=1..length(s)))))(cat("", $1..n)):
seq(a(n), n=1..14); # Alois P. Heinz, Dec 01 2021
MATHEMATICA
Table[d = Flatten[IntegerDigits /@ Range@ n]; FromDigits@ Flatten[{d, Reverse@ d}], {n, 13}] (* Michael De Vlieger, Aug 20 2015 *)
PROG
(Python)
def A349804(n): return int((lambda x: x+x[::-1])(''.join(str(d) for d in range(1, n+1)))) # Chai Wah Wu, Dec 01 2021
CROSSREFS
Sequence in context: A233012 A019524 A274766 * A259937 A078269 A015009
KEYWORD
nonn,base
AUTHOR
Umut Uludag, Aug 10 2015
EXTENSIONS
More than the usual number of terms are shown in order to distinguish this from several similar sequences.
Edited by N. J. A. Sloane, Dec 11 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)