A367362 Comma transform of the nonnegative integers.
1, 12, 23, 34, 45, 56, 67, 78, 89, 91, 1, 11, 21, 31, 41, 51, 61, 71, 81, 92, 2, 12, 22, 32, 42, 52, 62, 72, 82, 93, 3, 13, 23, 33, 43, 53, 63, 73, 83, 94, 4, 14, 24, 34, 44, 54, 64, 74, 84, 95, 5, 15, 25, 35, 45, 55, 65, 75, 85, 96, 6, 16, 26, 36, 46, 56, 66, 76, 86, 97, 7, 17, 27, 37, 47, 57, 67, 77, 87, 98, 8, 18
Offset: 0
Links
- Michael S. Branicky, Table of n, a(n) for n = 0..10000
- Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, The Comma Sequence: A Simple Sequence With Bizarre Properties, arXiv:2401.14346, Youtube
Programs
-
Maple
a:= n-> parse(cat(""||n[-1], ""||(n+1)[1])): seq(a(n), n=0..99); # Alois P. Heinz, Nov 22 2023
-
Mathematica
FromDigits /@ Partition[Rest@ Flatten[{First[#], Last[#]} & /@ IntegerDigits[Range[0, 120]]], 2, 2] (* Michael De Vlieger, Nov 22 2023 *)
-
Python
from itertools import count, islice, pairwise def S(): yield from (str(i) for i in count(0)) def agen(): yield from (int(t[-1]+u[0]) for t, u in pairwise(S())) print(list(islice(agen(), 82))) # Michael S. Branicky, Nov 22 2023
-
Python
def A367362(n): return (n%10)*10+int(str(n+1)[0]) # Chai Wah Wu, Dec 22 2023
Comments