Skip to main content
2 of 2
added 540 characters in body
Noodle9
  • 20.3k
  • 3
  • 21
  • 46

Bash, 25 22 bytes

f()(
echo $[1<<a++];f)

Try it online!

Saved 3 bytes thanks to Digital Trauma

Solution of Digital Trauma's:

Bash, 18 bytes

echo $1
$0 $[$1*2]

Try it online!

Noodle9
  • 20.3k
  • 3
  • 21
  • 46