text:
Concatenating n with n + 1
Introduction
OEIS sequence A127421 is the sequence of numbers whose decimal expansion is a concatenation of 2 consecutive increasing non-negative numbers. Put simply, every number in the sequence is formed by putting together n with n+1 for some non-negative, integer value of n. The first several terms are:

1, 12, 23, 34, 45, 56, 67, 78, 89, 910, 1011, 1112, 1213, 1314, 1415,
  1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2425, 2526,
  2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3536, 3637,
  3738, 3839, 3940, 4041, 4142, 4243, 4344, 4445, 4546, …

Challenge
Given a single positive integer n, print the first n entries of OEIS sequence A127421 in increasing order.

Input and output can be in any acceptable format. Strings or numbers are fine for output.
Leading zeroes are not permitted.
Either a full program or function is permitted.
For the purposes of this challenge, n will be positive and under 100.
Standard loopholes are disallowed by default.
This question is code golf, so lowest byte-count wins.
Here is some sample input and output:
1 => 1
2 => 1, 12
3 => 1, 12, 23
10 => 1, 12, 23, 34, 45, 56, 67, 78, 89, 910

If you have any questions, don't hesitate to ask. Good luck.
P.S this is my first challenge, so hopefully this all makes sense.
EDIT: Removed output restriction to allow numbers or strings.

Can it be 0 indexed?

@Jo King No. 1 should refer to the first iteration of the sequence as per the challenge spec.

No-one's said it yet, but welcome to PPCG! Nice first question, not too hard, yet not completely trivial either, and there's a number of different approaches

@Jo King Thanks, I'm glad you liked it.

Do the outputs have to be in order? Can we mix strings and numbers?

Can the output be space-separated?

@xnor, yes, they have to be in order. You can mix strings and numbers freely, and space separated is fine.

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

R, 32 bytes
strtoi(paste0((x=1:scan())-1,x))

Try it online!
Outgolfed by MickyT, so go upvote that answer!

There’s been an edit to allow strings... no need for strtoi!

@JayCe it's necessary to strip the leading 0 from the first output.

couldn't you remove the leading zero by ending with [-1]rather than using strtoi or does that fail in some edge case or other?

@JDL strtoi is being used to convert from "01" to 1 because paste0 will return c("01","12","23","34",...) and we aren't allowed to return "01".

You can do the highly inelegant combine to match MickyT's 29, but I'm not a fan. Try it online!

@CriminallyVulgar unfortunately that will fail for input of 1

@Giuseppe You say "unfortunately"... It's always the edge cases that get me, good catch.

Python 3, 39 bytes
f=lambda n:1//n or f'{f(n-1)} {n-1}{n}'

Try it online!

Never thought f-strings can be used for golfing! Nice idea.

Haskell, 38 37 bytes
f n=("":)>>=zipWith(++)$show<$>[1..n]

Try it online!
Thanks to Cat Wizard for a byte!

As far as golfing goes you can also use <$> as a substitute for map, that can be infixed.

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.

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

W redirect to the top face heading down
I1> set up the stack with the input and 1 then redirect into the main loop
OSo;u output the top of stack, add space to stack, output, remove and uturn
-!@;Ou) subtract TOS from input, if 0 halt else pop result, output TOS, uturn and increment TOS.  Back into the main loop.

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.

29 bytes! nice work on this, I never would have thought of it!

@Giuseppe thanks for the extra byte.

APL (Dyalog), 13 12 bytes
1 byte saved thanks to @FrownyFrog
(⍎⍕,∘⍕1∘+)¨⍳

Try it online!

Wow, our answers tied

@Zacharý yours is more APLish though :)

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

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

Did you intend to edit out the original description "Anonymous function that returns a list"?

@EsolangingFruit Oopsie, fixed! Thanks

Maybe I am missing something but this doesn't seem to have '12' as the second element.

@ElPedro That can be fixed by saving a byte with n and

It's not often that a fix saves bytes :-)

JavaScript (Node.js), 25 bytes
f=n=>--n?f(n)+','+n+-~n:1

Try it online!

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

Brachylog, 6 bytes
⟦s₂ᶠcᵐ

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

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!

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

Try it online!

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.

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

Try it online!

@DLosc The %m$ format specifier "denotes the position in the argument list of the desired argument, indexed starting from 1" (printf(3) man page). It's pretty handy as long as your C library supports it!

Thanks... but I'm still confused why %d%d (and switching the order of the arguments) doesn't work. (I tried it, but don't know why it produces no output.)

@DLosc If you change the format string, make sure to change the offset after it (e.g. " %d%d" should have +3*!f(i); otherwise, the +5 offset points to the NUL at the end of the string.)

Oh, okay--I finally get it: the "#2, then #1" is necessary because in the base case, the shortened format string becomes just "#1" and so you need the first printf argument to be i+1, not i. Very interesting.

41 bytes abusing undefined behaviour in the form of unsequenced modification and access to i.

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)

Welcom to PPCG! :)

@Shaggy Thank you, this is my first time doing this.

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]

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.

Welcome to PPCG; nice first post! Regarding the parsing of a+++b, this test suggests it is parsed from left to right, meaning (a++)+b.

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

This doesn't work for 1 - leading zeros aren't allowed. (Also, the challenge does say to output the first n terms...)

@Steffan but it is tagged [tag:sequence], so therefore the i/o defaults are allowed?

the i/o defaults are not allowed if the question overrides them. they are defaults, not requirements

@Steffan oof. done

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.

Python 2, 44 bytes
for i in range(input()):print`i`*(i>0)+`i+1`

Try it online!

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)

5 bytes. Don't know why ó doesn't work here without the 2.

I have 2 other 5 byte solutions (both using the same method) that don't use a flag, if anyone else wants to take a stab at them.

I think 5 + 2 = 7 bytes because of flag?

@u_ndefined Flags are no longer counted towards bytes, and treated as different implementation.

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

APL (Dyalog Classic), 9 bytes
1,2,/⍕¨∘⍳

Try it online!

Nice job, I can't believe I didn't think of that.

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

You can save a byte doing 1.."$args" instead.

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])

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:

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

v1.1, 71 bytes
i=>{for(int x=0;x<i;)System.Console.Write($"{(x>0?$",{x}":"")}{++x}");}

v1.0, 103 bytes
i=>{for(int x=0;x<i;)System.Console.Write($"{(x>0?",":"")}{x++*System.Math.Pow(10,$"{x}".Length)+x}");}

Releases

v1.3 - - 8 bytes - Removed Console thanks again to raznagul
v1.2 - - 7 bytes - Removed System thanks to raznagul
v1.1 - -32 bytes
v1.0 - 103 bytes - Initial solution.

Notes

None

The C# Interactive Compiler has static imports for System.Console. So you can save 15 bytes by removing it.

Right! Habit of having to use them

You can also remove Console.: TIO

Haskell, 37 bytes
f x=[[y-1|y>1]++[y]>>=show|y<-[1..x]]

Try it online!

PHP, 33 32 bytes
while($argv[1]--)echo" $i".++$i;

Try it Online
Old version
for(;$i<$argv[1];)echo" $i".++$i;     // 33 bytes

Python 2, 41 bytes
lambda l:[`n`[:n]+`n+1`for n in range(l)]

Try it online!

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()

39 bytes

