The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048661 Number of n-digit dihedral primes for which the 4 numbers (n, n upside-down, n in a mirror, n upside-down and mirrored) are distinct. 1
0, 0, 0, 0, 0, 4, 12, 16, 132, 308, 1096, 3704, 12984, 47008, 179660, 681608 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
Carlos Rivera, Puzzle 39. The Mirrorable Numbers (By Mike Keith), The Prime Puzzles and Problems Connection.
PROG
(Python)
from sympy import isprime
from itertools import count, islice, product
def t(s): return s.translate({ord("2"):ord("5"), ord("5"):ord("2")})
def a(n):
if n < 2: return 0
c = 0
for mid in product("01258", repeat=n-2):
s = "1" + "".join(mid) + "1"
ss = set([s, s[::-1], t(s), t(s[::-1])])
if len(ss) != 4: continue
if all(isprime(int(w)) for w in ss): c += 1
return c
print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Apr 27 2024
CROSSREFS
Cf. A134996.
Sequence in context: A066632 A038242 A370191 * A036047 A356812 A045042
KEYWORD
base,more,nonn
AUTHOR
EXTENSIONS
a(11)-a(14) from Sean A. Irvine, Jun 25 2021
a(15)-a(16) from Michael S. Branicky, Apr 27 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 03:59 EDT 2024. Contains 372528 sequences. (Running on oeis4.)