OFFSET
1,1
COMMENTS
There are other possible definitions of what could be considered a "limerick prime": One may require A and B just to be single digits (Cook link), one might restrict them to have length |B| < |A|, purists might require them to have 9 resp. 5 digits (and not necessarily be the same, i.e.: A, A', B, B', A", where As and Bs rhyme or end in the same digit, cf. Kesteloot tweet) or to have that number of syllables when spelled out in English: a(6) = 99559 gives the number of syllables per line in a limerick.
LINKS
J. D. Cook, Limerick primes, March 8, 2011.
Lawrence Kesteloot, A #LimerickPrime, on twitter, Oct. 6, 2015.
Lawrence Kesteloot, Limerick prime, on GitHub, 2015.
Greg Ross, Trivium 39: Sonnet prime, FutilityCloset, March 3, 2011.
MATHEMATICA
Select[Flatten@ Table[FromDigits@ Flatten@ Map[IntegerDigits, {a, a, b, b, a}], {a, 31}, {b, 0, a - 1}], PrimeQ] (* Michael De Vlieger, Apr 30 2020 *)
PROG
(PARI) print_upto(n, i=1)=until(i++>n, for(j=0, i-1, isprime(p=eval(Str(i, i, j, j, i)))&&print1(p", ")))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Apr 18 2020
STATUS
approved