J, 14 bytes
(,&.":>:)"0@i.

Try it online!

2,&.":/\i.@>: for 13 bytes. Try it online!

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.

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.

Python 3, 44 bytes
lambda n:[f"{j or''}{j+1}"for j in range(n)]

Try it online!

Welcome to the site!  You can save bytes by removing the space between your string and the for.  Also since this is an anonymous function there is no need for f=, so you can save 2 bytes by removing it.

@CatWizard Thanks! But what do you mean by anonymous function? is there a way to call an anonymous function?

An anonymous function is any function that is not associated with a name.  In python the lambda keyword makes an anonymous function.  Anonymous functions can be set to variables as you did, they can also be called directly without assignment (that's what makes them anonymous) by wrapping them in parentheses e.g. (lambda x:x+1)(6).  For TIO you can put f=\  in the "header" section and call the function with f.

@CatWizard Thanks that is super helpful

How about having the condition for 1 inside the format string? 44 bytes

@JoKing Thanks! now i get to learn something more about python, I haven't seen the or operator used like that before

Vyxal, 4 bytes
ƛ‹p⌊

Try it Online!

:( beat me by 1 byte

Scratch, 107 bytes

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.

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)

Strings or numbers are fine for output. – So . should not be needed.

@Mr.Xcoder thanks - the challenge has changed since I answered it

@Mr.Xcoder unfortunately, if I remove . there's a leading 0 in "01"

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.

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.

cQuents, 11 bytes
=1::($-1)~$

Try it online!
Way too long for a language that this is supposed to be easy in, guess I should have implemented unary subtract-one and add-one operators.
Explanation
=1            First term in sequence is 1
  ::          Mode: for input n, output first n terms in sequence
              For each term in the sequence:
    ($-1)      Subtract 1 from the current index
         ~$    Concatenate that to the current index

Note current version uses & instead of ::, saving 1 byte

APL (Dyalog Classic), 13 bytes
2{⍎∊⍕¨⍺⍵}/0,⍳

Try it online!

Perl 5, 24 21 bytes
@DomHastings came up with a way to save 3 bytes
say$i++.$i|0for 1..<>

Try it online!

Nice! Much shorter than my first approach using a while and $\! Using yours as a base though, you can save a couple of bytes using eval and x<>: Try it online! or even Try it online!

Wait, combining the two gives 21: Try it online!

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.

Red, 56 bytes
func[n][prin"1 "repeat i n - 1[prin rejoin[i i + 1" "]]]

Try it online!

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

Try it online!

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"
}

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

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.

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

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.

Japt, 5 bytes
õÈsiY

Try it

Explanation
          :Implicit input of integer U
õ         :Range [1,U]
 È        :Map each integer at index Y
  s       :  Convert to string
   iY     :  Prepend index
          :  Implicitly convert back to integer
          :Implicit output of resulting array

Alternative
Ç°s+Z

Try it
          :Implicit input of integer U
Ç         :Map each integer Z in the range [0,U)
 °        :  Postfix increment
  s       :  Convert to string
   +Z     :  Append (the now incremented) Z
          :  Implicitly convert back to integer
          :Implicit output of resulting array

an OEIS sequence answer with oeis in it

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

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

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

You can get it down to 31 bytes by not counting the input assignment and making use of , between output fields in PRINT to combine them: Try it online!

@ErikF, input must be taken explicitly per community rules and cannot be taken from a predefined variable. That said I had never seen the ?n,"",m trick - that is really quite clever.

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

I've always wanted to use Excel VBA for one of these. I have SO much to learn!

@seadoggie01 Its a great way to get more familiar with the language - and fortunately, VBA has a very well made up Tips Page that can help you to get started :)

@seadoggie01 oh, and if you are interested in VBA answers, I have a couple that I am really quite proud of, such as Let's Draw Mona Lisa, Embiggen your Input, and Visualize Visual Eyes

Ha! The first thing I found after this question was the Tips page :)

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

You can't assume the input is predefined as a variable unfortunately. You have to do j=input(''); or create a function. Anyway, +1, as I'm assuming you'll fix it. Anonymous function with eval is often shortest when loops are involved.

@StewieGriffin thanks for advice, i am still learning ways around golfing

@StewieGriffin by anonymous function + eval you mean something like f = @(j) eval('for ..... end') ?

Yes :-) you don't need to include f= in the byte count, since the function can be used unnamed like: ans(6).

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.

You can save two bytes by making auto  be _[]

@Zacharý Good point!

WOuldn't it just be easier to do std.conv trickery?

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.

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.

Welcome to PPCG!

Thanks! I've been lurking for a while, figured I'd finally give it a shot!

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!

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.

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!

If you don't mind ending in an error, you can get rid of scene X for 293 bytes

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

Really nice solution! Splitting the printing into two different loop iterations was really clever! I saw that you used the "push n+1 without popping" operator too, it worked really well for this task.

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!

><>, 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.

13 bytes. Also note that you don't have to count flags as bytes anymore

@JoKing I know I haven't been super active recently but when was that change? Also that is a nice change to mine, didn't even think about using the input as the length.

Herr's the meta discussion.

@JoKing Perfect, Thank you.

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")
)

:join in place of ~:*&"" should be -1

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

Attempt This Online!

Vyxal, 5 bytes
ʀ¨pJ⌊

Try it Online!
Explained
ʀ¨pJ⌊
ʀ     # Inclusive zero range
 ¨p   # each overlapping pair
   J  # merge
    ⌊ # floor

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

Try it online!

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

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

Try it online!
based on the answer by Sundar R

Tcl, 59 bytes
proc C n {puts [incr i]
time {puts $i[incr i]} [expr $n-1]}

Try it online!
PS: I will golf it more later!

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!

My answer has been outdone by @Doorknob, go check out his.

You can save a byte by using [0..n] and [1..n] instead.

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

+(⌊10⍟⊢) → +∘⌊10⍟⊢

Thanks! Outgolfed in my own language ... somewhat, but this is also APL code, so not really.

CJam, 11 bytes
{{_)s+si}%}

Try it online!

{_)s+si}%p
saves one byte (nevermind, it's not allowed since it's not a function)

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 5, 29 bytes
say"@{[1,map$_-1 .$_,2..<>]}"

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.

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

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

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));
    }
}

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!

The using Statements should be included in the byte count. See this meta questions. Only using statements that are automatically included by the environment do not need to be counted. (Eg. TIO automatically adds using static System.Console for Visual C# Interactive Compiler.

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.

Changing this to an anonymous lambda function returning a list of numbers gets it down to 42 bytes

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

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)

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.

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

eliminated the ternary conditional and shaved off 3 bytes.

Leaving the main function out is allowed per meta consensus, since it often is shorter than a full program in C submissions often only implement a function. If you want to leave your submission as a whole program, I suggest removing the two spaces in "%d%d, " and char **n. n==0?:x(n-1); can also be n&&x(n-1);.

ARBLE, 23 20 bytes
Saved a handful of bytes by using better named variables.
range(0,n)//(x..y|0)

Try it online!

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.

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

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)

