The number ```89``` is the first positive integer that has a particular, curious property:
The square of ```89``` is ```7921```; ```89² = 7921```
The reverse of ```7921``` is ```1297```, and ```1297``` is a prime number.
The cube of ```89``` is ```704969```; ```89³ = 704969```
The reverse of ```704969``` is ```969407```, and ```969407``` is a prime number.
The first four terms of this sequence having this special property are:
```
n-th term      term value
    1               89 
    2              271
    3              325
    4              328
```
Create a function ```sq_cub_rev_prime()```, that receives the ordinal number of the sequence and outputs its correspoding value.
Use the above table to show how the function should work:
```python 
sq_cub_rev_prime(1) == 89 
sq_cub_rev_prime(2) == 271
sq_cub_rev_prime(3) == 325
sq_cub_rev_prime(4) == 328
```
Your code will be tested up to the 250th term
This is not a registered sequence of OESIS, so if you are one of the first ten people that solve this kata, you may have the privilege to register the sequence at https://oeis.org, with your name. If you do so, please, mention in your biography that you are a Codewarrior.
Memoize your results to pass the tests.
Enjoy it!
nums = {0: 89, 1: 271, 2: 325, 3: 328, 4: 890, 5: 1025, 6: 1055, 7: 1081, 8: 1129, 9: 1169, 10: 1241, 11: 2657,
        12: 2710, 13: 3112, 14: 3121, 15: 3149, 16: 3244, 17: 3250, 18: 3263, 19: 3280, 20: 3335, 21: 3346, 22: 3403,
        23: 4193, 24: 4222, 25: 4231, 26: 4289, 27: 4291, 28: 5531, 29: 5584, 30: 5653, 31: 5678, 32: 5716, 33: 5791,
        34: 5795, 35: 5836, 36: 5837, 37: 8882, 38: 8900, 39: 8926, 40: 8942, 41: 9664, 42: 9794, 43: 9875, 44: 9962,
        45: 10178, 46: 10250, 47: 10393, 48: 10429, 49: 10499, 50: 10550, 51: 10577, 52: 10651, 53: 10679, 54: 10717,
        55: 10718, 56: 10739, 57: 10756, 58: 10762, 59: 10810, 60: 10844, 61: 10895, 62: 10898, 63: 10943, 64: 10996,
        65: 11035, 66: 11039, 67: 11084, 68: 11137, 69: 11159, 70: 11164, 71: 11182, 72: 11191, 73: 11290, 74: 11351,
        75: 11371, 76: 11575, 77: 11690, 78: 11695, 79: 11707, 80: 11722, 81: 11732, 82: 11795, 83: 11827, 84: 11861,
        85: 11885, 86: 12109, 87: 12124, 88: 12242, 89: 12268, 90: 12304, 91: 12361, 92: 12362, 93: 12410, 94: 12433,
        95: 12436, 96: 12535, 97: 19144, 98: 19267, 99: 19271, 100: 19273, 101: 19385, 102: 19433, 103: 19442,
        104: 19451, 105: 19501, 106: 19564, 107: 19597, 108: 19603, 109: 19631, 110: 19637, 111: 19766, 112: 19846,
        113: 19865, 114: 19871, 115: 19909, 116: 19927, 117: 26464, 118: 26491, 119: 26570, 120: 26579, 121: 26621,
        122: 26704, 123: 26944, 124: 26965, 125: 27001, 126: 27029, 127: 27052, 128: 27100, 129: 27101, 130: 31120,
        131: 31210, 132: 31223, 133: 31237, 134: 31261, 135: 31327, 136: 31331, 137: 31351, 138: 31463, 139: 31469,
        140: 31490, 141: 31534, 142: 31561, 143: 31657, 144: 31726, 145: 31739, 146: 31784, 147: 31807, 148: 31883,
        149: 31928, 150: 31978, 151: 32066, 152: 32072, 153: 32213, 154: 32255, 155: 32308, 156: 32431, 157: 32440,
        158: 32446, 159: 32500, 160: 32539, 161: 32564, 162: 32573, 163: 32630, 164: 32656, 165: 32708, 166: 32749,
        167: 32759, 168: 32800, 169: 32888, 170: 32969, 171: 33059, 172: 33254, 173: 33325, 174: 33338, 175: 33350,
        176: 33404, 177: 33460, 178: 33475, 179: 33509, 180: 33568, 181: 33575, 182: 33701, 183: 33833, 184: 34030,
        185: 34112, 186: 34159, 187: 34163, 188: 41351, 189: 41429, 190: 41473, 191: 41501, 192: 41608, 193: 41639,
        194: 41839, 195: 41879, 196: 41930, 197: 41933, 198: 41992, 199: 42029, 200: 42089, 201: 42103, 202: 42121,
        203: 42179, 204: 42220, 205: 42235, 206: 42310, 207: 42326, 208: 42385, 209: 42463, 210: 42466, 211: 42524,
        212: 42575, 213: 42607, 214: 42682, 215: 42782, 216: 42839, 217: 42890, 218: 42910, 219: 42982, 220: 43045,
        221: 43049, 222: 54986, 223: 54991, 224: 55073, 225: 55310, 226: 55492, 227: 55589, 228: 55598, 229: 55603,
        230: 55651, 231: 55697, 232: 55718, 233: 55778, 234: 55840, 235: 55859, 236: 55879, 237: 55916, 238: 56005,
        239: 56093, 240: 56261, 241: 56279, 242: 56356, 243: 56530, 244: 56681, 245: 56780, 246: 56809, 247: 56968,
        248: 57160, 249: 57185}


