An alphadrome is a word in which each letter in the first half of the word "reflects" its alphabetical "opposite" in the second half of the word. Write a program or function that returns truthy if the given word is an alphadrome and falsey otherwise.

For example, BEEB is a palindrome. Its first letter B "reflects" its last letter B, and its second letter E reflects its second-to-last letter E.

In contrast, BEVY is an alphadrome. Its first letter B is the second letter of the alphabet, and it reflects the word's last letter Y, which is the second-to-last letter of the alphabet. Likewise, its second letter E is the 5th letter of the alphabet, and it reflects V, the 5th-from-the-end letter of the alphabet.

Like palindromes, an alphadrome can have an odd number of letters, too. WORLD is an alphadrome. W is the 4th-from-the-end letter of the alphabet and D is the 4th letter; O is the 12th-from-the-end letter of the alphabet and L is the 12th letter. The center R reflects itself.

Any single-letter word is an alphadrome.

## Test cases

A        true
ABA      false
ABZ      true
ABBA     false
BEVY     true
GOLF     false
ZOLA     true
WIZARD   true
BIGOTRY  true
RACECAR  false
ABCDEFGHIJKLMNOPQRSTUVWXYZ  true

• Related: Atbash Self Palindromes Commented Oct 12, 2022 at 15:58
• I'm not sure why single-letter inputs are alphadromes; isn't, e.g. the alphabetic reflection of A equal to Z, and "A" doesn't equal "Z"? Commented Oct 13, 2022 at 14:10
• @97.100.97.109 Fair point, but if you disqualify single-letter words then you must also disqualify all words with an odd number of letters, and I didn't want to do that. Commented Oct 13, 2022 at 16:30
• @TobySpeight You’ve lost me. The question doesn’t specify anything about encoding. Commented Oct 14, 2022 at 13:48

# ><>, 17 15 bytes

Saved 2 bytes thanks to Jo King

l<*=""+{$n?(3  Try it online Explanation l< # initialize as truthy (length of the input) and reverse direction l n?(3 # output when the stack holds at most 1 letter (if odd) +{$         # add the first and unhandeled letter
=""            # compare with 155
*               # multiply with current truthy/false value

• You can use the raw charcode 155 to save a byte over KP+, and you can reverse the program to save another (if you don't mind the truthy value becoming the length of the program) Try it online!
– Jo King
Commented Nov 9, 2022 at 8:36
• @JoKing Ah, that reversal is brilliant :) Thanks! Commented Nov 9, 2022 at 10:27

# Knight (v2), 52 bytes

;=tT;=n/L=pP2;W+1=n-nT=t&?155+A Gp nT A Gp--LpTnTtOt


Try it online!

# Desmos, 59 bytes

k=l.length
f(l)=∏_{n=1}^{k/2-.5}0^{(155-l[n]-l[k-n+1])^2}


Try It On Desmos!

Try It On Desmos! - Prettified

Takes in a list of codepoints because Desmos doesn't support strings.

# jq, 54 bytes

Using recursion (54 bytes)

def f:length<2or(.[1:-1]|f)and.[0]+last==155;explode|f


Try it online!

Using mappings (55 bytes)

explode|[.,reverse]|[transpose[]|add==155,true]|sort[1]


Try it online!

# Pushy, 16 bytes

L2/:{+v;O155K=P#


Try it online!

L2/:                 \ floor(length/2) times do:
{                \    Cyclic shift the stack left
+               \    Add the top two items
v;             \    More the result to the second stack.
O            \ Go to the second stack
155         \ Push 155
K=       \ Check equality in place, replacing every stack element with 0 or 1
P#     \ Print the product of these


# C (101 bytes)

a;main(z,s)char**s;{int l=strlen(s[1])-1;while(l/2>a)if(s[1][a]-65^90-s[1][l-a++])exit(0);puts("1");}


# Thunno 2, 6 bytes

Ḳ+ṇ6oḣ


Try it online!

Output with inverted booleans. Add the ! flag to take the logical NOT.

Port of Kevin Cruijssen's 05AB1E answer.

#### Explanation

Ḳ+ṇ6oḣ  # Implicit input