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!)
A127423 a(1) = 1; for n > 1, a(n) = n concatenated with n - 1. 9

%I #33 Sep 08 2022 08:45:29

%S 1,21,32,43,54,65,76,87,98,109,1110,1211,1312,1413,1514,1615,1716,

%T 1817,1918,2019,2120,2221,2322,2423,2524,2625,2726,2827,2928,3029,

%U 3130,3231,3332,3433,3534,3635,3736,3837,3938,4039,4140,4241,4342,4443,4544,4645

%N a(1) = 1; for n > 1, a(n) = n concatenated with n - 1.

%C a(1) could also have been defined to be 10. In that case the initial terms would be 10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 1110, 1211, 1312, 1413, 1514, 1615, 1716, 1817, 1918, 2019, 2120, 2221, 2322, 2423, 2524, 2625, 2726, 2827, 2928, 3029, 3130, 3231, 3332, 3433, ... (Comment added in case someone is searching for that sequence.) - _N. J. A. Sloane_, Aug 11 2018

%C A010051(a(A054211(n))) = 1. - _Reinhard Zumkeller_, Jun 27 2015

%H Reinhard Zumkeller, <a href="/A127423/b127423.txt">Table of n, a(n) for n = 1..10000</a>

%e a(12) = 1211 because 12 and 11 are two consecutive decreasing numbers.

%p c2:=proc(x,y) local s: s:=proc(m) nops(convert(m,base,10)) end: x*10^s(y)+y: end: seq(c2(n,n-1),n=1..53); # _Emeric Deutsch_, Mar 07 2007

%t Join[{1}, nxt[n_] := Module[{idn = IntegerDigits[n + 1], idn1 = IntegerDigits[n]}, FromDigits[Join[idn, idn1]]]; Array[nxt, 70]] (* _Vincenzo Librandi_, Nov 08 2016 *)

%t nxt[{n_, a_}] := {n + 1, (n + 1) * 10^IntegerLength[n] + n}; NestList[nxt, {1, 1}, 50][[All, 2]] (* _Harvey P. Dale_, Jan 04 2019 *)

%o (Haskell)

%o a127423 n = a127423_list !! (n-1)

%o a127423_list = 1 : map read (zipWith (++) (tail iss) iss) :: [Integer]

%o where iss = map show [1..]

%o -- _Reinhard Zumkeller_, Oct 07 2014

%o (PARI) a(n) = if (n==1, 1, eval(Str(n, n-1))); \\ _Michel Marcus_, Oct 14 2016

%o (Magma) [Seqint(Intseq(n) cat Intseq(n+1)): n in [0..50]]; // _Vincenzo Librandi_, Nov 08 2016

%o (Scala) val numerStrs = (1 to 50).map(Integer.toString(_)).toList

%o val concats = (numerStrs.drop(1)) zip (numerStrs.dropRight(1))

%o concats.map(x => Integer.parseInt(x._1 + x._2)) // _Alonso del Arte_, Oct 24 2019

%Y Cf. A127421-A127424, A001704, A248378, A054211, A010051, A317947.

%K nonn,base

%O 1,2

%A _Artur Jasinski_, Jan 14 2007

%E More terms from _Emeric Deutsch_, Mar 07 2007

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 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)