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!)
A178316 Primes whose digital rotation is still prime. 3
2, 5, 11, 19, 61, 101, 109, 151, 181, 199, 601, 619, 659, 661, 1019, 1021, 1061, 1091, 1109, 1129, 1151, 1181, 1201, 1229, 1259, 1291, 1511, 1559, 1601, 1609, 1621, 1669, 1699, 1811, 1901, 1999, 6011, 6091, 6101, 6199, 6211, 6221, 6229, 6521, 6551, 6569 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This means if written as in a digital clock and rotated 180 degrees around the center the result is also prime (possibly a different prime).
REFERENCES
Guy, R. K., Unsolved Problems in Number Theory, p 15 This sequence is related to the palindromic primes with symmetries as in Guy's book.
LINKS
EXAMPLE
For example 1259 becomes 6521 under such a rotation.
MATHEMATICA
Select[Range[6570], PrimeQ[#]&&PrimeQ[FromDigits[Reverse[IntegerDigits[#]/.{6->9, 9->6}]]]&&ContainsOnly[IntegerDigits[#], {0, 1, 2, 5, 6, 8, 9}]&] (* James C. McMahon, Apr 09 2024 *)
PROG
(Python)
from itertools import count, islice, product
from sympy import isprime
def A178316_gen():
yield from (2, 5)
r = ''.maketrans('69', '96')
for l in count(1):
for a in '125689':
for d in product('0125689', repeat=l):
s = a+''.join(d)
m = int(s)
if isprime(m) and isprime(int(s[::-1].translate(r))):
yield m
A178316_list = list(islice(A178316_gen(), 40)) # Chai Wah Wu, Apr 09 2024
CROSSREFS
Sequence in context: A276591 A051653 A106015 * A179632 A093871 A033263
KEYWORD
nonn,base,changed
AUTHOR
David Nacin, May 24 2010
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 April 24 18:05 EDT 2024. Contains 371962 sequences. (Running on oeis4.)