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!)
A259937 Concatenation of the numbers from 1 to n with numbers from n down to 1. 6
11, 1221, 123321, 12344321, 1234554321, 123456654321, 12345677654321, 1234567887654321, 123456789987654321, 1234567891010987654321, 12345678910111110987654321, 123456789101112121110987654321 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For n < 700, only a(1) and a(10) are primes.
LINKS
FORMULA
a(n) = A007908(n) concatenated with A000422(n).
EXAMPLE
a(1) = 11.
a(5) = 1234554321.
MATHEMATICA
FromDigits /@ Flatten /@ IntegerDigits /@ (#~Join~Reverse@ # & /@ Table[Range@ n, {n, 12}]) (* Michael De Vlieger, Jul 10 2015 *)
PROG
(PARI) a(n)=my(r=""); for(i=0, n-1, r=concat(n-i, concat(r, n-i))); eval(r); \\ Anders Hellström, Aug 16 2015
(Python)
from itertools import chain
def A259937(n): return int(''.join(str(d) for d in chain(range(1, n+1), range(n, 0, -1)))) # Chai Wah Wu, Dec 20 2021
CROSSREFS
Sequence in context: A019524 A274766 A261138 * A078269 A015009 A068326
KEYWORD
nonn,base
AUTHOR
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 March 19 03:33 EDT 2024. Contains 370952 sequences. (Running on oeis4.)