TI-Basic, 22 bytes
:seq(A,A,1,Ans
:Ans+(Ans-1)10^(1+int(log(Ans

Bash, 56 bytes
echo 1;for i in $(seq $(($1-1)));do echo $i$((i+1));done

A pretty naive approach.

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

You can do [i] instead of [#t+1] and remove the brackets around .... 57 bytes

Or it's shorter to have a full program. 40 bytes

About the first comment: yeah, I didn't pay attention :/
About the second: can I?! Hahah I thought the output had to be in the same line, as shown in the "question", that's why I did all of that table thing.

Swift 4, 43 bytes
print(1);(1..<n).map{print("\($0)\($0+1)")}

Try it online!
n is the input of the program

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

VBA (Excel), 31 bytes
using immediate window and Cell [A1] as input
for x=1to[a1]:?int(x-1 &x):next

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!

Microscript II, 16 bytes
1vsN-s{lPps1+v}*

Output is newline-separated.

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

Try it online!

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

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!

Knight, 29 bytes
;=n+0P;=i 0W>n iO+0++""i=i+1i

Try it online!

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!

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.

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\$.

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

This appears to consistently omit the first '1' required for each output sequence...

(naffetS's answer seems to get 3.375 bytes, though...)

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)


text:
Convert Numbers to Letters, and vice-versa in a string
Based on a list of numbers and their equivalent letters, take a string input, replace the characters of that string with the equivalent number/letter and output the result.
List

1 = a
2 = b
3 = c
4 = d
5 = e
6 = f
7 = g
8 = h
9 = i
0 = j

Input

thisisastring1124

Output

t89s9s1str9n7aabd

Rules

Numbers are equivalent to lowercase letters only.
Any character outside the list will be left as is.
Input string must not contain spaces.
Either full program or function is permitted.
Since it's code-golf, fewest bytes wins.

Welcome to PPCG. Nice challenge!

May we swap uppercase letters instead?

Only lowercase letters, uppercase letters would be outside the scope of the list.

Will the input contain only letters and numbers, or might other non-space characters (eg. punctuation) be in it?

Input string can contain any other character except spaces, but anything outside the list will be left untouched in the output string.

bash, 18 bytes
tr 1-90a-j a-j1-90

Try it online!

How does this take input/give output? stdin and stdout?

@NicHartley Yes.

Python 3, 76 68 bytes
lambda w:w.translate(dict(zip(s,s[::-1])))
s=b'1234567890jihgfedcba'

Try it online!

Perl 6, 45 23 bytes
tr/1..90a..j/a..j1..90/

Try it online!
Just a plain transliteration regex.

Using TR would be shorter here, also you don't have to separate all those parts of the sequence: TR/1..90a..j/a..j1..90/   https://tio.run/##K0gtyjH7n1upoJamYKvwvzokSN9QT8/SIFFPL0sfRIB5@rX/ixMrFdI0lEoyMoszixOLS4oy89INDY1MlDSt/wMA

@PhilH Ha, I was literally just searching that operator up! Thanks!

Perl 5, 17 bytes
y;a-j1-90;1-90a-j

Try it online!

05AB1E, 13 9 bytes
žmÁAT£JÂ‡

Try it online!
Explanation
žmÁ         # push 0987654321
   AT£      # push abcdefghij
      J     # join strings
       Â    # bifurcate
        ‡   # transliterate

Retina 0.8.2, 12 bytes
T`a-j09-1`Ro

Try it online! Explanation:
T``

Perform a transliteration.
a-j09-1

The source list is the letters a-j, then 0, then the digits 9-1.
Ro

The destination list is the source list reversed, i.e. the digits 1-9, then 0, then the letters j-a.

J, 38 bytes
rplc[:(;~"0|.)'9876543210jabcdefghi'"1

Try it online!

Python 2, 82 78 bytes
lambda i,l='1234567890jihgfedcba':''.join((x,l[~l.find(x)])[x in l]for x in i)

Try it online!
-4 with thanks to @ovs

JavaScript (ES6), 66 bytes
s=>s.replace(e=/[1a2b3c4d5e6f7g8h9i0j]/g,c=>e[e.search(c)^1],e+=e)

Try it online!

R, 40 bytes
function(s)chartr("0-9ja-i","ja-i0-9",s)

Try it online!
Surprisingly, R is decent at this kind of string challenge, because it has a tr-like function as in the Bash answer. No idea why it exists, but I'm grateful for it!

Amazing! Didn't know chartr() understood regex.

@snoram not quite regex; it specifies in the documentation that "Ranges are supported in the specifications, but character classes and repeated characters are not."

MS-SQL, 71 bytes
SELECT TRANSLATE(v,'1234567890abcdefghij','abcdefghij1234567890')FROM t

The new SQL 2017 function TRANSLATE performs individual character replacement, so is ideally suited for this purpose. See my similar answer in a prior challenge.
Input is via a pre-existing table t with varchar column v, per our IO rules. To replace only lowercase letters, the table must be created using a case-sensitive collation:
CREATE TABLE t(v varchar(max) COLLATE Latin1_General_CS_AS)

Haskell, 80 66 bytes
map(!"1a2b3c4d5e6f7g8h9i0j")
e!(a:b:y)|e==a=b|e==b=a|1<2=e!y
e!_=e

Try it online!

Jelly, 16 bytes
⁵Øaḣ,ØDṙ1¤ċÞ⁸Ṛy)

Try it online!

Pyth, 13 bytes
Xz+jk+0_S9<GT

Try it here!
Explanation
Xz+jk+0_S9<GT – Full program.
       _S9    – Yield [9, 8, 7, ..., 1]
     +0       – Prepend a 0.
   jk         – Join to a single string.
  +       <GT – And append the first 10 letters of the alphabet to it.
                Yields 0987654321abcdefghij.
Xz            – Transliterates the input from the above to the above reversed.

C (gcc), 81 72 bytes
Thanks to Giacomo Garabello for the suggestions.
f(char*s){for(;*s++=*s-97U<11?(*s-6)%10+48:*s-48U<11?(*s-9)%10+97:*s;);}

Try it online!

You can remove 6 chars by altering the input string instead of print it out putchar(...)-->*s=... and other 4 by replacing *s-48U<11 with *s<59 Try it online!

@GiacomoGarabello *s<59 breaks if characters like $ are in the input, which is why I did *s-48U ([0..47] becomes [-48..-1], which becomes a large unsigned value.) As the question didn't specify whether non-alnums were valid, I went with the more conservative interpretation.

Fair enough. The OP commented recently that every other character is valid but not the space. But you can still use my first suggestion

68 bytes

REXX, 57 bytes
#=1234567890
a='abcdefghij'
say translate(arg(1),a #,# a)

Powershell, 94 bytes
-join($args|% t*y|%{if(1+($p=($s='1a2b3c4d5e6f7g8h9i0j').IndexOf($_))){$s[$p-bxor1]}else{$_}})

Test script:
$f = {
-join($args|% t*y|%{if(1+($p=($s='1a2b3c4d5e6f7g8h9i0j').IndexOf($_))){$s[$p-bxor1]}else{$_}})
}

&$f "thisisastring1124"

Explanation

$args - argument strings
$args|% t*y - expands to |ForEach-Object -Method ToCharArray equivalent of "$args".ToCharArray()
($s='1a2b3c4d5e6f7g8h9i0j').IndexOf($_) - find a char in the string, returns a position or -1 if not found. Let $s stores the string which contains a paired char on neighbor positions that differ by the last bit: 0+1, 2+3, 4+5....
if(1+($p=...)) - if position was found
$p-bxor1 - position bit xor 1

Nice trick with the -bxor1.

R, 107 bytes
function(s){a=utf8ToInt(s);l=a>96&a<107;n=a>47&a<58;a[n]=(a[n]-9)%%10+97;a[l]=(a[l]+4)%%10+48;intToUtf8(a)}

Try it online!
First attempt, definitely improvable...

chartr is your friend here, I think.

https://tio.run/##FYgxCsAgDAD3PiOLBhS0dOnQx0jBGgcLSXx/aofjuGOrl9U5bqV3eMG7FVb2kOLZSyQI8GsVBEGr3mkjISmiTOPJeT8cbmv3KZoWDu0D like that

@Giuseppe : awesome! I didn't know of chartr function. Please post it as your answer, the approach is totally different ;)

Yabasic, 135 bytes
Takes input from the console and outputs to the console.
Input""s$
For i=1To Len(s$)
c$=Mid$(s$,i,1)
n=asc(c$)-96
If-38>n Then?chr$(143+n+11^(n=-48));ElsIf n<11Then?n*(10>n),"";Else?c$;Fi
Next

Try it online!

Rust, 96 bytes
|x|x.bytes().map(|x|match
x{49..=57=>x+48,97..=105=>x-48,48=>106,106=>48,x=>x}as
char).collect()

Try it online!
Not Unicode-safe, if it was it would be even longer.

K4, 38 bytes
Solution:
{(,/|x,a)(,/a:0 1_'10 11#'.Q`a`n)?x}@'

Explanation:
Lookup each character in the list "abcdefghij1234567890" and then index into the list "1234567890abcdefghijX" where X is the original character.
Need to find a shorter way to build the strings...
{(,/|x,a)(,/a:0 1_'10 11#'.Q`a`n)?x}@'
{                                  }@' / apply (@) lambda {} to each (')
                                 ?x    / lookup x in
         (                      )      / do this together
                          .Q`a`n       / index into .Q with a (gives a-z) and n (gives 0-9)
                   10 11#'             / take 10 from first list and 11 from second list
              0 1_'                    / drop 0 from first list and 1 from second list
            a:                         / save as a
          ,/                           / flatten
 (      )                              / do this together
     x,a                               / prepend x to a
    |                                  / reverse it
  ,/                                   / flatten

Bonus:
Another solution for 38 bytes:
{(a,b,x)?[(b:1_11#.Q.n),a:10#.Q.a]x}@'

Japt, 44 42 bytes
V=1oA q +0+"jihgfedcba"Um@W=VaX)¦É?Vw gW:X

Try it online!

sed, 44 bytes
y/1234567890abcdefghij/abcdefghij1234567890/

A bit boring, I admit.
Testing:
$ echo 'thisisastring1124' | sed 'y/1234567890abcdefghij/abcdefghij1234567890/'
t89s9s1str9n7aabd

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
First Last Last First
Challenge
The task is simple. Given an array and a first and last value: Return the first of the last after the first, and the last of the first before the last.

Or simply: Given an array, var1, var2.
Example Array:
[ var2, , var1, , var2, , var2, var1, var2, ]
Return:

The index of the first var2 on the right side of the first var1 that appears in the array.

[ var2, , first var1, , first var2, , second var2, var1, third var2, ]

The index of the first var1 on the left side of the last var2 that appears in the array.

[ var2, , second var1, , var2, , var2, first var1,last var2, ]
Input
Two distinct positive integers
Array of positive integers
Output
Index of answers, in order
Rules
The array will contain at least one of each variable (minimum size of 2)
Assume inputs work

Example: 0, 1 [1, 0] or similar would fail

IO is flexible
Examples
Input
First = 2; Last = 4; [0, 2, 4, 2, 3, 1, 4, 0, 1, 2, 4, 9]

Output
2, 9

Input
First = 4; Last = 2; [0, 2, 4, 2, 3, 1, 4, 0, 1, 2, 4, 9]

Output
3, 6

Input
First = 0; Last = 1; [0, 1]

Output
1, 0

can var1 be equal to var2?

@ngn No, not necessarily. If they were it would lead to mostly trivial results, so it’s not necessary to handle that case.

Welcome to PPCG!

Can we return the output in reversed order? For example, the test cases would result in 9, 2, 6, 3 and 0, 1 respectively (or plus one if the output is 1-indexed).

@EriktheOutgolfer No, the first last first is first, and the last first last is last!

Seconding @Jakob, the current wording doesn't match the examples.

@Jakob Thank you, hopefully this clarifies things.

@Jakob I mean 'after' as in going right, and 'before' meaning going left. That's why I used first in both situations, since it would be the first time that value has occur when traveling left or right.I feel like using 'last' would mean travel all the way left or right.

@WretchedLout The word choice still seems backwards to me, but with the example you added it's clear what you mean.

Jelly, 17 bytes
ẹⱮṚ>Ƈ<Ƈƭ"1,0ị"$⁺Ʋ

Try it online!

JavaScript (ES6), 63 bytes
(x,y,a)=>a.map(P=(v,i)=>v-y?v-x?0:a=i:1/(p=a)?P=+P||i:0)&&[P,p]

Try it online!
Commented
(x, y, a) =>          // given the two integers x, y and the array a[]
  a.map(P =           // initialize P to a non-numeric value
            (v, i) => // for each value v at position i in a[]:
    v - y ?           //   if v is not equal to y:
      v - x ?         //     if v is not equal to x:
        0             //       do nothing
      :               //     else (v = x):
        a = i         //       save the current position in a
    :                 //   else (v = y):
      1 / (p = a) ?   //     update p to a (last position of x); if p is numeric (>= 0):
        P = +P || i   //       unless P is also already numeric, update it to i
                      //       (if P is numeric, it's necessarily greater than 0 because
                      //       we've also seen x before; that's why +P works)
      :               //     else:
        0             //       do nothing
  )                   // end of map()
  && [P, p]           // return [P, p]

Alternate versions
Using JS built-ins, a more straightforward answer is 79 bytes:
(x,y,a)=>[a.indexOf(y,a.indexOf(x)),a.slice(0,a.lastIndexOf(y)).lastIndexOf(x)]

which can be slightly compressed to 75 bytes:
(x,y,a)=>[a.indexOf(y,a.indexOf(x)),a.slice(0,a[L='lastIndexOf'](y))[L](x)]

Try it online!
Edit: @Neil managed to reduce it to a very nice 67-byte:
(x,y,a,f=s=>a[z=y,y=x,x=z,s+=`ndexOf`](x,a[s](y)))=>[f`i`,f`lastI`]

Try it online!

lastIndexOf takes two parameters, so that reduces the straightforward answer to 70 bytes, and I was able to come up with the following 67-byte version: (x,y,a,f=s=>a[z=y,y=x,x=z,s+=`ndexOf`](x,a[s](y)))=>[f`i`,f`lastI`]

APL (Dyalog Classic), 29 27 bytes
⊃{(⊃⍵~⍳⊃⍺),⊃⌽⍺∩⍳⊃⌽⍵}/⍸¨⎕=⊂⎕

Try it online!
prompts for the array and then for var1,var2

Python 2, 72 bytes
def f(x,y,a):i=a.index;j=a[::-1].index;print i(y,i(x)),len(a)+~j(x,j(y))

Try it online!

Python 3, 97 93 bytes
-4 bytes thanks to ovs
def h(f,l,a,I=list.index):j=I(a,f);i=len(a)+~I(a[::-1],l);print(I(a[j:],l)+j,i-I(a[i::-1],f))

Try it online!

a-1-b == a + (-b-1) == a + ~b can be used for -1 byte, assigning the index function to a name gets this to 93 bytes

Japt, 27 25 24 bytes
Inspired in @Arnauld answer
Thanks @Shaggy -2 bytes and @ETHproductions -1 byte
I just started with japt so it must be a better way.\
[WsX=WbU)bV +XWsTWaV)aU]

Try it online!

Welcome to Japt :) You can replace those double spaces with ) for starters to save 2 bytes.

@Shaggy Tanks! I did not know abut that

Like you, I'm convinced there's a shorter method. Don't have the brainspace to try to figure it out at the moment, though!

Welcome! You can save one byte by using X=WbU)...+X: Try it online! I'm also struggling to find a shorter method though...

APL (Dyalog Unicode), 42 bytesSBCS
Anonymous tacit infix function. Takes var1,var2 as left argument and the array as right argument.
{⍸<\(⍵=⊃⌽⍺)∧∨\⍵=⊃⍺},{⍸⌽<\(⍵=⊃⍺)∧∨\⍵=⊃⌽⍺}∘⌽

Try it online!

R, 81 bytes
function(a,b,v,x=which(v==b),y=which(v==a))c(x[x>y[1]][1],tail(y[y<tail(x,1)],1))

Try it online!
(1-indexed)

MATL, 27 bytes
y=Y>/ti=PY>P/t3G=f1)w2G=f0)

Try it online!
Alternately for the same bytecount:
27 bytes
y=Y>yi=*f1)y3G=PY>Pb2G=*f0)

