login
A109870
Number of ways a number can be expressed as the arithmetic mean of two palindromes.
2
1, 2, 3, 4, 4, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 0, 1, 2, 2, 2, 2, 5, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 5, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 4, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 3, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
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
Cf. A109871.
Sequence in context: A241283 A274095 A263408 * A364368 A171502 A005102
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jul 09 2005
EXTENSIONS
Corrected and extended by R. J. Mathar, Aug 15 2007
STATUS
approved