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

%I #59 Jan 30 2024 14:33:43

%S 11,1221,123321,12344321,1234554321,123456654321,12345677654321,

%T 1234567887654321,123456789987654321,1234567891010987654321,

%U 12345678910111110987654321,123456789101112121110987654321

%N Concatenation of the numbers from 1 to n with numbers from n down to 1.

%C For n < 700, only a(1) and a(10) are primes.

%F a(n) = A007908(n) concatenated with A000422(n).

%e a(1) = 11.

%e a(5) = 1234554321.

%t FromDigits /@ Flatten /@ IntegerDigits /@ (#~Join~Reverse@ # & /@ Table[Range@ n, {n, 12}]) (* _Michael De Vlieger_, Jul 10 2015 *)

%o (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

%o (Python)

%o from itertools import chain

%o 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

%Y Cf. A000422, A007908, A244861.

%K nonn,base

%O 1,1

%A _José de Jesús Camacho Medina_, Jul 09 2015

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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)