g | x | w | all
Bytes Lang Time Link
042Swift 6250425T214713ZmacOSist
186Bespoke250423T051234ZJosiah W
023Raku250415T170215Zxrs
085SAKO250415T163939ZAcrimori
036Lua250415T134523Zbluswimm
032Ruby n250414T132022ZJordan
052Tcl180704T004104Zsergiol
028AWK250304T174516Zxrs
170jbasher2250225T153622Zmadeforl
009Uiua 0.15.0dev.2250224T204839ZTbw
004Japt m180704T150306ZShaggy
016YASEPL250224T155020Zmadeforl
006cQuents180704T004950ZStephen
041Desmos250223T214843ZDesmosEn
028Julia230602T194851ZMarcMush
3625Vyxal230523T043741Zlyxal
nan230523T150537ZBartosz
107Scratch230523T122232ZRhaixer
076Rockstar230523T084741ZShaggy
nan221010T151653Zbigyihsu
046Nim221010T144254ZMichael
005Vyxal221010T132543ZDialFros
025Juby221009T153401ZJordan
012Ly221010T000909Zcnamejj
042Gema221009T232059Zmanatwor
027jq181015T101217Zmanatwor
004Vyxal221009T141833ZnaffetS
070Nim221009T194003ZnaffetS
nanFig221009T182048ZSeggan
029Knight221009T190409ZnaffetS
041Kotlin180923T025905Zsnail_
088Blossom180705T202300ZIMP1
045Dart181019T093904ZElcan
013><>181015T103205ZTeal pel
094MBASIC180923T232444Zwooshiny
013K ngn/k180704T000440Zngn
011Gol><>181006T092706ZGegell
004MathGolf180922T222521ZJo King
033Runic Enchantments180923T195418ZDraco18s
016Microscript II180923T220655ZSuperJed
006Pyth180706T043605Zu-ndefin
310Shakespeare Programming Language180922T162355ZJosiahRy
068Pepe180731T133238Zu-ndefin
042Python 2180731T140839Zmbomb007
031VBA Excel180731T095526Zremoel
015Noether180731T091710ZBeta Dec
043Swift 4180731T084844Zbuttercr
033Ruby180711T180512ZAsone Tu
062Lua180729T051717ZVisckmar
056Bash180723T010825ZAneesh D
022TIBasic180722T234511ZOki
035Haskell180721T211930Zბიმო
044Python 3180709T040531ZJathOsh
048Kotlin180713T222124ZRoland S
053QBasic180710T154529ZDLosc
072Twig180712T100818ZIsmael M
052Python 2.7180712T074928ZStealthy
020ARBLE180710T152858ZATaco
039C180708T195652ZGeo
072RAD180711T025243ZAdalynn
033DC180710T205348ZFlexEast
043Python 3180704T012456ZJo King
063MATLAB180708T015907Zaaaaa sa
043C gcc180704T042345ZErikF
093D180708T025512ZConor O&
108Rutger180708T151933Zuser8153
048yup180708T024320ZConor O&
015Attache180708T021553ZConor O&
009Husk180704T082056ZEsolangi
036Momema180704T063003ZEsolangi
029dc180705T191238ZSophia L
051C Sharp180706T141151ZIEatBage
012K oK180706T134248Zmkst
043Javascript180706T130329ZIEatBage
034dc180706T130203Zbrhfl
032PHP180706T071423ZCrypto
037Yabasic180705T160248ZTaylor R
029Excel VBA180705T160738ZTaylor R
041Python 2180706T083802ZTFeld
029R180705T212743ZMickyT
032R180704T015425ZGiuseppe
054Clojure180705T201631ZCarcigen
021Perl 5180704T043830ZXcali
033Forth gforth180705T154824Zreffu
026Powershell180704T073927Zmazzy
035Groovy180705T135406Zblblu
703Shakespeare180705T115201ZAl R
101ABAP180705T081236ZNoir Ant
014J180705T012752Zdram
003Jelly180704T191722ZJonathan
020J180704T164731Zljeabmre
006Panacea180704T145151ZOkx
034Haskell180704T144334ZLaikoni
046C# Visual C# Compiler180704T143323ZJeppe St
nan180704T094726Zauhmaan
039Python 3180704T133959ZDennis
054C# Visual C# Compiler180704T132705Zraznagul
041Python 2180704T022639ZJo King
027RAD180704T011654ZAdalynn
009MATL180704T132025ZGiuseppe
005Japt m180704T024649ZBubbler
029Perl 5180704T111610ZDenis Ib
048Java180704T103153ZO.O.Bala
037Haskell180704T101615Zuser2866
056Rust180704T095343Znull
043Python 2180704T081240ZElPedro
018Perl 6180704T011839ZJo King
009APL Dyalog Classic180704T070246Zngn
006Brachylog180704T070020ZFatalize
056Red180704T063704ZGalen Iv
00605AB1E180704T063536ZEmigna
011CJam180704T054409ZEsolangi
055Haskell180704T005719ZAmphibol
025JavaScript Node.js180704T025434Ztsh
044Python 2180704T021002ZUriel
012APL Dyalog180704T005420ZUriel
004Jelly180704T014205ZDennis
019Cubix180704T014155ZMickyT
006Canvas180704T002700Zdzaima
037Haskell180704T005912ZDoorknob
013APL Dyalog Classic180704T005835ZAdalynn
006Jelly180704T002106Zdylnan

Swift 6, 42 bytes

let p={(0...$0).map{Int("\($0)\($0+1)")!}}

Bespoke, 186 bytes

find N&N+I,given N
program counter is stored as zero
display it if that equals a nonzero sum
increase
display it once always
I put in chr to border by it:spaces
continue counting in loop

Raku, 23 bytes

{say +($!++~$!)for ^$_}

Try it online!

{say      # print
+(        # coerce int
$!        # special var ($! = 0)
++        # post inc
~         # concat
$!        # new $x
)for ^$_} # until N iterations

SAKO, 85 bytes

PODPROGRAM:F(N)
*)DRUKUJ(9,0):(I-1)×10*ENT(((LN(I))/LN(10))+1)+I
POWTORZ:I=1(1)N
WROC

I use here a quite simple approach:
We take a number I, multiply it by 10*(length of I+1), add I+1 to it, and print the result. It's repeated until I+1 = N.

I just use here I-1 and I instead for some byte saving.

Full programme version, 87 bytes

CZYTAJ:N
*1)DRUKUJ(9,0):(I-1)×10*ENT(((LN(I))/LN(10))+1)+I
POWTORZ:I=1(1)N
STOP1
KONIEC

Lua, 36 bytes

for i=1,...do print(~~((i-1)..i))end

Try it online!

Ruby -n, 32 bytes

Takes input on stdin.

