login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338030 Primes p such that reverse(p), reverse(2*p) and reverse(2*reverse(p)) are all primes, where reverse = A004086. 1
7, 17, 37, 71, 73, 167, 181, 191, 353, 373, 389, 761, 787, 797, 929, 983, 1753, 1879, 3571, 7057, 7177, 7507, 7717, 7879, 9349, 9439, 9781, 9787, 15053, 15227, 15307, 15451, 15551, 15667, 15679, 15791, 15919, 16061, 16073, 16453, 16547, 16561, 16747, 16883, 16979, 17471, 17909, 17971, 18427
(list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 37 is a term because 37, reverse(37)=73, reverse(2*37)=47 and reverse(2*73)=641 are prime.
MAPLE
rev:= proc(n) local L, k;
L:= convert(n, base, 10);
add(L[-k]*10^(k-1), k=1..nops(L))
end proc:
filter:= proc(n) local r;
if not isprime(n) then return false fi;
r:= rev(n);
isprime(r) and isprime(rev(2*n)) and isprime(rev(2*r))
end proc:
select(filter, [seq(i, i=3..20000, 2)]);
MATHEMATICA
With[{rev = IntegerReverse}, Select[Range[20000], AllTrue[{#, rev[#], rev[2*#], rev[2*rev[#]]}, PrimeQ] &]] (* Amiram Eldar, Oct 10 2020 *)
PROG
(PARI) rev(n) = fromdigits(Vecrev(digits(n))); \\ A004086
isok(p) = if (isprime(p), my(r=rev(p)); isprime(r) && isprime(rev(2*p)) && isprime(rev(2*r))); \\ Michel Marcus, Oct 10 2020
CROSSREFS
Sequence in context: A030432 A090147 A348560 * A211476 A155007 A214634
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Oct 09 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 18 13:45 EDT 2024. Contains 376000 sequences. (Running on oeis4.)