|
|
A173914
|
|
Primes of the form R(n!-1), where R is the digit reversal.
|
|
2
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The next term is too large to include.
|
|
LINKS
|
|
|
EXAMPLE
|
n=5 -> 5!-1 = 120-1=119 -> R(119)=911 that is prime
|
|
MAPLE
|
P:=proc(i) local a, b, k, n, v; v:=array(1..10000); for n from 1 by 1 to i do a:=1; k:=n!-1; while k>0 do v[a]:=k-(trunc(k/10)*10); k:=trunc(k/10); a:=a+1; od; k:=0; for b from a-1 by -1 to 1 do k:=k+v[b]*10^(a-1-b); od; if isprime(k) then print(k); fi; od; end: P(2000);
|
|
MATHEMATICA
|
Select[IntegerReverse/@(Range[20]!-1), PrimeQ] (* Harvey P. Dale, Jan 17 2023 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,bref,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|