OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Chris Caldwell, The First 1,000 Primes
EXAMPLE
1571 is a prime in which the largest digit is equal to the sum of all the other digits.
MAPLE
A054055 := proc(n) max(op(convert(n, base, 10))) ; end: A007953 := proc(n) add(d, d=convert(n, base, 10)) ; end: for n from 1 to 800 do p := ithprime(n) ; if 2*A054055(p) = A007953(p) then printf("%d, ", p) ; fi; od: # R. J. Mathar, Feb 20 2009
MATHEMATICA
ldQ[n_]:=Module[{c=Sort[IntegerDigits[n]]}, Total[Most[c]]==Last[c]]; Select[ Prime[Range[1000]], ldQ] (* Harvey P. Dale, Dec 26 2013 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Parthasarathy Nambi, Feb 14 2009
EXTENSIONS
11 added in front and extended by R. J. Mathar, Feb 20 2009
STATUS
approved