def sq_cub_rev_prime(n):
    return nums[n-1]

nums = {0: 89, 1: 271, 2: 325, 3: 328, 4: 890, 5: 1025, 6: 1055, 7: 1081, 8: 1129, 9: 1169, 10: 1241, 11: 2657,
        12: 2710, 13: 3112, 14: 3121, 15: 3149, 16: 3244, 17: 3250, 18: 3263, 19: 3280, 20: 3335, 21: 3346, 22: 3403,
        23: 4193, 24: 4222, 25: 4231, 26: 4289, 27: 4291, 28: 5531, 29: 5584, 30: 5653, 31: 5678, 32: 5716, 33: 5791,
        34: 5795, 35: 5836, 36: 5837, 37: 8882, 38: 8900, 39: 8926, 40: 8942, 41: 9664, 42: 9794, 43: 9875, 44: 9962,
        45: 10178, 46: 10250, 47: 10393, 48: 10429, 49: 10499, 50: 10550, 51: 10577, 52: 10651, 53: 10679, 54: 10717,
        55: 10718, 56: 10739, 57: 10756, 58: 10762, 59: 10810, 60: 10844, 61: 10895, 62: 10898, 63: 10943, 64: 10996,
        65: 11035, 66: 11039, 67: 11084, 68: 11137, 69: 11159, 70: 11164, 71: 11182, 72: 11191, 73: 11290, 74: 11351,
        75: 11371, 76: 11575, 77: 11690, 78: 11695, 79: 11707, 80: 11722, 81: 11732, 82: 11795, 83: 11827, 84: 11861,
        85: 11885, 86: 12109, 87: 12124, 88: 12242, 89: 12268, 90: 12304, 91: 12361, 92: 12362, 93: 12410, 94: 12433,
        95: 12436, 96: 12535, 97: 19144, 98: 19267, 99: 19271, 100: 19273, 101: 19385, 102: 19433, 103: 19442,
        104: 19451, 105: 19501, 106: 19564, 107: 19597, 108: 19603, 109: 19631, 110: 19637, 111: 19766, 112: 19846,
        113: 19865, 114: 19871, 115: 19909, 116: 19927, 117: 26464, 118: 26491, 119: 26570, 120: 26579, 121: 26621,
        122: 26704, 123: 26944, 124: 26965, 125: 27001, 126: 27029, 127: 27052, 128: 27100, 129: 27101, 130: 31120,
        131: 31210, 132: 31223, 133: 31237, 134: 31261, 135: 31327, 136: 31331, 137: 31351, 138: 31463, 139: 31469,
        140: 31490, 141: 31534, 142: 31561, 143: 31657, 144: 31726, 145: 31739, 146: 31784, 147: 31807, 148: 31883,
        149: 31928, 150: 31978, 151: 32066, 152: 32072, 153: 32213, 154: 32255, 155: 32308, 156: 32431, 157: 32440,
        158: 32446, 159: 32500, 160: 32539, 161: 32564, 162: 32573, 163: 32630, 164: 32656, 165: 32708, 166: 32749,
        167: 32759, 168: 32800, 169: 32888, 170: 32969, 171: 33059, 172: 33254, 173: 33325, 174: 33338, 175: 33350,
        176: 33404, 177: 33460, 178: 33475, 179: 33509, 180: 33568, 181: 33575, 182: 33701, 183: 33833, 184: 34030,
        185: 34112, 186: 34159, 187: 34163, 188: 41351, 189: 41429, 190: 41473, 191: 41501, 192: 41608, 193: 41639,
        194: 41839, 195: 41879, 196: 41930, 197: 41933, 198: 41992, 199: 42029, 200: 42089, 201: 42103, 202: 42121,
        203: 42179, 204: 42220, 205: 42235, 206: 42310, 207: 42326, 208: 42385, 209: 42463, 210: 42466, 211: 42524,
        212: 42575, 213: 42607, 214: 42682, 215: 42782, 216: 42839, 217: 42890, 218: 42910, 219: 42982, 220: 43045,
        221: 43049, 222: 54986, 223: 54991, 224: 55073, 225: 55310, 226: 55492, 227: 55589, 228: 55598, 229: 55603,
        230: 55651, 231: 55697, 232: 55718, 233: 55778, 234: 55840, 235: 55859, 236: 55879, 237: 55916, 238: 56005,
        239: 56093, 240: 56261, 241: 56279, 242: 56356, 243: 56530, 244: 56681, 245: 56780, 246: 56809, 247: 56968,
        248: 57160, 249: 57185}


def sq_cub_rev_prime(n):
    return nums[n-1]