Try it online!
The second one is easier to explain:
y   % implicitly get the first two inputs (the array and var1),
    %  and duplicate the first input
    %  stack: [[0 2 4 2 3 1 4 0 1 2 4 9] 2 [0 2 4 2 3 1 4 0 1 2 4 9]]
=   % compare and return logical (boolean) array
    %  stack: [[0 2 4 2 3 1 4 0 1 2 4 9] [0 1 0 1 0 0 0 0 0 1 0 0]]
Y>  % cumulative maximum - make all values after the first 1 also 1s
    %  stack: [[0 2 4 2 3 1 4 0 1 2 4 9] [0 1 1 1 1 1 1 1 1 1 1 1]]
    %  now we have 1s in positions at and after the first time var1 appears
y   % duplicate 2nd element in stack
    %  stack: [[0 2 4 2 3 1 4 0 1 2 4 9] [0 1 1 1 1 1 1 1 1 1 1 1] [0 2 4 2 3 1 4 0 1 2 4 9]]
i=  % compare with the next input (var2), returning a boolean array
    % stack: [[0 2 4 2 3 1 4 0 1 2 4 9] [0 1 1 1 1 1 1 1 1 1 1 1] [0 0 1 0 0 0 1 0 0 0 1 0]]
*   % multiply the two boolean arrays - so we'll have 1s only where var2 was present after the first occurrence of var1
    % stack: [[0 2 4 2 3 1 4 0 1 2 4 9] [0 0 1 0 0 0 1 0 0 0 1 0]]
