%I #51 Dec 31 2023 10:24:52
%S 1,12,23,34,45,56,67,78,89,910,1011,1112,1213,1314,1415,1516,1617,
%T 1718,1819,1920,2021,2122,2223,2324,2425,2526,2627,2728,2829,2930,
%U 3031,3132,3233,3334,3435,3536,3637,3738,3839,3940,4041,4142,4243,4344,4445,4546
%N Numbers whose decimal expansion is a concatenation of 2 consecutive increasing nonnegative numbers.
%C Primes in the sequence are in A030458. - _Bruno Berselli_, Mar 25 2015
%C a(n) always has an even number of digits unless n is in A103456. - _Alonso del Arte_, Oct 30 2019
%H N. J. A. Sloane, <a href="/A127421/b127421.txt">Table of n, a(n) for n = 1..25000</a>
%e a(1) = "0,1" = 1.
%e a(13) = "12,13" = 1213.
%p a:= n-> parse(cat(n-1, n)):
%p seq(a(n), n=1..55); # _Alois P. Heinz_, Jul 05 2018
%t nMax = 49; digitsList = IntegerDigits[Range[0, nMax]]; Table[FromDigits[Flatten[{digitsList[[n]], digitsList[[n + 1]]}]], {n, nMax - 1}] (* _Alonso del Arte_, Oct 24 2019 *)
%t Table[FromDigits[Flatten[IntegerDigits/@{n,n+1}]],{n,0,50}] (* _Harvey P. Dale_, May 16 2020 *)
%o (Magma) [Seqint(Intseq(n+1) cat Intseq(n)): n in [0..50]]; // _Bruno Berselli_, Mar 25 2015
%o (Python) for n in range(100): print(int(str(n)+str(n+1))) # _David F. Marrs_, Sep 17 2018
%o (Scala) val numerStrs = (0 to 49).map(Integer.toString(_)).toList
%o val concats = (numerStrs.dropRight(1)) zip (numerStrs.drop(1))
%o concats.map(x => Integer.parseInt(x._1 + x._2)) // _Alonso del Arte_, Oct 24 2019
%Y A variant of A001704.
%Y For concatenations of exactly k consecutive integers see A000027 (k = 1), A127421 (k = 2), A001703 (k = 3), A279204 (k = 4). For 2 or more see A035333.
%Y Cf. A030458, A127423, A127424, A127425, A103456.
%K nonn,base,easy
%O 1,2
%A _Artur Jasinski_, Jan 14 2007
%E More terms from _Joshua Zucker_, May 15 2007
|