|
|
A281170
|
|
Primes p whose decimal representation satisfy: abs(digsum(p)-2*L(p)) = 8, being L(p) the largest decimal digit in p.
|
|
0
|
|
|
19, 109, 1009, 1777, 1889, 1979, 1997, 2677, 2699, 2767, 2789, 2879, 2897, 2969, 3779, 3797, 4567, 4657, 4679, 4967, 5399, 5557, 5647, 5669, 5737, 5849, 5939, 6277, 6299, 6367, 6389, 6547, 6563, 6569, 6637, 6653, 6659, 6673, 6763, 6947, 6983, 7177
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 1777, since abs(digsum(1777)-2*L(1777)) = abs(A007953(1777)-2*A054055(1777)) is 8 and among the primes 1777 is the 4th element satisfying such condition.
|
|
MATHEMATICA
|
Select[Prime@ Range[10^3], Abs[Max@ # - Total@ Rest@ #] == 8 &@ Reverse@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 02 2017 *)
|
|
PROG
|
(PARI) listA281170(k, {k0=8})={my(H=List(), y); forprime(z=prime(k0), prime(k), y=digits(z); if(abs(vecsum(y)-2*vecmax(y))==8, listput(H, z))); return(vector(#H, i, H[i]))} \\ Looks for those belonging terms between prime(k0) and prime(k). - R. J. Cano, Feb 06 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|