f1) % find the index of the first 1 in that (this is our first result value)

The second part of the code does the same thing, except for these changes:

use 2G for second input (var1) and 3G first 3rd input (var2) instead of implicit input or i, since those have been consumed
use PY>P (flip array left-to-right, get cumulative maximum, flip back) instead of Y>, to get 1s before the last occurrence instead of after the first occurrence
use f0) to get last place where both conditions are true, instead of first place (works because MATL uses modular indexing, so 0 is taken to refer to the last index of the array)

MATLAB (80 bytes)
Input is x, y, and a. Since MATLAB is 1-indexed, you should add 1 to test cases.
xi=find(a==x);
yi=find(a==y);
yi(find(yi>xi(1),1))
xi(find(xi<yi(end),1,'last'))

Test case:
x=4
y=2
a =  [0, 2, 4, 2, 3, 1, 4, 0, 1, 2, 4, 9]

%
xi=find(a==x);
yi=find(a==y);
yi(find(yi>xi(1),1))
xi(find(xi<yi(end),1,'last'))

ans =

     4

ans =

     7

Julia, 71 64 bytes
thanks to sundar and his find(A.==x)[] instead of findfirst(A,x)).
.
(A,x,y)->findnext(A,y,find(A.==x)[]),findprev(A,x,findlast(A,y))

You can return a 1-based index if your language is 1-based (that's the usual consensus here), so no need for the  -1s. Also, you can save another byte by using find(A.==x)[] instead of findfirst(A,x).

Java 8, 114 bytes
A lambda taking a java.util.List<Integer> and two ints (var1, var2) and returning a comma-separated pair.
(a,f,l)->a.indexOf(f)+a.subList(a.indexOf(f),a.size()).indexOf(l)+","+a.subList(0,a.lastIndexOf(l)).lastIndexOf(f)

Try It Online

Kotlin, 132 bytes
{f:Int,l:Int,a:Array<Int>->{var p=a.indexOfFirst{it==f}
while(a[p]!=l)p++
var i=a.indexOfLast{it==l}
while(a[i]!=f)i--
Pair(p,i)}()}

Try it online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
2D Array Middle Point
Given dimensions of a 2D array, except 1xn, that results in an odd number of elements, find the midpoint index.
Example: Input is 3x5, representing the 2D array

[0,0] [0,1] [0,2] [0,3] [0,4]
[1,0] [1,1] [1,2] [1,3] [1,4]
[2,0] [2,1] [2,2] [2,3] [2,4]

The midpoint index is [1,2]
Input

3
5

Output

1 , 2

Rules

Standard code-golf rules, fewest bytes wins
Either full program or function is permitted
When input is either 1xn or the corresponding array would have an even number of elements, output must be [0,0]
nx1 should be treated like any other array

Most challenges on PPCG try to avoid special cases or error cases, instead guaranteeing that the input will be valid. It's your call to make, but I find that error handling is usually boilerplate that makes solutions longer without making them more interesting.

We have a Sandbox for Proposed Challenges.

@EsolangingFruit The challenge here is to handle the invalid inputs, otherwise it would trivially be ⁽ⁿ⁻²⁾⁄₂.

@Adám A challenge where the entire point is to detect and handle invalid inputs doesn't seem like a very interesting challenge to me.

@EsolangingFruit There's nothing inherently wrong with challenges that a specific user happens to find uninteresting. Personally, I think having to catch such specific cases makes for some interesting golfing material.

@NoirAntares I've edited your challenge to make it unambiguous. Feel free to edit or roll back If my rewording does not match your intentions.

@JoKing Well, [⁽ⁿ⁻²⁾⁄₂,0], yeah.

output must be [0,0] any reason behind that? How does that part add anything to computing the midpoint? Obviously, 1xn arrays or arrays with an even dimension don't have [0,0] as their midpoints.

APL (Dyalog Classic), 20 19 15 13 bytes
⌊÷∘2×2|×/×1≠⊃

Try it online!

Japt, 11 bytes
My first (somewhat) serious Japt submission! Any help is appreciated, I think ~10 bytes or even less may be possible. Saved 4 bytes thanks to Shaggy!
£ÎÉ©Ueu)*Xz

