|
|
A281290
|
|
Primes p where the difference between the largest digit of p and sum of all other digits equals 4.
|
|
1
|
|
|
37, 59, 73, 127, 149, 239, 271, 293, 307, 419, 491, 509, 941, 1049, 1061, 1117, 1171, 1193, 1229, 1319, 1409, 1601, 1913, 1931, 2017, 2039, 2129, 2309, 2903, 3119, 3191, 3209, 3911, 4019, 4091, 5009, 6011, 6101, 9041, 9203, 9221, 9311, 10061, 10139, 10193
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
37 is a term since 7 - 3 = 4.
9221 is a term, since 9 - (2 + 2 + 1) = 4.
|
|
MATHEMATICA
|
Select[Prime@ Range[10^3], Fold[#1 - #2 &, First@ #, Rest@ #] == 4 &@ Reverse@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 08 2017 *)
|
|
PROG
|
(PARI) do(d)=my(v=List()); for(len=1, d, for(b=5, 9, for(e=0, len-1, my(t=b*10^e, n, dig); forvec(u=vector(b-4, i, [0, len-1]), n=t+sum(i=1, #u, 10^u[i]); if(!isprime(n), next); dig=digits(n); if(2*vecmax(dig)==vecsum(dig)+4, listput(v, n)), 1)))); Set(v) \\ Charles R Greathouse IV, Feb 18 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|