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!)
A345191 a(n) is the least emirp k such that 2*n-k is also an emirp, or 0 if there are none. 1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 13, 0, 17, 0, 0, 0, 0, 13, 0, 17, 13, 0, 17, 0, 0, 0, 31, 0, 0, 31, 0, 0, 37, 0, 0, 0, 0, 13, 13, 17, 17, 13, 0, 17, 0, 0, 31, 31, 0, 37, 13, 0, 17, 37, 0, 13, 0, 17, 13, 31, 17, 0, 37, 0, 31, 0, 71, 31, 73, 0, 37, 73, 0, 0, 79, 0, 13, 0, 17, 71, 13, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,13
LINKS
EXAMPLE
a(24) = 17 because 2*24 = 17+31 where 17 and 31 are emirps.
MAPLE
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
filter:= proc(t) local r;
if not isprime(t) then return false fi;
r:= revdigs(t);
r <> t and isprime(r)
end proc:
N:= 1000: # for a(1)..a(N)
E:= select(filter, [seq(i, i=3..2*N, 2)]);
f:= proc(n) local i, j, w, t;
t:= 2*n;
j:= ListTools:-BinaryPlace(E, t);
i:= 1;
while i <= j do
w:= E[i]+E[j];
if w = t then return E[i]
elif w < t then i:=i+1
else j:= j-1
fi
od;
0
end proc:
map(f, [$1..N]);
CROSSREFS
Sequence in context: A221341 A221106 A271075 * A073867 A114782 A065112
KEYWORD
nonn,base,look
AUTHOR
J. M. Bergot and Robert Israel, Jun 10 2021
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 July 13 19:40 EDT 2024. Contains 374286 sequences. (Running on oeis4.)