OFFSET
1,6
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(7)=6 because p(7)=17, b(n)=71 and (71-17)/9=6.
MAPLE
f:= proc(n) local p, L, i;
p:= ithprime(n);
L:= sort(convert(p, base, 10));
(add(10^(i-1)*L[i], i=1..nops(L))-p)/9
end proc:
map(f, [$1..100]); # Robert Israel, Nov 26 2019
MATHEMATICA
Table[ -Prime[n]-FromDigits[Sort[ -IntegerDigits[Prime[n]]]], {n, 1, 100}]
CROSSREFS
KEYWORD
AUTHOR
Zak Seidov, Jun 30 2003
STATUS
approved