Try it here!
How it works
Slightly outdated.
£eu *UÎ>1 *Xz – Full program.
£             – For each X of the input array.
          *Xz – Multiply floor(X/2) by the truth value of:
 eu           – Are both numbers odd? And...
    *UÎ>1     – Is the initial element greater than 1?
              – Implicit output to STDOUT.

APL (Dyalog Unicode), 23 bytesSBCS
Anonymous prefix function. Takes rows,columns as right argument.
{0::0 0⋄÷∘÷@0⌽¨⍨.5×⍵-1}

Try it online!
{…} "dfn"; ⍵ is right argument (rightmost letter of Greek alphabet).
 0:: if any error happens:
  0 0 return [0,0]
 ⋄ now try:
  ⍵-1 right argument minus 1
  .5× multiply by a half
  ⌽¨⍨ rotate each by itself (this errors on non-integers)
  ÷∘÷@0 reciprocal of reciprocal at position 0 (this errors when the first coordinate is 0)

05AB1E, 9 8 bytes
Saved 1 byte thanks to Mr. Xcoder (remove D)
¬≠*ÉP*;ï

Try it online!
or as a Test Suite
Explanation
¬≠*       # multiply the input by its first value falsified
   ÉP*    # multiply the input by the product of the results values' oddness
      ;   # divide by 2
       ï  # convert to int

Nice!  I had ¬≠sPÉ*s2÷* for 10 bytes. Taking some inspiration from you though, would ¬≠*PÉ*2÷ work for 8 bytes? Alternatively, ¬≠*PÉ*;ï, of course.

@Mr.Xcoder: Of course. I don't need the D here :/ Thanks!

Japt, 24 16 bytes
-8 bytes saved thanks to @Shaggy
Neu ©UÉ?Nmz :2ÆT

Try it online!

You can get this down to 16 bytes with a few tricks, mainly making use of the N variable.

Feel free to ping me in chat if you've any questions.

JavaScript (ES6), 31 bytes
Saved 1 byte thanks to @Neil
Takes the dimensions in currying syntax (w)(h).
w=>h=>w&h&w>1?[h>>1,w>>1]:[0,0]

Try it online!

Original version, 32 bytes
Takes the dimensions in currying syntax (w)(h).
w=>h=>w*h&!!--w?[h>>1,w/2]:[0,0]

Try it online!
How?
We want to test whether both \$w\$ and \$h\$ are odd, which is true if and only if \$w\times h\$ is odd. We also want to make sure that \$w\$ is not equal to \$1\$, which means that \$w-1\$ is not equal to \$0\$. We can merge both tests into:
w * h & !!--w

If this test passes, we know that \$w\$ was odd and is now even (since it was decremented), so we can divide it by \$2\$ with a standard division. For \$h\$, we use a bitwise shift instead because it's still odd.

w=>h=>w&h&w>1?[h>>1,w>>1]:[0,0]?

@Neil This is a bit more straightforward indeed. Thanks!

Perl 6, 42 39 bytes
{(^$^a X ^$^b)[$b-1&&$a*$b%2&&$a*$b/2]}

Try it online!
Anonymous code block that returns a list of two integers.
Explanation:
{                                     }  # Anonymous code block
 (^$^a X ^$^b)   # Cross product of the two ranges, basically the flattened 2D array
              [                      ] # Get the element at
                            &&$a*$b/2    # Midpoint of the array
                     $a*$b%2             # If the numbers are odd
               $b-1&&                    # And the second element is not 1
                                        # Else the 0th element, which is 0,0

Seems to fail on 7×1: Try it online!

I'm confused. Why is 1xn expected to fail, but nx1 is fine?

Because OP says so.

Jelly, 10 bytes
This confused me :p
:2×Ḃ_ỊḢ$PƲ

A monadic link accepting a list of the dimensions returning a list of the middle-indices or [0,0] in the special-cases.
Try it online!
How?
:2×Ḃ_ỊḢ$PƲ - Link: list of dimension lengths        e.g.  [19,12]  or  [19,13]  or  [1,19]  or  [19,1]
:2        - integer divide by two (gets middle indices)   [9,6]         [9,6]       [0,9]       [9,0]
        Ʋ - last four links as a monad:
   Ḃ      -   bit (n%2) (of the input)                    [1,0]         [1,1]       [1,1]       [1,1]
       $  -   last two links as a monad (of the input):
     Ị    -     insignificant? (abs(n)<=1)                [0,0]         [0,0]       [1,0]       [0,1]
      Ḣ   -     head                                      0             0           1           0
    _     -   subtract (vectorises)                       [1,0]         [1,1]       [0,0]       [1,1]
       P  -   product                                     0             1           0           1
  ×       - multiply (vectorises)                         [0,0]         [9,6]       [0,0]       [9,0]

Haskell, 46 42 bytes
x%y|odd$x*y,x>1=(`div`2)<$>[x,y]|1<2=[0,0]

Try it online!
EDIT: -4 bytes thanks to a trick from Arnauld's answer.

Julia 0.6, 28 27 bytes
x\y=x&y&1&(x>1)*[x÷2,y÷2]

Try it online!
(-1 byte thanks to Jo King.)
Explanation:
x\y - define an operator instead of a function, to save bytes
x&y&1 - check that both inputs are odd.
&(x>1) - and that the first input is not 1
* - the result of the above checks is 0 or 1, multiply that with:
[x÷2,y÷2] - ÷ is integer division, so here for odd numbers gives (n-1)/2 i.e. the middle index. So this forms a vector of the two middle indices (which might be made [0, 0] if any of the previous checks fail).

I don't know Julia, but could you assign to a one byte operator instead, like +?

Short answer: Yes thank you! Long answer: Your comment finally prompted me to check why those work on TIO but not on my system (I'd assumed it was just version differences). Turns out I can assign to those if I haven't used them yet in that session. Makes some confusing behaviour around this make sense now.

Jelly, 11 bytes
Ugh. Waaaaaaaay too long!
:2×ḂẠ$×Ḣn1Ɗ

Try it online!
Alternative, 11 bytes
ḷ/>1×ḂẠ$×:2

Try it online!

Lua, 77 bytes
x,y=...f=math.floor print((x%2==1 and y%2==1)and f(x/2)..","..f(y/2)or "0,0")

Try it online!
not the smallest language but submission for practicing :)

I don't know much Lua (although I wish I did!), but I believe you can replace the oddness check x%2==1 and y%2==1 with x%2+y%2>1 Try it online!

Also, this doesn't return 0,0 when x is 1, which is one of the question's requirements

You can extend the condition to check that too, here's my attempt: Try it online! (also changed x%2+y%2 to x*y%2 after seeing Arnauld's answer.)

It's been a while since I've done anything in Lua, but it has the // operator yes? So you don't need the floor function

Rust, 42 bytes
|w,h|if w>1&&w*h%2>0{(w/2,h/2)}else{(0,0)}

Try it online!

R, 38 29 28 bytes
An extra byte removed thanks to @Guiseppe
(i=scan()-1)/2*!any(i%%2,!i)

