Skip to content

Finding meaningful palindromic phrases with palindromic numbers

Notifications You must be signed in to change notification settings

vdlbk/palindrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

palindrome

The idea was to associate every letter of an alphabet to a number. The number would be converted in base K, where K is the number of letters in the alphabet. We then want to find palindromic words that, converted in base 10, have also a palindromic number in base 10.

Example:
The word KYRGRYK gives the number 5760110675 in base 10 and BQJ7JQB in base K, using the Spanish alphabet with the letters in alphabetic orders. Though, it does not have a meaning in Spanish. Maybe in other languages.

Finding meaningful words or phrases looks almost impossible. But who knows?

spanish letters index baseK
_ 0 0
A 1 1
B 2 2
C 3 3
D 4 4
E 5 5
F 6 6
G 7 7
H 8 8
I 9 9
J 10 A
K 12 B
L 11 C
M 13 D
N 14 E
Ñ 15 F
O 16 G
P 17 H
Q 18 I
R 19 J
S 20 K
T 21 L
U 22 M
V 23 N
W 24 O
X 25 P
Y 26 Q
Z 27 R

Performance

Without being too much optimized and on a random computer such as mine, here are some speed results

max number digits time
10^6 = 1_000_000 7 ~2 ms
10^9 = 1_000_000_000 10 ~200 ms
10^12 = 1_000_000_000_000 13 ~2 secs
10^15 = 1_000_000_000_000_000 16 ~2 mins
10^18 = 1_000_000_000_000_000_000 19 ~50 mins

Result

International Alphabet

Number in base K Number in base 10 Word in International Alphabet (Letter in alphabetic order) Word in International Alphabet (Order by most common letters) Word in International Alphabet (Letter in alphabetic order with space at the end)
_ABCDEFGHIJKLMNOPQRSTUVWXYZ _EAISNRTOLUDCMPGBVHFQYXJKWZ ABCDEFGHIJKLMNOPQRSTUVWXYZ_
0 0 _ _ A
1 1 A E B
2 2 B A C
3 3 C I D
4 4 D S E
5 5 E N F
6 6 F R G
7 7 G T H
8 8 H O I
9 9 I L J
B 11 K D L
M 22 V X W
99 252 II LL JJ
MM 616 VV XX WW
111 757 AAA EEE BBB
141 838 ADA ESE BEB
171 919 AGA ETE BHB
E3E 10301 NCN PIP ODO
HNH 13031 QWQ VJV RXR
LNL 15951 UWU YJY VXV
ODO 17871 XMX KMK YNY
3993 65856 CIIC ILLI DJJD
26N62 1197911 BFWFB ARJRA CGXGC
48684 2287822 DHFHD SOROS EIGIE
86M68 4385834 HFVFH ORXRO IGWGI
A858A 5475745 JHEHJ UONOU KIFIK
ABPBA 5549455 JKYKJ UDWDU KLZLK
BLQLB 6278726 KUZUK DYZYD LV_VL
CD8DC 6639366 LMHML CMOMC MNINM
DN9ND 7368637 MWIWM MJLJM NXJXN
E6L6E 7573757 NFUFN PRYRP OGVGO
G848G 8663668 PHDHP BOSOB QIEIQ
GBOBG 8737378 PKXKP BDKDB QLYLQ
HI5IH 9392939 QRERQ VHNHV RSFSR
HLPLH 9466649 QUYUQ VYWYV RVZVR
ID7DI 9827289 RMGMR HMTMH SNHNS
4IAAI4 67166176 DRJJRD SHUUHS ESKKSE
EP00PE 214171412 NY__YN PW__WP OZAAZO
1FDCDF1 609808906 AOMLMOA EGMCMGE BPNMNPB
2474742 836040638 BDGDGDB ASTSTSA CEHEHEC
5DHAHD5 2132882312 EMQJQME NMVUVMN FNRKRNF
6BAGAB6 2487997842 FKJPJKF RDUBUDR GLKQKLG
DMMJMMD 5364224635 MVVSVVM MXXFXXM NWWTWWN
LJGOGJL 8417447148 USPXPSU YFBKBFY VTQYQTV
NA7N7AN 9058338509 WJGWGJW JUTJTUJ XKHXHKX
9QPP4PPQ9 2823881883282 IZYYDYYZI LZWWSWWZL J_ZZEZZ_J
A7IJ8JI7A 2904768674092 JGRSHSRGJ UTHFOFHTU KHSTITSHK
ADMG6GMDA 2969036309692 JMVPFPVMJ UMXBRBXMU KNWQGQWNK
DDPL7LPDD 3817559557183 MMYUGUYMM MMWYTYWMM NNZVHVZNN
E0B474B0E 3958336338593 N_KDGDK_N P_DSTSD_P OALEHELAO
F450O054F 4280234320824 ODE_X_EDO GSN_K_NSG PEFAYAFEP
FK1P6P1KF 4446399936444 OTAYFYATO GQEWRWEQG PUBZGZBUP
G04D0D40G 4520609060254 P_DM_MD_P B_SM_MS_B QAENANEAQ
GJLF4FLJG 4725972795274 PSUODOUSP BFYGSGYFB QTVPEPVTQ
H0E989E0H 4806859586084 Q_NIHIN_Q V_PLOLP_V RAOJIJOAR
HNQJNJQNH 5052248422505 QWZSWSZWQ VJZFJFZJV RX_TXT_XR
IAC2N2CAI 5193025203915 RJLBWBLJR HUCAJACUH SKMCXCMKS
KCE030ECK 5779540459775 TLN_C_NLT QCP_I_PCQ UMOADAOMU
L7PPEPP7L 6014294924106 UGYYNYYGU YTWWPWWTY VHZZOZZHV
LAF7O7FAL 6041548451406 UJOGXGOJU YUGTKTGUY VKPHYHPKV
2KNIH1HINK2 570984989489075 BTWRQAQRWTB AQJHVEVHJQA CUXSRBRSXUC
403Q464Q304 824685424586428 D_CZDFDZC_D S_IZSRSZI_S EAD_EGE_DAE
46CN9I9NC64 872951606159278 DFLWIRIWLFD SRCJLHLJCRS EGMXJSJXMGE
4I8CJ5JC8I4 963217686712369 DRHLSESLHRD SHOCFNFCOHS ESIMTFTMISE
4LC28982CL4 987115383511789 DULBHIHBLUD SYCAOLOACYS EVMCIJICMVE
659CHHHC956 1276149009416721 FEILQQQLIEF RNLCVVVCLNR GFJMRRRMJFG
C87JG8GJ78C 2533880440883352 LHGSPHPSGHL COTFBOBFTOC MIHTQIQTHIM
I8PG050GP8I 3774273333724773 RHYP_E_PYHR HOWB_N_BWOH SIZQAFAQZIS
BA44ACCA44AB 63240319091304236 KJDDJLLJDDJK DUSSUCCUSSUD LKEEKMMKEEKL
1Q60LFAFL06Q1 295871648846178592 AZF_UOJOU_FZA EZR_YGUGY_RZE B_GAVPKPVAG_B
3GDCEIDIECDG3 542001114445237365 CPMLNRMRNLMPC IBMCPHMHPCMBI DQNMOSNSOMNQD
507CB4B4BC705 752009074470900257 E_GLKDKDKLG_E N_TCDSDSDCT_N FAHMLELELMHAF
6A42DMLMD24A6 957001143341100759 FJDBMVUVMBDJF RUSAMXYXMASUR GKECNWVWNCEKG

