login
A156979
Primes p such that 1 = abs(largest digit of p - sum of all the other digits of p).
8
23, 43, 67, 89, 113, 131, 157, 179, 197, 199, 223, 241, 263, 269, 311, 313, 331, 337, 353, 359, 373, 379, 397, 421, 449, 461, 463, 571, 593, 607, 641, 643, 661, 683, 719, 733, 739, 751, 809, 827, 829, 863, 881, 919, 937, 953, 971, 991, 1013, 1031, 1033
OFFSET
1,1
LINKS
EXAMPLE
If prime=197(1<7<9) and 1=abs(9-(1+7)), then 197=a(10). If prime=199(1<9=9) and 1=abs(9-(9+1)), then 199=a(11). If prime=223(2=2<3) and 1=abs(3-(2+2)), then 223=a(12), etc.
MAPLE
From R. J. Mathar, Mar 18 2010: (Start)
A007953 := proc(n) local d ; add(d, d= convert(n, base, 10)) ; end proc:
A054055 := proc(n) local d ; max(op(convert(n, base, 10))) ; end proc:
isA156979 := proc(n) isprime(n) and abs(A007953(n)-2*A054055(n)) = 1 ; end proc:
for n from 1 to 1050 do if isA156979(n) then printf("%d, ", n); end if; end do: (End)
MATHEMATICA
ldodQ[n_]:=Module[{sidn=Sort[IntegerDigits[n]]}, Abs[Total[Most[ sidn]]- Last[ sidn]] == 1]; Select[Prime[Range[200]], ldodQ] (* Harvey P. Dale, Nov 13 2013 *)
CROSSREFS
Sequence in context: A037137 A340136 A154530 * A281226 A158283 A155786
KEYWORD
nonn,base
AUTHOR
STATUS
approved