Try it online!
Get the input, subtract 1 store in i and divide by 2 and multiply by not any evens or 0's in i

!i instead of i<2?

@Giuseppe good call, thanks

Python 2, 39 bytes
-2 bytes thanks to ovs
lambda a,b:[0,a/2,0,b/2][a>1==a*b%2::2]

Try it online!

39 bytes

Python 2, 43 41 bytes
lambda a,b:((0,0),(a/2,b/2))[a*b%2*(a>1)]

Try it online!
No rocket science here.
-2 with thanks to @MrXcoder and @Emigna

[a*b%2*(a!=1)] should work for 42 bytes.

@Mr.Xcoder: or even a>1.


text:
In for a bumpy ride
Your task is to write a computer program or function that takes a list of nonnegative integers of at least length 2 and determines if they are a "zigzag".  A sequence is a zigzag if and only if the numbers alternate in being larger and smaller than the number that comes before them.  For example \$[1,2,0,3,2]\$ and \$[4,2,3,0,1]\$ are zigzags but \$[1,2,0,0,3,1]\$ and \$[1,2,3,1]\$ are not.
For your decision you should output one of two different consistent values for each possibility (zigzag and not zigzag).
The code-points of your program or function must also be a zigzag itself.  This means that when you take the sequence of code-points it should be a zigzag.
This is code-golf so answers will be scored in bytes with fewer bytes being better.

A penalty for each non-zigzag in the code points might have been another approach, to allow for a wider variety of languages to participate.

@ngm I disagree. Introducing bonuses/penalties would make users come up with multiple possible answers (e.g. short one + penalty vs long + no penalty), making answering process slower. Plus, the amount of penalty given will be quite arbitrary, meaning the scoring process wouldn't be that objective.

What about [4,1] is consider a zig zag? I ask because it is just a line going down and doesnt zig zag

@LuisfelipeDejesusMunoz Yes it is a zigzag.  All of the requirements are met.

Should we take Unicode code points or the code points of the encoding we're using?

@Dennis The code-points of the encoding you are using.

@JungHwanMin I agree that it's arbitrary, but I can't see how it's non objective.

Code points or byte values? Are you sure?

@user202729 It is as the challenge says code-points.

@user202729 It would be difficult to come up with a "one-size-fits-all" penalty. There would still be room for unfairness. Plus, choosing an arbirtary number isn't objective in the first place because it would lack thorough, objective criteria..

@JungHwanMin Winning criteria have to be applied objectively, not chosen objectively.

@Dennis an arbitrarily-chosen winning criterion would still detract from the challenge, imho. Similar to abitrary I/O rules. Perhaps I chose the wrong word in my initial comment.

@JungHwanMin All winning criteria are essentially arbitrary. We're just more used to plain code golf. A potential solution that allows all languages to compete, without providing any length-bumpiness trade-offs, would be to score submissions by penalty points and use the byte count as tie breaker.

This is a program which find all encodings (known to Mathematica) that make the provided byte string bumpy: (won't work in some cases, see the comment) (note that your program should at least contains some unprintable character for it to be somewhat useful)

Try it online!

@Dennis of course, technically that is true. However, we already established that awarding bonuses for code-golf isn't that ideal because they detract from the main challenge. Penalty in this case would be a negative bonus.

Sometimes bonuses detract from the main challenge, sometimes they are the main challenge. In this particular case, I would say that it's the former, Dennis' solution may be applied here. (and it won't invalidate any answer as they all have optimal zigzag score)

For convenience, some non-zigzag terms (in ASCII/Unicode): "while", "for", "reduce", "def", "function", "else", "loop", "foldl", "foldr","unless". Some zigzag terms:  "map", "lambda", "until".

I like your challenge, but my language can't zigzag. The type for a number doesn't zigzag so I can't even start. I'd suggest a bonus of -100 off bytes for zigzag code. If the language supports it, the playing field could be even as everyone can get the bonus. If the language doesn't, we can still play.

@JohnWells The community has historically been strongly against bonuses of any sort, and for good reason. I don't plan on changing the scoring for the challenge.  However I will say a couple of other things.  The first thing is that input is pretty flexible so you might be able to get around the problem you have currently with a little creative thinking. You could for example take input as a string, which might get you around the problem.  However without knowing the language at hand it's hard to say.

@JohnWells Second if you like this sort of challenge you might want to checkout other [tag:restricted-source] challenges. There are a similar challenges in terms of self identification, but each is a unique challenge and it is likely that some will be doable in your choice of language.  Lastly I will point out that if you do find the code-golf part of this fun, but can't work with the restriction, you can still have fun golfing even if you can't post an answer. I always find the most fun part of code-golf to be competing with myself rather than with others.

@gÓEûùIÿ even the string type won't zigzag. I could do it only if I don't pass an argument into the function getting the numbers via a global or I alias the type outside of the counted code. I have working 126 bytes of non-zigzag code in Kotlin. But, no legal function argument type can get me the input nor trick inputting data will zigzag.

Paste this into the developer console on TiO to help you write a bumpy program. It will check if your code is bumpy, and show available characters as you type.

Suggested test case: [1, 1] -> not zig-zag

Jelly, 5 bytes
IṠIỊẸ

Returns \$0\$ (zigzag) or \$1\$ (not zigzag).
The code points are \$[73, 205, 73, 176, 174]\$ in the Jelly code page.
Try it online!
How it works
IṠIỊẸ  Main link. Argument: A (array)

I      Increments; compute the forward differences of A.
 Ṡ     Take their signs.
       A is zigzag iff the signs are alternating.
  I    Take the increments again.
       Alternating signs result in an increment of -2 or 2.
       Non-alternating signs result in an increment of -1, 0, or 1.
   Ị   Insignificant; map each increment j to (|j| ≤ 1).
    Ẹ  Any; return 0 if all results are 0, 1 in any other case.

K (ngn/k), 23 bytes
{*/ 0 >1_ *':1_ -': x }

Try it online!

Why are the spaces needed?

@Zacharý the k code itself wouldn't be bumpy without them

What do you mean by that? Is it just ngn/k that neads the spaces

@Zacharý This challenge is [tag:restricted-source], and the restriction is that the code must be a zigzag.

Whoops, forgot about that, too.

Haskell, 87 bytes
f(a:b:c:d)|(>)a b,b<c=f$b:c:d |(<)a b,b>c=f$b:c:d |1>0=1>12
f[a ] =1<12
f(a:b:_)= a/= b

Try it online!
I wanted to get the ball rolling in terms of Haskell answers.  I can't see a way to improve this yet, but I am convinced it can be done.  I'm looking forward to what people can do from here.

Python 2, 225 223 161 139 bytes
-2 bytes thanks to Jakob
-62 bytes thanks to Dennis

e={eval }.pop()
p ="i"+"n"+"p"+"u"+"t ( "
s=e(p +")")
e(p +"` a"+"l"+"l([(x<y>z)+(x>y<z)f"+"o"+"r x,y,z i"+"n zip(s,s [1: ],s [2: ])])` )")

Try it online!
Credits for the bumpy algorithm goes to this answer
input, print, exec, def and lambda aren't bumpy so I only got eval left, which is stored on e
There are 2 main ways to bypass the restriction, placing "+" or  between the non-bumpy pairs, I opted for the former ( is shorter for each use, but it would need replace(' ','') resulting in more bytes)
Since print isn't bumpy, I can't use it directly, and since it isn't a funcion I can't use it inside eval(), so I had to use input(result) to output the result

Nice. You can substitute ' ' * 0 for ' ' [1: ].

You can use input(text) to write to STDOUT.

MATL, 9 bytes
dt?ZSd]pA

Try it online! Or verify all test cases
My first ever MATL program! The penultimate p was added for the zigzag requirement.
Explanation:
d    %take the difference between successive elements of input
t    %duplicate that
?    %if that is all non-zero
  ZS %take the sign of those differences (so input is all `-1`s and `1`s now)
  d  %take the difference of that (so if there are successive `1`s or `-1`s, this will have a 0)
]    %end-if
p    %take the product of topmost stack vector (will be 0 if either the original difference or
     % the difference-of-signs contained a 0)
