OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..5000
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:
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
KEYWORD
nonn,base
AUTHOR
Juri-Stepan Gerasimov, Feb 20 2009
STATUS
approved