login
a(2n) = concatenation of n+1 with n+2, a(2n+1) = concatenation of n+2 with n+1.
6

%I #15 Apr 19 2024 17:51:58

%S 12,21,23,32,34,43,45,54,56,65,67,76,78,87,89,98,910,109,1011,1110,

%T 1112,1211,1213,1312,1314,1413,1415,1514,1516,1615,1617,1716,1718,

%U 1817,1819,1918,1920,2019,2021,2120,2122,2221,2223,2322,2324,2423,2425,2524,2526

%N a(2n) = concatenation of n+1 with n+2, a(2n+1) = concatenation of n+2 with n+1.

%D Charles Duvall, Email to N. J. A. Sloane, Oct 07 2014.

%H Reinhard Zumkeller, <a href="/A248378/b248378.txt">Table of n, a(n) for n = 0..10000</a>

%t Table[{FromDigits[Join[IntegerDigits[n],IntegerDigits[n+1]]],FromDigits[Join[IntegerDigits[n+1],IntegerDigits[ n]]]},{n,30}]//Flatten (* _Harvey P. Dale_, Apr 19 2024 *)

%o (Haskell)

%o import Data.List (transpose)

%o a248378 n = a248378_list !! n

%o a248378_list = concat $ transpose [a001704_list, tail a127423_list]

%o -- _Reinhard Zumkeller_, Oct 07 2014

%Y Cf. A001704, A127423.

%Y Cf. A154530 (primes).

%K nonn,base,easy

%O 0,1

%A _N. J. A. Sloane_, Oct 07 2014