A    %convert positive products to 1 (since OP specifies "you should output one of two different consistent values for each possibility ")

Thank you! Yeah, like I mentioned in the answer, I added it only for the zigzag requirement (since the code itself has to go zigzag). ] apparently lives between capital letters and small letters, so d to ] and ] to A would both have been decrements, which isn't allowed. So the p is mainly there to have a codepoint increment between the two.

Oh, I totally forgot about that requirement. That makes the answer more impressive!

Ohm v2, 5 bytes
δyδ½Å

Try it online!
The indices of the characters are \$[131,121,131,16,165]\$ in the linked code page.
How it works

δyδ½Å – Full program / Single-argument block.
δy    – The signs of the deltas of the input
  δ   – The differences of the signs. Results in a sequences of 2's or -2's for
        bumpy arrays, as the signs alternate, giving either -1-1=-2 or 1-(-1)=2.
    Å – Check if all elements yield truthy results when...
   ½  – Halved.

05AB1E, 7 5 bytes
¥ü*dZ

-2 bytes by taking the answer from the same challenge without source restriction. All credit goes to @Grimmy, so make sure to upvote his answer as well!!
Outputs 0 for zigzagging and 1 for non-zigzagging sequences.
The code points are [165,252,42,100,90] in the 05AB1E code page.
Try it online.
Original 7-byter:
¥.±¥Ä;P

Outputs 1.0 for zigzagging and 0.0 for non-zigzagging sequences.
The code points are [165,46,177,165,196,59,80] in the 05AB1E code page.
Try it online.
Explanation:
¥        # Take the forward differences (deltas) of the (implicit) input-list
         #  i.e. [1,2,0,3,2,3] → [1,-2,3,-1,1]
 ü       # For each overlapping pair:
  *      #  Multiply them together
         #   → [[1,-2],[-2,3],[3,-1],[-1,1]] → [-2,-6,-3,-1]
   d     # Check for each whether it's non-negative (>= 0)
         #  → [0,0,0,0]
    Z    # Take the maximum of that
         #  → 0
         # (after which it is output implicitly as result)

¥        # Take the forward differences (deltas) of the (implicit) input-list
         #  i.e. [1,2,0,3,2,3] → [1,-2,3,-1,1]
 .±      # Calculate the sign for each of them (-1 if a<0; 0 if 0; 1 if a>0)
         #  → [1,-1,1,-1,1]
   ¥     # Calculate the deltas of those
         #  → [-2,2,-2,2]
    Ä    # Take the absolute value of each
         #  → [2,2,2,2]
     ;   # Halve each
         #  → [1.0,1.0,1.0,1.0]
      P  # Take the product of the list resulting in either 1.0 or 0.0
         #  → 1.0
         # (after which it is output implicitly as result)

Japt -!, 16 14 bytes
Well, this ain't pretty but I'm just happy it works!
Outputs true for zig-zag or false if not.
ä'- m'g ä'a èÍ

Try it
Codepoints are [228,39,45,32,109,39,103,32,228,39,97,32,232,205] and included as the test in the link above.

Explanation
                   :Implicit input of array
ä'-                :Consecutive differences
    m'g            :Map signs
        ä'a        :Consecutive absolute differences
             Í     :Subtract each from 2
            è      :Count the truthy (non-zero) elements
                   :Implicitly negate and output resulting boolean.

@KamilDrakari, normally you'd be right but, sadly, they're necessary to meet the [tag:restricted-source] requirements of the challenge. Otherwise this could be 10 bytes.

Oh, I didn't see that this was restricted-source. My bad

@KamilDrakari, don't worry; it looks like you weren't the only one.

tinylisp, 154 bytes
(d Z(q ( ( X Y T )(i T(i(l X Y )(i(l(h T)Y )(F(c Y T ) ) 0 )(i(l Y X )(i(l Y(h T ) )(F(c Y T ) ) 0)0 ) )(e(e X Y)0
( d F(q ( ( L )(Z(h L )(h(t L ) )(t(t L

Tr y i t o n lin e!
Explanation
(load library) is disallowed by the source restriction, so we have to use only builtins. Since these are each one character, we can just add spaces wherever necessary to make the codepoints zigzag.
The solution uses a pair of mutually recursive functions. F takes a list of at least two elements and calls Z with three arguments: the first two elements (X and Y) and the remainder of the list (T). Z does most of the work:

If T is not empty:

If X is less than Y:

If head of T is also less than Y, call F with Y prepended to T
Otherwise, return false

Else, if Y is less than X:

If Y is also less than head of T, call F with Y prepended to T
Otherwise, return false

Else (X equals Y), return false

Else (T is empty, X and Y represent a two-element list):

Return true if X is not equal to Y, false otherwise

Ungolfed:
(load library)
(def zigzag?
 (lambda (X Y T)
  (if T
   (if (less? X Y)
    (if
     (less? (head T) Y)
     (zigzag-list? (cons Y T))
     0)
    (if (less? Y X)
     (if
      (less? Y (head T))
      (zigzag-list? (cons Y T))
      0)
     0))
   (equal? (equal? X Y) 0))))
(def zigzag-list?
 (lambda (L)
  (zigzag?
   (head L)
   (head (tail L))
   (tail (tail L)))))

Jelly, 6 bytes
IṠµaIẠ

Try it online!
Returns 1 for truthy, 0 for falsy.
Codepoints: [73, 205, 9, 97, 73, 171] (valid)

Perl 6, 61 bytes
{ [*] ($_[{1…*} ] Z<@$_)Z+^ ($_[{1…*} ] Z>@$_[{2…*} ])}

Try it online!
The code points are:
(123 32 91 42 93 32 40 36 95 91 123 49 8230 42 125 32 93 32 90 60 64 36 95 41 90 43 94 32 40 36 95 91 123 49 8230 42 125 32 93 32 90 62 64 36 95 91 123 50 8230 42 125 32 93 41 125)

And yes, those are unicode characters in there. This is more or less my original solution, with a few spaces and curly braces mixed in.

05AB1E, 10 bytes
¥DÄ/¥(Ä2QP

Try it online!
Explanation
¥           # calculate deltas of input
 DÄ/        # divide each by its absolute value
    ¥       # calculate deltas
     (      # negate each
      Ä     # absolute value of each
       2Q   # equals 2
         P  # product

Code points are: [165, 68, 196, 47, 165, 40, 196, 50, 81, 80]