cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A156979 Primes p such that 1 = abs(largest digit of p - sum of all the other digits of p).

This page as a plain text file.
%I A156979 #10 Feb 11 2017 15:42:59
%S A156979 23,43,67,89,113,131,157,179,197,199,223,241,263,269,311,313,331,337,
%T A156979 353,359,373,379,397,421,449,461,463,571,593,607,641,643,661,683,719,
%U A156979 733,739,751,809,827,829,863,881,919,937,953,971,991,1013,1031,1033
%N A156979 Primes p such that 1 = abs(largest digit of p - sum of all the other digits of p).
%H A156979 Harvey P. Dale, <a href="/A156979/b156979.txt">Table of n, a(n) for n = 1..5000</a>
%e A156979 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.
%p A156979 From _R. J. Mathar_, Mar 18 2010: (Start)
%p A156979 A007953 := proc(n) local d ; add(d,d= convert(n,base,10)) ; end proc:
%p A156979 A054055 := proc(n) local d ; max(op(convert(n,base,10))) ; end proc:
%p A156979 isA156979 := proc(n) isprime(n) and abs(A007953(n)-2*A054055(n)) = 1 ; end proc:
%p A156979 for n from 1 to 1050 do if isA156979(n) then printf("%d,",n); end if; end do: (End)
%t A156979 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 *)
%Y A156979 Cf. A000040, A040997.
%K A156979 nonn,base
%O A156979 1,1
%A A156979 _Juri-Stepan Gerasimov_, Feb 20 2009