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!)
A356740 a(n) is the least emirp that begins a sequence of exactly n emirps under the map p -> (p*R(p)) mod (p+R(p)), where R(p) is the digit reversal of p. 1
13, 389, 15013, 7149589, 1471573153 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 15013 because it is an emirp, so is (15013 * 31051) mod (15013+31051) = 983, and so is (983 * 389) mod (983 + 389) = 971, but not (971 * 179) mod (971 + 179), and this is the first emirp that works.
MAPLE
rev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
F:= proc(p) option remember; local k, q, r, s;
if not isprime(p) then return 0 fi;
q:= rev(p);
if q=p or not isprime(q) then return 0 fi;
r:= (p*q) mod (p+q);
1+procname(r);
end proc:
V:= Vector(4): count:= 0:
for p from 13 by 2 while count < 4 do
v:= F(p);
if v > 0 and V[v] = 0 then V[v]:= p; count:= count+1; fi;
od:
convert(V, list);
PROG
(PARI)
R(p)=fromdigits(Vecrev(digits(p)))
f(p)=my(r=R(p)); (p*r)%(p+r)
is(p)=my(r=R(p)); isprime(p)&&p!=r&&isprime(r)
card(x)=my(c=is(x), u=[]); while(is(x)&&is(f(x)), c++; u=concat(u, x); if(vecsearch(vecsort(u), f(x))==0, u=concat(u, f(x)); x=f(x), c--; break)); c
a(n)=forprime(k=2, +oo, if(card(k)==n, return(k))) \\ Jean-Marc Rebert, Sep 09 2022
CROSSREFS
Sequence in context: A302700 A194489 A354138 * A275651 A203972 A013527
KEYWORD
nonn,base,more,less
AUTHOR
J. M. Bergot and Robert Israel, Sep 04 2022
EXTENSIONS
a(5) from Jean-Marc Rebert, Sep 08 2022
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 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)