puts 1,(?1...$_).map{_1+_1.succ}

Attempt This Online!

We could save two bytes by using -p but it prints a mixed, ragged array and I hate it:

$_=1,(?1...$_).map{_1+_1.succ}

Attempt This Online!

Tcl, 52 bytes

proc C n {puts 1;time {puts [incr i][expr $i+1]} $n}

Try it online!


# [Tcl], 56 bytes
proc C {n i\ 0} {time {puts [expr $i?$i:""][incr i]} $n}

Try it online!

PS: I will golf it more later!

AWK, 28 bytes

{for(;$0--;)print(x?x:X)++x}

Attempt This Online!

jbasher2, 170 bytes

create a with type number
create b with type number
ask for input
set that to a
set 1 to b
output 1
while b < a
output inline b
add 1 by b
set that to b
output b
endwhile

lol

Uiua 0.15.0-dev.2, 9 bytes SBCS

⧈⍜∩°⋕⊂⇡+1

Try on Uiua Pad!

I love the leniency of under both.

Explanation

⧈⍜∩°⋕⊂⇡+1
      ⇡+1 # range 0,...,n
⧈         # for each pair...
  ∩°⋕     # un-parse (stringify) both
     ⊂    # join together
 ⍜∩°⋕    # then un-un-parse the string 

Japt -m, 5 4 bytes

°s+U

Try it

YASEPL, 16 bytes

=a'=b+<`1~+<}2,a

explanation:

=a'=b+<`1~+<}2,a     packed
=a'                  get amount of numbers to print (A)
   =b+<              initialize, increment, and output the incrementer (B)
       `1   }2,a     while B < A....
         ~               print B inline
          +              increment
           <             print B with newline

cQuents, 11 6 bytes

&$-1~$

Try it online!

Explanation

&         Mode & for input n, output first n terms in sequence
          each term is
 $                     current index
  -1                                 - 1
    ~                                    concat
     $                                          current index

Desmos, 41 bytes

f(k)=10^{ceil(log(n+2))}n+n+1
n=[0...k-1]

This works by shifting n over a number of place values determined by how many digits n+1 is. This shifted n is then simply added to n+1 to get the final result.

Try it no Desmos!

Julia, 28 bytes

!n=["1";2:n.|>i->"$(i-1)$i"]

Try it online!

based on the answer by Sundar R

Vyxal, 29 bitsv2, 3.625 bytes

ʀzṅ⌊

Try it Online!

Explained

ɾzṅ
ɾ   # range [1, input]
 z  # overlapping pairs (equivalent to 2l)
  ṅ # concatenate each pair into a single string

SAS

Input is passed by:

%let n=123;

4GL - 38

data;
do i=1to &n;x=cats(i-1,i)+0;put x;end;
run;

The data; and run; are obligatory for every 4GL data step, so the code effectively doing the job is in line 2.

Macrolanguage - 44

%macro 
m(n,x);%do i=1%to&n;%put&x&i;%let x=&i;%end;
%mend;

The %macro and %mend; are obligatory for every Macroprogram, so the code effectively doing the job is in line 2.

To run macro execute:

%m(&n)

Scratch, 107 bytes

enter image description here

define(y
delete all of[x v
set[i v]to(0
repeat(y
add((join(i)((i)+(1)))-())to[x v
change[i v]by(1
end
say(x

I would've used for each, but scratchblocks doesn't support it.

Rockstar, 76 bytes

listen to N
X's 0
while N-X
let S be X
let X be+1
let S be+""+X
cast S
say S

Try it here (Code will need to be pasted in)

listen to N       :Read input string into variable N
X's 0             :Initialise X as 0
while N-X         :While X is less than N
let S be X        :  Assign X to S
let X be+1        :  Increment X
let S be+""+X     :  Append X to S
cast S            :  Cast S to an integer
say S             :  Output S

Go, 122 bytes, using string operations

import(."strconv";."fmt")
func f(n int)(o[]int){for i:=0;i<n;i++{k,_:=Atoi(Sprintf("%d%d",i,i+1))
o=append(o,k)}
return o}

Attempt This Online!

Go, 125 bytes, using formula

import."math"
func f(n int)(o[]int){for i:=0;i<n;i++{o=append(o,i*int(Pow10(1+int(Floor(Log10(float64(i)+1)))))+i+1)}
return}

Attempt This Online!

Uses the formula \$a(n) = n\cdot10^{1 + \lfloor\log_{10}(n+1))\rfloor} + n + 1\$ for \$n \ge 0\$.

Nim, 46 bytes

proc(x:any)=
 echo 1;for i in(2..x):echo i-1,i

Try it online!

Vyxal, 5 bytes

ʀ¨pJ⌊

Try it Online!

Explained

ʀ¨pJ⌊
ʀ     # Inclusive zero range
 ¨p   # each overlapping pair
   J  # merge
    ⌊ # floor

J-uby, 26 25 bytes

-1 byte thanks to Razetime

:*|:*&(-[I,:+&1]|:join|Z)

Attempt This Online!

Explanation

:* |              # Range 0..n-1, then
:* & (            # map with ...
  -[I, :+ & 1] |  #   [m, m+1] (I is identity), then
  :join |         #   join, then
  Z               #   convert to int (for special case "01")
)

Ly, 12 bytes

Rrp[:u`u' o]

Try it online!

This is pretty brute force, but short enough to warrant a post I think...

