OFFSET
1,2
COMMENTS
1^1=1;2-1=1,3-1=2, 2^2=4;5-4=1,7-4=3,11-4=7,13-4=9,...3^3=27;29-27=2,31-27=4,..
MATHEMATICA
f[n_]:=Module[{k=1}, While[n>k^k, ++k]; k-1]; Table[p=Prime[n]; a=f[p]; Prime[n]-a^a, {n, 6!}]
xn[n_]:=Module[{x=Floor[Log[n]/ProductLog[Log[n]]]}, n-x^x]; xn/@Prime[ Range[ 70]] (* Harvey P. Dale, Oct 15 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 13 2010
STATUS
approved