OFFSET
1,2
EXAMPLE
a(5)=4 because 5=(4+6)/2=(3+7)/2=(2+8)/2=(1+9)/2. a(17)=1 because 17=(1+33)/2. a(18)=1 because 18=(3+33)/2.
MAPLE
isA002113 := proc(n) option remember ; local digs, i ; digs := convert(n, base, 10) ; for i from 1 to nops(digs)/2 do if op(i, digs) <> op(-i, digs) then RETURN(false) ; fi ; od: RETURN(true) ; end: A109870 := proc(n) local a, d ; a := 0 ; for d from n-1 to 0 by -1 do if isA002113(d) and isA002113(2*n-d) then a := a+1 ; fi ; od: RETURN(a) ; end: seq(A109870(n), n=1..120) ; # R. J. Mathar, Aug 15 2007
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jul 09 2005
EXTENSIONS
Corrected and extended by R. J. Mathar, Aug 15 2007
STATUS
approved