Spanish Alphabet

Number in base K Number in base 10 Word in Spanish Alphabet (Letter in alphabetic order) Word in Spanish Alphabet (Vowel in even position) Word in Spanish Alphabet (Vowel in odd position) Word in Spanish Alphabet (Order by most common letters) Word in Spanish Alphabet (Vowels first) Word in Spanish Alphabet (Order random) Word in Spanish Alphabet (Letter in alphabetic order with space at the end)
_ABCDEFGHIJKLMNÑOPQRSTUVWXYZ _BACDFEGHJIKLMNÑOPQRSTUVWXYZ _ABCDEFGHIJKLMNOÑPQRSUTVWYXZ _EAOSRNIDLCTUMPBGVYQHFZJÑXKW _EAOIUNSDLCTRMPBGVYQHFZJÑXKW _EAFIUNSDLCTRMPBGJYQHOZVÑXKW ABCDEFGHIJKLMNÑOPQRSTUVWXYZ_
0 0 _ _ _ _ _ _ A
1 1 A B A E E E B
2 2 B A B A A A C
3 3 C C C O O F D
4 4 D D D S I I E
5 5 E F E R U U F
6 6 F E F N N N G
7 7 G G G I S S H
8 8 H H H D D D I
9 9 I J I L L L J
B 11 K K K T T T L
M 22 U U T Z Z Z V
88 232 HH HH HH DD DD DD II
GG 464 OO OO ÑÑ GG GG GG PP
OO 696 WW WW WW ÑÑ ÑÑ ÑÑ XX
7A7 5775 GJG GIG GJG ICI SCS SCS HKH
828 6336 HBH HAH HBH DAD DAD DAD ICI
D7D 10401 MGM MGM MGM MIM MSM MSM NHN
JCJ 15251 RLR RLR RLR QUQ QRQ QRQ SMS
LHL 16961 TPT TPT UPU FVF FVF OJO UQU
QEQ 20802 YNY YNY XNX KPK KPK KPK ZÑZ
4NBN4 2972792 DVKVD DVKVD DVKVD SJTJS IJTJI IVTVI EWLWE
97D79 5695965 IGMGI JGMGJ IGMGI LIMIL LSMSL LSMSL JHNHJ
A3O3A 6231326 JCWCJ ICWCI JCWCJ COÑOC COÑOC CFÑFC KDXDK
AKJKA 6601066 JSRSJ ISRSI JSRSJ CHQHC CHQHC CHQHC KTSTK
BB0BB 7003007 KK_KK KK_KK KK_KK TT_TT TT_TT TT_TT LLALL
E8A8E 8788878 NHJHN NHIHN NHJHN PDCDP PDCDP PDCDP ÑIKIÑ
F4L4F 9324239 ÑDTDÑ ÑDTDÑ ODUDO BSFSB BIFIB BIOIB OEUEO
H282H 10499401 PBHBP PAHAP PBHBP VADAV VADAV JADAJ QCICQ
9A00A9 161040161 IJ__JI JI__IJ IJ__JI LC__CL LC__CL LC__CL JKAAKJ
ONQQNO 427777724 WVYYVW WVYYVW WVXXVW ÑJKKJÑ ÑJKKJÑ ÑVKKVÑ XWZZWX
112C211 500595005 AABLBAA BBALABB AABLBAA EEAUAEE EEARAEE EEARAEE BBCMCBB
1D9R9D1 711757117 AMIZIMA BMJZJMB AMIZIMA EMLWLME EMLWLME EMLWLME BNJ_JNB
1FILIF1 751585157 AÑQTQÑA BÑQTQÑB AOQUQOA EBYFYBE EBYFYBE EBYOYBE BORUROB
1GR3RG1 773939377 AOZCZOA BOZCZOB AÑZCZÑA EGWOWGE EGWOWGE EGWFWGE BP_D_PB
1OF0FO1 904171409 AWÑ_ÑWA BWÑ_ÑWB AWO_OWA EÑB_BÑE EÑB_BÑE EÑB_BÑE BXOAOXB
1R0Q0R1 947141749 AZ_Y_ZA BZ_Y_ZB AZ_X_ZA EW_K_WE EW_K_WE EW_K_WE B_AZA_B
35B8B53 1538668351 CEKHKEC CFKHKFC CEKHKEC ORTDTRO OUTDTUO FUTDTUF DFLILFD
BQJ7JQB 5760110675 KYRGRYK KYRGRYK KXRGRXK TKQIQKT TKQSQKT TKQSQKT LZSHSZL
CMM7MMC 6175005716 LUUGUUL LUUGUUL LTTGTTL UZZIZZU RZZSZZR RZZSZZR MVVHVVM
F41E14F 7298118927 ÑDANADÑ ÑDBNBDÑ ODANADO BSEPESB BIEPEIB BIEPEIB OEBÑBEO
LOR6ROL 10549494501 TWZFZWT TWZEZWT UWZFZWU FÑWNWÑF FÑWNWÑF OÑWNWÑO UX_G_XU
N96L69N 11242524211 VIFTFIV VJETEJV VIFUFIV JLNFNLJ JLNFNLJ VLNONLV WJGUGJW
RD8E8DR 13240004231 ZMHNHMZ ZMHNHMZ ZMHNHMZ WMDPDMW WMDPDMW WMDPDMW _NIÑIN_
RKCNCKR 13363136331 ZSLVLSZ ZSLVLSZ ZSLVLSZ WHUJUHW WHRJRHW WHRVRHW _TMWMT_
5O5DD5O5 79124342197 EWEMMEWE FWFMMFWF EWEMMEWE RÑRMMRÑR UÑUMMUÑU UÑUMMUÑU FXFNNFXF
6H7EE7H6 89279097298 FPGNNGPF EPGNNGPE FPGNNGPF NVIPPIVN NVSPPSVN NJSPPSJN GQHÑÑHQG
KD5HH5DK 276220022672 SMEPPEMS SMFPPFMS SMEPPEMS HMRVVRMH HMUVVUMH HMUJJUMH TNFQQFNT
11A414A11 396183381693 AAJDADJAA BBIDBDIBB AAJDADJAA EECSESCEE EECIEICEE EECIEICEE BBKEBEKBB
1Q5AKA5Q1 731212212137 AYEJSJEYA BYFISIFYB AXEJSJEXA EKRCHCRKE EKUCHCUKE EKUCHCUKE BZFKTKFZB
6RA555AR6 2636029206362 FZJEEEJZF EZIFFFIZE FZJEEEJZF NWCRRRCWN NWCUUUCWN NWCUUUCWN G_KFFFK_G
9EI4G4IE9 3597871787953 INQDODQNI JNQDODQNJ INQDÑDQNI LPYSGSYPL LPYIGIYPL LPYIGIYPL JÑREPERÑJ
APBDBDBPA 4120874780214 JXKMKMKXJ IXKMKMKXI JYKMKMKYJ CXTMTMTXC CXTMTMTXC CXTMTMTXC KYLNLNLYK
CC8J1J8CC 4699722279964 LLHRARHLL LLHRBRHLL LLHRARHLL UUDQEQDUU RRDQEQDRR RRDQEQDRR MMISBSIMM
F910C019F 5788955598875 ÑIA_L_AIÑ ÑJB_L_BJÑ OIA_L_AIO BLE_U_ELB BLE_R_ELB BLE_R_ELB OJBAMABJO
GP62L26PG 6385093905836 OXFBTBFXO OXEATAEXO ÑYFBUBFYÑ GXNAFANXG GXNAFANXG GXNAOANXG PYGCUCGYP
M1EHRHE1M 8332192912338 UANPZPNAU UBNPZPNBU TANPZPNAT ZEPVWVPEZ ZEPVWVPEZ ZEPJWJPEZ VBÑQ_QÑBV
M1RAIAR1M 8338331338338 UAZJQJZAU UBZIQIZBU TAZJQJZAT ZEWCYCWEZ ZEWCYCWEZ ZEWCYCWEZ VB_KRK_BV
PICF3FCIP 9693965693969 XQLÑCÑLQX XQLÑCÑLQX YQLOCOLQY XYUBOBUYX XYRBOBRYX XYRBFBRYX YRMODOMRY
53APRRPA35 54173144137145 ECJXZZXJCE FCIXZZXICF ECJYZZYJCE ROCXWWXCOR UOCXWWXCOU UFCXWWXCFU FDKY__YKDF
124HGGGH421 319102262201913 ABDPOOOPDBA BADPOOOPDAB ABDPÑÑÑPDBA EASVGGGVSAE EAIVGGGVIAE EAIJGGGJIAE BCEQPPPQECB
1LIJFQFJIL1 525408828804525 ATQRÑYÑRQTA BTQRÑYÑRQTB AUQROXORQUA EFYQBKBQYFE EFYQBKBQYFE EOYQBKBQYOE BURSOZOSRUB
1NOG363GON1 548785939587845 AVWOCFCOWVA BVWOCECOWVB AVWÑCFCÑWVA EJÑGONOGÑJE EJÑGONOGÑJE EVÑGFNFGÑVE BWXPDGDPXWB
23ED5H5DE32 629596242695926 BCNMEPEMNCB ACNMFPFMNCA BCNMEPEMNCB AOPMRVRMPOA AOPMUVUMPOA AFPMUJUMPFA CDÑNFQFNÑDC
2OA5EDE5AO2 850128939821058 BWJENMNEJWB AWIFNMNFIWA BWJENMNEJWB AÑCRPMPRCÑA AÑCUPMPUCÑA AÑCUPMPUCÑA CXKFÑNÑFKXC
32MOQRQOM23 918395696593819 CBUWYZYWUBC CAUWYZYWUAC CBTWXZXWTBC OAZÑKWKÑZAO OAZÑKWKÑZAO FAZÑKWKÑZAF DCVXZ_ZXVCD
HK82EEE28KH 5249970550799425 PSHBNNNBHSP PSHANNNAHSP PSHBNNNBHSP VHDAPPPADHV VHDAPPPADHV JHDAPPPADHJ QTICÑÑÑCITQ
2C6E7117E6C2 20210235053201202 BLFNGAAGNFLB ALENGBBGNELA BLFNGAAGNFLB AUNPIEEIPNUA ARNPSEESPNRA ARNPSEESPNRA CMGÑHBBHÑGMC
19PG2HNH2GP91 314435021120534413 AIXOBPVPBOXIA BJXOAPVPAOXJB AIYÑBPVPBÑYIA ELXGAVJVAGXLE ELXGAVJVAGXLE ELXGAJVJAGXLE BJYPCQWQCPYJB

Follow-ups

To improve the search, it needs to improve the way we find palindromic numbers. It's already good, but not perfect.

Also, we can try to optimize even better the computation accross threads.

About

Finding meaningful palindromic phrases with palindromic numbers

Topics

Resources

Stars

Watchers

Forks

Languages