Math::N...:Emirps(3)

πŸ“¦
version 75 Β· 2 versions
, in fedora 43

πŸ’– Math::NumSeq::Emirps πŸ’–

okay bestie, so this page is Math::NumSeq::Emirps from the User Contributed Perl Documentation, and it's literally about primes that go both ways πŸ¦‹


✨ NAME ✨

Math::NumSeq::Emirps β€” primes backwards and forwards, no cap πŸ’…


🌸 SYNOPSIS 🌸

use Math::NumSeq::Emirps;
my $seq = Math::NumSeq::Emirps->new;
my ($i, $value) = $seq->next;

πŸŽ€ DESCRIPTION πŸŽ€

so the "emirps" are numbers which are primes backwards and forwards. like, both directions ate. πŸ’–

for example 157 is an emirp because both 157 and its reverse 751 are primes. the way it just flips and stays iconic?? 😭✨

not me forgetting to mention: prime palindromes are excluded. so no "reads the same both ways" main characters allowed in this club, sorry πŸš«πŸ‘‘

the default base is decimal, or you can use the radix parameter to select another base. choose your own adventure fr fr 🌈


πŸ’… FUNCTIONS πŸ’…

go check out "FUNCTIONS" in Math::NumSeq for the behaviour that's common to all sequence classes, bestie 🫢

  • $seq = Math::NumSeq::Emirps->new ()
  • $seq = Math::NumSeq::Emirps->new (radix => 16) β€” create and return a new sequence object ✨ (yes that second one is giving hex energy, iykyk)
  • $bool = $seq->pred($value) β€” return true if $value is an emirp, meaning it and its digit reversal (in the radix) are both primes. two primes or it's not happening, periodt πŸ’…

πŸ‘€ SEE ALSO πŸ‘€

  • Math::NumSeq
  • Math::NumSeq::Primes

🌈 HOME PAGE 🌈

<http://user42.tuxfamily.org/math-numseq/index.html>


⭐ LICENSE ⭐

Copyright 2010, 2011, 2012, 2013, 2014, 2016, 2019, 2020 Kevin Ryde

Math-NumSeq is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Math-NumSeq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.


perl v5.42.0 Β· 2025-07-25 β€” and that's the whole vibe check for Math::NumSeq::Emirps, bestie. go make some numbers that slay in both directions πŸ’–βœ¨πŸ¦‹πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from