OFFSET
1,1
COMMENTS
If the largest digit L (say) is repeated, the criterion is that that L - (sum of all digits except for one copy of L) is a square.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
Prime 1153 is in a(n) since 5-3-1-1=0. Zero is square.
Prime 1163 is in a(n) since 6-3-1-1=1. One is square.
Prime 1171 is in a(n) since 7-1-1-1=4. Four is square.
MATHEMATICA
Select[Prime@ Range@ 175, IntegerQ@ Sqrt@ Fold[#1 - #2 &, Max@ #, Rest@ #] &@ Reverse@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 02 2017 *)
PROG
(PARI) is(n)=my(d=digits(n)); issquare(2*vecmax(d)-vecsum(d)) && isprime(n) \\ Charles R Greathouse IV, Feb 05 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Osama Abuajamieh, Jan 10 2017
STATUS
approved