The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A041000 If decimal expansion of n-th prime is x1 x2 ... xk, sort the xi into nonincreasing order, y1 y2 ... yk; then a(n) = |y1-y2-y3...-yk|. 4
 2, 3, 5, 7, 0, 2, 6, 8, 1, 7, 2, 4, 3, 1, 3, 2, 4, 5, 1, 6, 4, 2, 5, 1, 2, 0, 2, 6, 8, 1, 4, 1, 3, 5, 4, 3, 1, 2, 0, 3, 1, 6, 7, 5, 1, 1, 0, 1, 3, 5, 2, 4, 1, 2, 0, 1, 1, 4, 2, 5, 3, 4, 4, 1, 1, 3, 1, 1, 0, 2, 1, 1, 2, 1, 1, 2, 2, 1, 3, 5, 4, 1, 0, 2, 2, 3, 1, 2, 1, 1, 3, 2, 3, 4, 4, 2, 4, 2, 0, 0, 2, 3, 2, 2, 1, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS FORMULA a(n)=|A007953(n)-2*A054055(n)|. [Charles R Greathouse IV, May 07, 2011] EXAMPLE a(397)=|9-7-3|=1. MATHEMATICA der[n_]:=Module[{c=Reverse[Sort[IntegerDigits[n]]]}, Abs[First[c]-Total[Rest[c]]]]; der/@Prime[Range[110]] (* Harvey P. Dale, Aug 15 2012 *) CROSSREFS Cf. A040164. Sequence in context: A093339 A113566 A020775 * A042939 A185107 A115259 Adjacent sequences:  A040997 A040998 A040999 * A041001 A041002 A041003 KEYWORD easy,nonn,base AUTHOR EXTENSIONS More terms from Michel ten Voorde STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 18 21:55 EDT 2021. Contains 344003 sequences. (Running on oeis4.)