R            - generate an inclusive rangefrom "0" to the STDIN number
 rp          - reverse the stack, delete the "0"
   [       ] - for each number on the stack...
    :u       - duplicate number, print it
      `u     - increment the number, print it
        ' o  - print a space

AWK, 26 bytes

a=$1{for(;a;a--)$a=a a+1}1

Try it online!

Turns out that a version in AWK is pretty short too, so here's that one...

a=$1                       - stash the number we want
    {                   }  - code always runs if STDIN>0
     for(;a;a--)           - loop for N, N-1, N-2, ... 1
                $a=a a+1   - set positional var to N appended w/ N+1
                         1 - print all the positional vars we just set

This really just abuses the fact that AWK will reset the positional variable count if you set them to a value. And it uses a "truthy" condition with no associated code block to print them all.

Gema, 42 characters

*=@repeat{*;${n;}@set{n;@add{${n;};1}}$n }

Sample run:

bash-5.1$ gema '*=@repeat{*;${n;}@set{n;@add{${n;};1}}$n }' <<< 5
1 12 23 34 45 

Try it online!

jq, 30 27 characters

1,(range(1;.)|"\(.)\(.+1)")

Sample run:

bash-5.1$ jq -r '1,(range(1;.)|"\(.)\(.+1)")' <<< 5
1
12
23
34
45

Try it online!

Vyxal, 4 bytes

ƛ‹p⌊

Try it Online!

Nim, 70 bytes

import sugar,sequtils,math
s(x=>toSeq(1..x).map y=>(y-1)*10^len($y)+y)

Attempt This Online!

Fig, \$8\log_{256}(96)\approx\$ 6.585 bytes

Mrx'_Jx}

Try it online!

Mrx'_Jx}
Mrx'     # For every number in the range [0, input)
       } # Input + 1
     Jx  # Prepend the input to that
    _    # Parse as number to remove leading 0s

Knight, 29 bytes

;=n+0P;=i 0W>n iO+0++""i=i+1i

Try it online!

Kotlin, 43 41 bytes

{(1..it).mapIndexed{i,v->"$i$v".toInt()}}

Try it online!

Blossom, 88 bytes

rule e<int x>[1(x)]=>[1(x-1),2(str(x)+str(x+1))];rule c[1(0)]=>[];e!c

Blossom is a graph programming language I'm working on. It can only take graphs as inputs, so this programme expects a graph comprising a single node with its label an integer. It returns a graph of connected edges to form the closest to an array I can get, and the resultant graph is printed to output.

An unminified version of the code is this:

rule expand <int x>
    [ 1 (x) ]
 => [ 1 (x-1), 2(str(x)+str(x+1)) ]
where x > 0;

rule clean
    [ 1 (0) ]
 => [];

expand! clean

It defines two rules: one called expand, which (while there is a node with an integer-valued label in the current graph) creates another node with its increment concatenated, and lowers the value. This rule also has the condition that x is greater than 0.

The ! executes this rule for as long as it can be applied on the graph, so in this case it will execute until x is 0. And then the clean rule removes this 0 node.

Blossom was not made for golfing, but it doesn't do too badly, I don't think., considering what it is. There currently isn't really an easy way for people to test blossom code (and the interpreter I'm working on at the moment is not quite finished and a little buggy), but this isn't exactly a competing entry!

Dart, 46 45 bytes

f(n)=>List.generate(n,(e)=>e<1?1:'$e${e+1}');

  • -1 byte by replacing e==0 by e<1
  • Try it online!

    ><>, 15 13 bytes

    ln1-:?!;aoln:
    

    Try it online!

    We take in the input as a command line argument.

    Thanks to @jo king for 2 byte loss (noticing the input loop value could be used as stack length.

    Explanation (simple):

    ln1-:?!;aoln:
    ln              : Add the length of the stack to the stack and print.
       1-:?!;       : Take 1 off the input loop and check if zero, if 0, end.
             ao     : Print new line
               ln:  : Add the length of the stack to the stack, print and duplicate the input loop.
    

    MBASIC, 102 94 bytes

    1 INPUT N:FOR I=0 TO N-1:IF I>0 THEN PRINT MID$(STR$(I),2);
    2 PRINT MID$(STR$(I+1),2);" ";:NEXT
    

    Output:

    ? 3
    1 12 23
    
    ? 10
    1 12 23 34 45 56 67 78 89 910
    
    ? 16
    1 12 23 34 45 56 67 78 89 910 1011 1112 1213 1314 1415 1516
    

    Could have been much cleaner, but the STR$(n) number-to-string conversion function returns with a leading space that had to be dealt with.

    Turns out the variable for NEXT and the trailing PRINT are not needed, saving 8 bytes.

    K (ngn/k), 13 bytes

    {.,/$x+!2}'!:
    

    Try it online!

    ! generate the list 0 1 ... n-1

    { } is a function with argument x

    ' applied to each

    !2 is 0 1

    x+!2 is x, x+1

    $ format as strings

    ,/ concatenate

    . evaluate (convert to number)

    Gol><>, 11 bytes

    IFLL?nLPN|;
    

    Try it online!

    Explanation:

    IFLL?nLPN|;
    
    I           //Take a number as input
     F          //Loop as many times as the input specified
      LL        //  Push the loop counter twice to the stack (same as L:)
        ?n      //  Check wether the count is zero, if not print the counter as the first digit
          LP    //  Push the loop counter and add 1
            N   //  Output the next digits of the number with nl
             |; //Exit code
    

    MathGolf, 8 6 5 4 bytes

    {└§p
    

    Try it online!

    Outputs a newline separated series.

    Explanation:

    {└§p
    {       Start a loop over the range(0, input)
     └      Push the top of stack (implicitly the index of the loop) + 1
      §     Concatenate the two (this removes leading 0s)
       p    And print the value
    

    Runic Enchantments, 33 bytes

    /01iR1-:0)?;{1+:
    \$1<\}$q}:+1{$ '
    

    Try it online!

    Uncompressing the entry sequence and moving the reflectors to the other side:

    >1$01iR1-:0)?;{1+:\
          \}$q}:+1{$ '/
    

    Entry sequence (>1$01i) is fairly straight forward. Push and print 1, push 0, push 1, read input and push it to the top of the stack.

    At R we enter the program's main loop (unrolled with directional control characters removed):

    1-:0)?;{1+:' ${1+:}q$}
    

    At this point the stack is [0,1,i] where i is the input value.

    The loop subtracts 1 from the input value (1-), compares it to greater than 0 (if true, skip terminator, else terminate; :0)?;).

    Then a series of stack manipulations ({1+:{1+:}) and increments to result in [2,(i-1),1,1,2] as well as printing a space (' $). q then concats the top two items on the stack, which is then printed (giving 12 in the output stream).

    Finally the stack is rotated once more, leaving [1,2,(i-1)] as the input to the next loop iteration.

    Bonus challenge: using two IPs? 40 bytes

    >1$0iR1-:0)?;1{+:' \
    > F1iU }$~?=am$?=9m/
    

    Try it online!

    As there's no way to clone the input to a second instruction pointer (I have thought about stack cloning, so this may be possible in the future, but the spec for it would be difficult to implement), we have to read it from the input stream twice.

    Flow results in the second pointer being a step behind the first (avoiding merging) and the Fizzle lets us distinguish the two IPs, letting one print a space and the other discards it. I can't figure out a shorter way of performing this check.

    However if it allowable to print two spaces as a separator it can be reduced to this (30 bytes):

    >1$0iR1-:0)?;1\
    > F1iU}$:+{$ '/
    
    input: 4 4
    output: 1  12  23  34
    

    But this is an admittedly dubious answer due to how it has to take input, but 3 bytes shorter than the single IP answer, which is interesting.

    Try it online!

    Update: Stack transfer

    Getting the two pointers to enter the T command in the right execution order is a huge pain. The remaining two spaces in this program can't be removed, as it messes with the timing, but it avoids having to supply the input value twice. Prints 2 spaces between each entry in the sequence (35 bytes).

    >1$0y TR1-:0)?;1\
     >1i:1/U}$:+{$ '/
    

    Try it online!

    Microscript II, 16 bytes

    1vsN-s{lPps1+v}*
    

    Output is newline-separated.

    Pyth, 9 8 6 bytes

    ms+`dh
    

    Try it online!

    Explanation:

           - implicit output
    m      - map function with argument d:
      +    -  concatenate
        d  -  argument d
       `   -  to string
         h -  into implicit d + 1
           - into Q (implicit input)
    

    Shakespeare Programming Language, 310 bytes

    ,.Ajax,.Ford,.Page,.Act I:.Scene I:.[Enter Ajax and Ford]Ford:Listen tothy.Ajax:You cat.Open heart.[Exit Ajax][Enter Page]Scene V:.Ford:Am I worse Ajax?If notlet usScene X.You be twice the sum ofa cat a big big cat.Speak thy.Page:Open heart.You be the sum ofyou a cat.Open heart.Let usScene V.Scene X:.[Exeunt]
    

    Try it online!

    Pepe, 68 bytes

    RrEEEEEREeErREEREEEEEREErEEEEEeEErEEEereEEreeErEEEEEeeEReerREEREeRee
    

    Try it online!

    Previous code has errors when giving input 0, so this is fixed!

    Explanation:

    # Preparation
    
      RrEEEEE # Stack r: [0, 1]
      
      REeE # Stack R: [input]
    
    # Loop
    
      rREE # create label input (r flag: skip until REe)
    
        REEEEE # increment input (loop preparation)
        REE # create label input
    
          rEEEEEeEE # join all
          rEEEe # move r pointer to last
          reEE # output as int
          reeE # output newline "\n"
          rEEEEEeeE # increment all
    
        Ree # repeat if input != last content of stack
        rREE # create label input + 1 (r flag: skip until REe)
        REe # stop skipping commands
    
      Ree # if not 0, go to loop
          
    

    Python 2, 42 bytes

    I know there are plenty of shorter answers already.

    a=0
    exec"print`a`[:a]+`a+1`;a+=1;"*input()
    

    Try it online!

    VBA (Excel), 31 bytes

    using immediate window and Cell [A1] as input

    for x=1to[a1]:?int(x-1 &x):next

    Noether, 15 bytes

    I(iWi1+W+WP?!i)
    

    Try it online!

    Explanation

    I(             ) - Loop until the top of the stack equals the input
      iW             - Push i and convert it to a string
        i1+W         - Add one to i and convert to string
            +        - Concatenate two strings
             WP      - Convert string to a number and print it
               ?     - Print a newline
                !i   - Increment i
    

    Swift 4, 43 bytes

    print(1);(1..<n).map{print("\($0)\($0+1)")}
    

    Try it online!

    n is the input of the program

    Ruby, 34 33 bytes

    ->n{$><<i||=p(1);p(i+=1)<n&&redo}
    

    Try it online!

    Pseudocode:

    loop
      if i is undefined
        set i to 1
        print 1
        print newline
      end if
      print i
      increment i by 1
      print i
      print newline
      if i >= n
        break and return
      end if
    end loop
    

    Lua, 62 bytes

    loadstring't={1}for i=2,(...)do t[#t+1]=(i-1)..i end return t'
    

    Try it online!


    Explanation

    This is an anonymous function.

    t={1} -- initializes the return table, with the number 1 already in it
    for i = 2, (...) do -- loop from 2 to the number of the input
                      -- (this is actual code, ... gets the arguments of the program/function
      t[#t+1] = (i-1)..i -- append to the table i-1 concatenated with i
    end
    return t -- returns the table
    

    Bash, 56 bytes

    echo 1;for i in $(seq $(($1-1)));do echo $i$((i+1));done
    

    A pretty naive approach.

    TI-Basic, 22 bytes

    :seq(A,A,1,Ans
    :Ans+(Ans-1)10^(1+int(log(Ans
    

    Haskell, 35 bytes

    f n="1":map(show.(-1+)<>show)[2..n]
    

    Try it online! 1

    Explanation / Ungolfed

    The operator (<>) is the addition of Semigroups, in case of the Semigroup a -> b (where b needs to be a Semigroup) it is defined as:

    (f <> g) = \x-> f x <> g x
    

    And in case of the Semigroup String it is the same as concatenation, so the code becomes:

    f n = "1" : map (\x-> show (x-1) ++ show x) [2..n]
    

    1 (imports (<>) since it's not part of the Prelude in GHC 8.2.2)

    Python 3, 44 bytes

    lambda n:[f"{j or''}{j+1}"for j in range(n)]
    

    Try it online!

    Kotlin, 48 bytes

    {"1, "+(2..it).map{"$it${it+1}"}.joinToString()}
    

    Yes I know, I could save 1 more byte by removing the blank behind the first comma, but it looks nicer with it :-)

    Try it online!

    QBasic, 60 53 bytes

    INPUT n
    ?1
    FOR i=2TO n
    ?STR$(i-1)MID$(STR$(i),2)
    NEXT
    

    A math-based solution, because converting numbers to strings in QBasic is a lot more complicated than it ought to be. Nope, strings are still shorter, you just have to special-case the first item. The problem with STR$(i) is that it adds a space to the start of positive numbers, so we take all but the first character by using MID$. Other than that, it's pretty straightforward.

    Twig, 72 bytes

    Twig is very verbose, causing some issues when trying to reduce the length.

    {%macro f(a)%}{%for i in 1..a%}{{o~i}}
    {%set o=i%}{%endfor%}{%endmacro%}
    

    This requires that "strict variables" is disabled (default).


    How to use?

    Simply import the macro and call it:

    {% import "fn.twig" as fn %}
    {{ fn.f(<number>) }}
    

    You can test it on https://twigfiddle.com/lah1a5

    Python 2.7, 52 bytes

    I tried my best. Not yet familiar with this golfing thing.

    def a(n):
        for e in range(n):
            print int(`e`+`e+1`)
    

    The int() removes the leading zero in the first output, as specified in the rules.

    ARBLE, 23 20 bytes

    Saved a handful of bytes by using better named variables.

    range(0,n)//(x..y|0)
    

    Try it online!

    C, 39 bytes

    x(n){n&&x(n-1);printf("%d%d, ",n,n+1);}
    

    eliminated the ternary conditional and shaved off 3 bytes.

    RAD, 72 bytes

    0,(⊢+10×⊣)⍁¨∊¨(⌽∘⌊(⊢|⍨10*(⍳(1+∘⌊10⍟⊢)))÷10*1-⍨(⍳(1+∘⌊10⍟⊢)))¨¨(⊢,1+⊢)¨⍳⎕
    

    Link to repository

    I wanted to try to see if I could do it in a "non-mathematical" way by splitting a number up into its digits.

    DC, 33 bytes

    si[lidZAr^spd1-dsilp*+li0<d]dsdxf
    

    Explanation

    si[lidZAr^spd1-dsilp*+li0<d]dsdxf  Whole program.
    si                                 Save the value on the stack to the i register.
      [                        ]dsdx   Create a macro, duplicate it, store it in the d register, and execute it.
       li                              Put the value from the i register on the stack.
         dZ                            Duplicate the top value, and change it to the number of digits it has.
           Ar                          Push 10 on the stack, and reverse the top two values.
             ^sp                       Do 10^x, and store it in the p register.
                d1-                    Duplicate the top value, and subtract 1 from it.
                   dsi                 Duplicate the top value, and store it in the i register.
                      lp*+             Put the value from the p register on the stack, and multiply it by the the value we just put in the i register. Then, add the top two values together.
                          li0<d        Put the value from the i register and then 0 on the stack. If 0 < li, then we run the d macro again.
                                    f  Print the stack.
    

    Input is the number of numbers to be generated, on the stack.

    Output is printed.

    Python 3, 55 48 47 43 bytes

    f=lambda n:n-1and f(n-1)+[f"{n-1}{n}"]or[1]
    

    Try it online!

    Recursive function that takes an integer and returns a mixed list of strings and numbers.

    MATLAB 45 63 bytes

    @(j)eval('for a=0:j-1;disp([num2str(a)*a/a,num2str(a+1)]);end')
    

    Somewhat ugly *a/a in order to avoid printing leading zero for the first element

    Fixed by wrapping into disp and anonymous function

    C (gcc), 44 43 bytes

    f(i){i--&&printf(" %2$d%d"+5*!f(i),i+1,i);}
    

    Try it online!

    D, 93 bytes

    import std.math;_[]f(_)(_ n){_[]k;foreach(i;0..n)k~=++i+10^^(cast(_)i--.log10+1)*i;return k;}
    

    Try it online!

    I couldn't find a nice (short) solution that evades an import, and this was the shortest of the bunch.

    Rutger, 108 bytes

    x=$Input;
    f=For[$x];
    f=f[@i];
    f=f[{p=Subtract[$i];r=Concat[Str[p[1]]];Print[Integer[r[Str[$i]]]];}];
    Do[$f];
    

    Try it online!

    Ungolfed

    input = $Input;
    for = For[$input];
    for = for[@index];
    
    for = for[{
        dec = Subtract[$index];
        ret = Concat[Str[dec[1]]];
        Print[Integer[ret[Str[$index]]]];
    }];
    
    Do[$for];
    

    The basic concept of Rutger is the lack of multi-adic commands: every command takes a single argument, and if the command needs multiple argument, each new call returns a curried function.

    First, we take evaluated input and store it in \$x\$. We then create a For object, a tri-adic command. The first two calls create a variable \$f\$, that will loop \$x\$ times, using the iteration variable \$i\$, starting at \$i := 1\$. The third call indicates the code to be run:

    {p=Subtract[$i];r=Concat[Str[p[1]]];Print[Integer[r[Str[$i]]]];}
    

    This creates a block of code containing 3 statements. Our first two are variable assignments. First, we create a curried function Subtract[$i], which prepares to subtract a value from \$i\$. This curried function is saved in the \$p\$ variable. Next, we create a second curried variable, \$r\$, which starts by calling p[1], subtracting \$1\$ from \$i\$. We then convert \$i-1\$ to a string and pass it as the first argument to the Concat function. Finally, we convert \$i\$ to a string, concatenate it to \$str(i - 1)\$ and convert it to an integer to reomve the leading \$0\$ when \$i = 1\$. This is then printed.

    The last line, Do[$f];, runs the for loop.

    yup, 48 bytes

    0eee0ee-0ee-*:0e#[:@]0e-{]:[:]-:#0e0~--#]:@]0e-}
    

    Try it online!

    Explanation

    yup only knows of a few commands. To modify data, I'll be using 0 (nilad pushing that number), e (natural exponentiation), and - (subtraction).

    For example, the snippet 0e is equal to 1, since \$e^0=1\$.

    This program is divided into two parts: initialization and iteration.

    Initialization

    0eee0ee-0ee-*:0e#[:@]0e-
    

    0eee pushes \$e^e\approx15.1543\$ and 0ee pushes \$e\approx2.7183\$. Thus, the expression 0eee0ee-0ee- pushes:

    $$e^e-e-e\approx9.7177$$

    This encodes 0x10 (the linefeed), since numbers are rounded to the nearest integer before being outputted. This is our numeric separator.

    The next part is to initialize the stack with data. *: pushes the input twice, and 0e# outputs a 1. [:@] outputs a linefeed without popping it from the stack, and 0e- decrements the input. This handles the edge case of outputting 1 instead of 01. Rather than handle this with a conditional, hardcoding the first entry is shorter.

    Iteration

    {]:[:]-:#0e0~--#]:@]0e-}
    

    {...} loops while the TOS is defined and positive. In this case, it will stop when it hits zero. Each iteration starts off with a stack like this:

    [9.7177, input, iterator]
    

    iterator starts at input - 1. ]:[:]- calculates input - iterator and gives us our true iterator value. Then, :#0e0~--# first outputs the true iterator then the same number plus 1, where 0e0~-- encodes \$-(-n-e^0)=-(-n-1)=n+1\$. Then, ]:@] restores the stack to its initial shape and 0e- subtracts 1 from the iterator, continuing our loop. This repeats until iterator reaches 0, at which point the loop stops and the program terminates.

    Attache, 15 bytes

    {N!_'-~_}=>Iota
    

    Try it online!

    Explanation

    {N!_'-~_}=>Iota
    {       }=>        map the inside function:
               Iota    (over each number k from 0 to n-1)
        '              array concatenate:
       _               k
         -~_           k+1
     N!                convert [k, k + 1] to an integer (concatenates and returns a number)
    

    Husk, 11 9 bytes

    -2 thanks to @BMO!

    mSöd+d←dḣ
    

    Try it online!

    Explanation

    m          map(                                              )
     S                                               <*>
      ö            (           .).    .         .
       d            fromDecimal
        +                         (++)
         d                             toDecimal
          ←                                      (+1)
           d                                            toDecimal
                                                                  .
            ḣ                                                      (\n->[1..n])
    
    mSöd+d←dḣ  map((fromDecimal.).(++).toDecimal.(+1)<*>toDecimal).(\n->[1..n])
    

    Momema, 36 bytes

    z0w+1=*0-8*0w00+1*0-8*0-9 10z=+_M-*0
    

    Try it online! Requires the -i interpreter flag.

    Explanation

                                                         #  i = 0
    d   0            #  d0:  nop                         #  do {
    i   (+ 1 =*0)    #  i0:  jump to i(![0])             #    if i {
    -8  *0           #       print [0]                   #      print i
    i   0            #  i1:  nop                         #    }
    0   (+ 1 *0)     #       [0] = [0] + 1               #    i += 1
    -8  *0           #       print [0]                   #    print i
    -9  10           #       print chr(10)               #    print \n
    d   =(+ _M -*0)  #  d1:  jump to d(!!(input - [0]))  #  } while (input - i != 0)
    

    The Momema reference interpreter provides an "interactive mode", enabled by -i, which is intended to be used on the command line.

    One of the features it allows is the ability to add holes, denoted by _, which effectively allow one to substitute an integer read from STDIN into an expression. This is already shorter than *-8 (read from memory-mapped I/O location -8), which does the same thing without interactive mode and without displaying a prompt to STDERR.

    Crucially, holes can also be named with a sequence of capital letters after the _. Evaluation of named holes is memoized. Input will be read the first time a named hole is evaluated but subsequent evaluations of a hole with the same name will reuse the input number. This means that we can use _M to stand in for "the input", but input will only be read on the first iteration of the loop.

    dc, 29 bytes

    [d1-d0<F]dsFx+p[npz1<G]sGz1<G
    

    Try it online!

    This is a good showing for dc because its printing capabilities are so limited, but line up perfectly with the challenge spec. Input is from the stack (and must be the only thing on the stack), output is to stdout. There's some duplication near the end I can't figure out how to get rid of without breaking the case n=1

    Explanation

    F will be the macro [d1-d0<F]
    d        copy the top of the stack
     1-      decrement
       d0<F  repeat (tail recursion) until a 0 is on top
    
    G will be the macro [npz1<G]
    n        print the top (pop, but no newline)
     p       print the new top (newline, but no pop)
      z1<G   repeat (tail recursion) until only one number is on the stack
    
    Full program (example input: 4)
    [d1-d0<F]dsFx      Store F and run it: new stack is 0 1 2 3 4
    +                  Drop the zero (can't just recurse to 1, or n=1 breaks)
    p                  Print (no pop) the '1': stack is 1 2 3 4
    [npz1<G]sG        Store G
    z1<G               Run G if there's more than one number on the stack
    

    C Sharp 51 bytes

    n=>new int[n].Select((_,o)=>int.Parse($"{o}{o+1}"))
    

    K (oK), 12 bytes

    Solution:

    ,/'$1,2':1+!
    

    Try it online!

    Examples:

    ,/'$1,2':1+!1
    ,,"1"
    ,/'$1,2':1+!2
    (,"1"
     "12")
    ,/'$1,2':1+!3
    (,"1"
     "12"
     "23")
    ,/'$1,2':1+!10 
    (,"1"
     "12"
     "23"
     "34"
     "45"
     "56"
     "67"
     "78"
     "89"
     "910")
    

    Explanation:

    ,/'$1,2':1+! / the solution
               ! / range 0..n
             1+  / add 1
          2':    / sliding window of 2
        1,       / prepend 1
       $         / convert to strings
    ,/'          / flatten each
    

    Javascript, 43 44,46,49,53 bytes

    n=>[...Array(n)].map((_,a)=>~~(a+(a+1+"")))
    

    Previous versions :

    n=>[...Array(n)].map((_,a)=>~~(a+(""+ ++a)))
    n=>[...Array(n)].map((_,a)=>0- -(a+(""+ ++a)))
    n=>[...Array(n).keys()].map(a=>0- -(a+(""+ ++a)))
    n=>[...Array(n).keys()].map(a=>parseInt(a+(""+ ++a)))
    

    Saved 3 bytes thanks to @Shaggy's solution (which is better than mine) to remove .keys()

    dc, 34 bytes

    sj1psi[lid1+dsiZAr^*li+pzlj>M]dsMx
    

    Try it online!

    Completely different (and less golfy, unfortunately) approach than Sophia's dc answer. I juggle a lot of register activity here that I wish I could cut down, seems the likeliest way to golf a couple of bytes. Expects input as the sole stack entry.

    sj1psi stores the input into register j, prints the initial 1, and stores 1 in register i. Macro M duplicates i, increments it, and then multiplies it by 10 to the power of however many digits the incremented value has (ZAr^*). Fetches the newly incremented version, and adds the two together. Compares register j to the number of entries on the stack, and runs until they match.

    PHP, 33 32 bytes

    while($argv[1]--)echo" $i".++$i;
    

    Try it Online

    Old version

    for(;$i<$argv[1];)echo" $i".++$i;     // 33 bytes
    

    Yabasic, 37 bytes

    An anonymous function that takes input from STDIN and outputs to STDOUT.

    Input""n
    ?1
    For i=2TO n?i-1,"",i
    Next
    

    Try it online!

    -14 bytes thanks to @ErikF

    Excel VBA, 29 bytes

    An anonymous VBE immediate window function that takes input from cell [A1] and outputs to the console.

    ?1:For i=2To[A1]:?i-1 &i:Next
    

    Python 2, 41 bytes

    lambda l:[`n`[:n]+`n+1`for n in range(l)]
    

    Try it online!

    R, 30 29 bytes

    An extra byte thanks to @Giuseppe

    10^nchar(n<-1:scan())*(n-1)+n
    

    Try it online!

    A mostly mathematical solution, except for using nchar() rather than floor(log10()). I was really surprised that it came in shorter than the string version.

    R, 32 bytes

    strtoi(paste0((x=1:scan())-1,x))
    

    Try it online!

    Outgolfed by MickyT, so go upvote that answer!

    Clojure, 54 bytes

    #(reduce(fn[a n](conj a(str n(inc n))))[1](range 1 %))
    

    Try it online!

    Just a reduction over a range between 1 (inclusive) and n (exclusive).

    (defn concat-n-n+1 [n]
      (reduce (fn [acc m]
                (conj acc (str m (inc m))))
              [1]
              (range 1 n)))
    

    The first element of the list is a number, the rest are strings. This seems to be allowed by the spec.

    Perl 5, 24 21 bytes

    @DomHastings came up with a way to save 3 bytes

    say$i++.$i|0for 1..<>
    

    Try it online!

    Forth (gforth), 33 bytes

    : f dup 1 ?do i . i 1 .r loop . ;
    

    Try it online!

    Explanation

    Loops through all numbers in range and outputs the number twice, the first with a space appended, and the second without.

    This results in the first output being appended to the previous output. To fix the last case, the input is outputted so that it can be appended to the last number in the loop.

    Code Explanation

    : f                   \ start a new word definition
      dup 1               \ duplicate the input and put a 1 on the stack
      ?do                 \ begin counted loop from 1 to n (does nothing if 1 == n)
        i .               \ output loop index with a space appended
        i 1 .r            \ output loop index right-aligned with minimum 1 character length
      loop                \ end the loop
      .                   \ output the input we duplicated earlier
    ;                     \ end the word definition
    

    Powershell, 27 26 bytes

    1.."$args"|%{"$p$_";$p=$_}
    

    -1 byte: thanks AdmBorkBork

    Test script:

    $f = {
    1.."$args"|%{"$p$_";$p=$_}
    }
    
    &$f 1
    ""
    &$f 2
    ""
    &$f 3
    ""
    &$f 10
    ""
    &$f 46
    

    Groovy, 35 bytes

    {(0..<it)*.with{""+it+++it as int}}
    

    Try it online!

    I came up last minute with the idea of using *.with instead of .collect. I have no idea what it+++it parses to but whether it's it++ + it or it + ++it they both do the same thing. I tried to think of a way of getting rid of the < in ..< by turning it into 1..it and decrementing but I don't think it would get any shorter.

    Shakespeare, 703 bytes

    Q.Ajax,.Ford,.Act I:.Scene I:.[enter Ajax and Ford]Ford:Open mind!Scene V:.Ajax:You is the sum of thyself the sum of myself the sum of a big bad fat old red pig a big bad fat old lie!Ford:Open mind!Is you nicer zero?Ajax:If so, you is twice the sum of the sum of twice thyself twice thyself thyself!If so,Let us Scene V!Ford:You a cat!Open heart!Scene X:.Ajax:You is the sum of thyself a pig!Is you worse than a cat?If so,let us Scene C.Remember thyself.You is the sum of the sum of a big old red cute rich cat a big old red cute joy a big old pig!Speak mind!You is a big old red cute rich cat!Speak mind!Recall!Ford:Open heart!You is the sum of thyself a joy!Open heart!Let us Scene X.Scene C:.[exeunt]
    

    try it here

    ungolfed version

    127421th Night.
    Ajax, likes to read the stars.
    Ford, someone Ajax can always count on.
    Act I:.
    Scene I: Ajax reads a star.
    [enter Ajax and Ford]
    Ford: Open your mind! 
    Scene V: Ford counts what ajax has learned.
    Ajax: you are the sum of thyself and the sum of myself and the sum of a big bad fat old red pig and a big bad fat old lie!
    Ford: Open Your mind! Are you nicer than zero?
    Ajax: If so, you are twice the sum of the sum of twice thyself and twice thyself and thyself! 
    If so, Let us Scene V!
    Ford: You are a cat! Open your heart!
    
    Scene X: Ajax and Ford recall the nights.
    Ajax: You are the sum of thyself and a pig! Are you worse than a cat? If so, Let us Scene C.
    Remember thyself. 
    You are the sum of the sum of a big old red cute rich cat and a big old red cute joy and a big old pig! 
    Speak you mind!
    You are a big old red cute rich cat! Speak your mind! Recall your finest hour!
    Ford: Open your heart! You are the sum of thyself and a joy! Open your heart! Let us Scene X.
    Scene C: Fin.
    [exeunt]
    

    ABAP, 101 bytes

    Not really a golfing language, but I'm having a lot of fun with it

    WHILE x<w.
    CLEAR z.
    IF x=1.
    WRITE x.
    ELSE.
    CONCATENATE y x INTO z.
    WRITE z.
    ENDIF.
    y=x.
    x=x+1.
    ENDDO.
    

    W is the input term, X is the counter from 1, Y is X-1 from the second pass onward, Z is concatenated string.

    J, 14 bytes

    (,&.":>:)"0@i.
    

    Try it online!

    Jelly, 3 bytes

    ŻVƝ
    

    A monadic link accepting an integer which yields a list of integers

    Try it online!

    How?

    ŻVƝ - Link: integer       e.g. 59
    Ż   - zero-range               [0,1,2,3,4,5,6, ... ,58,59]
      Ɲ - apply to each pair: i.e: [0,1] or [5,6]  or  [58,59]
     V  -   evaluate* jelly code   1     or 56     or  5859
        -                       -> [1,12,23,45,56, ... 5859]
    
    * When given a list V actually joins the Python string values and evaluates that
      ...so e.g.: [58,59] -> ['58','59'] -> '5859' -> 5859
    

    J, 20 bytes

    ".(,&":)/@(,>:)"0@i.
    

    Try it online!

    Panacea, 6 bytes

    re
    D>j
    

    Explanation:

    r        Range [0.. input]
     e       Map each element with the following line
    D        Duplicate
     >       Increment
      j      Join digits; multiply by ten and add
             Since this works with integers, it removes the preceding 0.
    

    Haskell, 34 bytes

    f n="1":[show=<<[i-1,i]|i<-[2..n]]
    

    Try it online!

    C# (Visual C# Compiler), 46 bytes

    If you are allowed to have some using static directives in the top whose bytes do not count:

    n=>1+Concat(Range(1,n-1).Select(x=>","+x+++x))
    

    Try it online!

    Will explode if input n is 0.

    It is interesting that, while the C# rules say ","+x+++x means ( "," + (x++) ) + x, if it had meant ( "," + x ) + (++x) instead, the program would still work!

    C# (Visual C# Interactive Compiler), 103 71 64 56 bytes


    Golfed Try it online!

    i=>{for(int x=0;x<i;)Write($"{(x>0?$",{x}":"")}{++x}");}
    

    Ungolfed

    i => {
        for( int x = 0; x < i; )
            Write( $"{( x > 0 ? $",{x}" : "")}{ ++x }" );
    }
    

    Full code

    Action<Int32> a = i => {
        for( int x = 0; x < i; )
            Write( $"{( x > 0 ? $",{x}" : "")}{ ++x }" );
        };
    
    Int32[]
        testCases = new Int32[] {
            1,
            2,
            3,
            10,
        };
    
    foreach( Int32[] testCase in testCases ) {
        WriteLine( $" Input: {testCase}\nOutput:" );
        a(testCase);
        WriteLine("\n");
    }
    

    Older versions:


    Releases


    Notes

    Python 3, 39 bytes

    f=lambda n:1//n or f'{f(n-1)} {n-1}{n}'
    

    Try it online!

    C# (Visual C# Compiler), 54 bytes

    Uses space as seperator character.

    n=>{var r="";for(;n-->1;)r=" "+n+(n+1)+r;return"1"+r;}
    

    Try it online!

    Ungolfed full code:

    class P
    {
        static void Main()
        {
            System.Func<int, string> f =
                n =>
                {
                    var r = "";        //Declare variable for the result
                    for (; n--> 1;)    //Loop until n is 1
    
                        r =            //Set the result to:
                            " " +      //Seperator +
                            n +        //Value of n as string
                            (n + 1) +  //Value of n + 1 as string
                            r;         //Previous content of the result
    
                    return "1" + r;    //Return 1 (first item) + the result.
                }
                ;
    
            System.Console.WriteLine(f(1));
            System.Console.WriteLine(f(2));
            System.Console.WriteLine(f(3));
            System.Console.WriteLine(f(10));
            System.Console.WriteLine(f(100));
        }
    }
    

    Python 2, 42 41 bytes

    f=lambda n:n-1and f(n-1)+[`n-1`+`n`]or[1]
    

    Try it online!

    Recursive function that returns a mixed list of strings and integers

    RAD, 28 27 bytes

    (⊢(⊢+⊣×10*1+∘⌊10⍟⊢)1+⊢)¨0,⍳
    

    Repository

    Must be called like: ((⊢(⊢+⊣×10*1+∘⌊10⍟⊢)1+⊢)¨0,⍳) <value>, as I broke assignment of functions when I implemented shy results.

    Note: this should also work in Dyalog APL, and due to that: -1 byte thanks to @Adám!

    The can either be the APL symbol or the greek one if run in RAD, but must be the APL version ifran in Dyalog APL

    MATL, 9 bytes

    :"@qV@VhU
    

    Try it online!

                  % implicit input n
    :             % range, push 1..n
    "             % for loop:
     @            % push for loop index
     q            % decrement
     V            % convert to string (num2str)
     @            % push for loop index
     V            % convert to string (num2str)
     h            % horizontally concatenate
     U            % convert to number (str2num)
                  % implicit end of for loop
                  % implicit end of program, display stack contents
    

    Japt -m, 6 5 bytes

    ó2 ¬n
    

    Try it online!

    As always, know the flags.

    Unpacked & How it works

    -m       Convert to range and map...
    
    Uó2 q n
    Uó2      Construct [U, U+1]
        q    Join
          n  Convert to number
    
             Implicit output (Array is printed as comma-delimited values)
    

    Perl 5, 29 bytes

    say"@{[1,map$_-1 .$_,2..<>]}"
    

    Java, 48 bytes

    String f(int n){return--n>0?f(n)+","+n+-~n:"1";}
    

    Port of tsh's JavaScript answer. Try it online here.

    Ungolfed:

    String f(int n) { // recursive function taking an integer as argument and returning a String
        return --n > 0 ? f(n) // decrement n and recurse if n is still positive after
                       + "," + n // return the result of the recursive call concatenated with n and ...
                       + (- ~n) // ... n+1; writing it as -~n gives it precedence over the concatenation
                       : "1"; // if n is now 0 on the other hand, return "1"
    }
    

    Haskell, 37 bytes

    f x=[[y-1|y>1]++[y]>>=show|y<-[1..x]]
    

    Try it online!

    Rust, 56 bytes

    |n|(0..n).map(|n|format!("{}{}",n,n+1).parse().unwrap())
    

    Try it online!

    Python 2, 43 bytes

    lambda i:[1]+[`x`+`x+1`for x in range(1,i)]
    

    Try it online!

    First element is an integer, the rest are strings.

    Perl 6, 19 18 bytes

    {(^$_ Z~1..$_)X+0}
    

    Try it online!

    Anonymous code block that zips the range 0 to n-1 with 1 to n using the concatenation operator, then adds 0 to every element to force it to a number and remove leading 0s.

    APL (Dyalog Classic), 9 bytes

    1,2,/⍕¨∘⍳
    

    Try it online!

    Brachylog, 6 bytes

    ⟦s₂ᶠcᵐ
    

    Try it online!

    Explanation

    ⟦         Range: [0, …, Input]
     s₂ᶠ      Find all substrings of length 2
        cᵐ    Map concatenate
    

    Red, 56 bytes

    func[n][prin"1 "repeat i n - 1[prin rejoin[i i + 1" "]]]
    

    Try it online!

    05AB1E, 6 bytes

    >GNJ,N
    

    Try it online!

    Explanation

    >G       # for N in [1 ... input]
      N      # push N
       J     # join stack
        ,    # print
         N   # push N (for next iteration)
    

    LεD<ìï would work for same byte count but with list output

    CJam, 11 bytes

    {{_)s+si}%}
    

    Try it online!

    Haskell, 57 55 bytes

    f n=read<$>zipWith((.show).(++).show)[0..][1..n]::[Int]
    

    A function which takes a number and returns a list.

    EDIT: -2 Bytes thanks to Cat Wizard

    Try it online!

    JavaScript (Node.js), 25 bytes

    f=n=>--n?f(n)+','+n+-~n:1
    

    Try it online!

    Python 2, 44 bytes

    for i in range(input()):print`i`*(i>0)+`i+1`
    

    Try it online!

    APL (Dyalog), 13 12 bytes

    1 byte saved thanks to @FrownyFrog

    (⍎⍕,∘⍕1∘+)¨⍳
    

    Try it online!

    Jelly, 4 bytes

    ḶżRV
    

    Try it online!

    How it works

    ḶżRV  Main link. Argument: n
    
    Ḷ     Unlength; yield [0, ..., n-1].
      R   Range; yield [1, ... n].
     ż    Zipwith; yield [[0, 1], ..., [n-1, n]].
       V  Eval; cast each array to string and evaluate, yielding integers.
    

    Cubix, 19 bytes

    I.1.W)>OSo;u.uO;@!-
    

    Try it online!

    This wraps onto the cube as follows

        I .
        1 .
    W ) > O S o ; u
    . u O ; @ ! - .
        . .
        . .
    

    Watch It Run

    Got a little room to play with yet, but at the moment

    Canvas, 6 bytes

    ŗ²;+┤]
    

    Try it here!

    Explanation:

    {     ]  map over 1..input
     ŗ         convert to string (required as `+` needs 1 arg to be a string to not add)
      ²;       place a 0-indexed version of the index below TOS
        +      join the two
         ┤     cast to number
    

    ŗ²×┤] (or even ²×┤]) would work if I didn't try to push the absolute most out of characters and didn't make × - reverse add - do not that when not receiving 2 strings.

    Haskell, 38 37 bytes

    f n=("":)>>=zipWith(++)$show<$>[1..n]
    

    Try it online!

    Thanks to Cat Wizard for a byte!

    APL (Dyalog Classic), 13 bytes

    2{⍎∊⍕¨⍺⍵}/0,⍳
    

    Try it online!

    Jelly, 8 6 bytes

    ṭ’DFḌ)
    

    Try it online!

    ṭ’DFḌ)    Monadic link with argument n
         )    For each int in the range 1..n
     ’        n-1
    ṭ         [n-1, n]
      D       Digits of n-1 and n
       F      Flatten into one list
        Ḍ     Convert back to an integer.