Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

2 added 63 characters in body

# 284. Hexagony, 211 bytes, A000384

     ? } 2 \ . .
. . . " . . .
. @ ! * = < . .
. . . > ( { / . .
. . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . . . . .
. . . . . .


Try it online!

Next sequence!

What better language is there to compute hexagonal numbers?

### Explanation

I decided to make this code use each character (except ., space and newline) only once, because I had too much time on my hands. Let's label the edge the MP starts on A, the one to the left of it L and the one to the right - R. The following linear code gets executed:

?}2"*({=*!@
?           A = input()
}2         R = 2
"*       L = A * R = 2 * n
(      L = L - 1 = 2 * n - 1
{=*   R = A * L = n(2n-1) = a(n)
!  Print the result
@ End execution


# 284. Hexagony, 211 bytes, A000384

     ? } 2 \ . .
. . . " . . .
. @ ! * = < . .
. . . > ( { / . .
. . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . . . . .
. . . . . .


Try it online!

Next sequence!

### Explanation

I decided to make this code use each character (except ., space and newline) only once, because I had too much time on my hands. Let's label the edge the MP starts on A, the one to the left of it L and the one to the right - R. The following linear code gets executed:

?}2"*({=*!@
?           A = input()
}2         R = 2
"*       L = A * R = 2 * n
(      L = L - 1 = 2 * n - 1
{=*   R = A * L = n(2n-1) = a(n)
!  Print the result
@ End execution


# 284. Hexagony, 211 bytes, A000384

     ? } 2 \ . .
. . . " . . .
. @ ! * = < . .
. . . > ( { / . .
. . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . . . . .
. . . . . .


Try it online!

Next sequence!

What better language is there to compute hexagonal numbers?

### Explanation

I decided to make this code use each character (except ., space and newline) only once, because I had too much time on my hands. Let's label the edge the MP starts on A, the one to the left of it L and the one to the right - R. The following linear code gets executed:

?}2"*({=*!@
?           A = input()
}2         R = 2
"*       L = A * R = 2 * n
(      L = L - 1 = 2 * n - 1
{=*   R = A * L = n(2n-1) = a(n)
!  Print the result
@ End execution

1

# 284. Hexagony, 211 bytes, A000384

     ? } 2 \ . .
. . . " . . .
. @ ! * = < . .
. . . > ( { / . .
. . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . . . . .
. . . . . .


Try it online!

Next sequence!

### Explanation

I decided to make this code use each character (except ., space and newline) only once, because I had too much time on my hands. Let's label the edge the MP starts on A, the one to the left of it L and the one to the right - R. The following linear code gets executed:

?}2"*({=*!@
?           A = input()
}2         R = 2
"*       L = A * R = 2 * n
(      L = L - 1 = 2 * n - 1
{=*   R = A * L = n(2n-1) = a(n)
!  Print the result
@ End execution