0,3

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

(Haskell)

a257588 = abs . f 1 where

f _ 0 = 0

f s x = s * d ^ 2 + f (negate s) x' where (x', d) = divMod x 10

-- Reinhard Zumkeller, May 10 2015

(Python)

def A257588(n):

....return abs(sum((int(d)**2*(-1)**j for j, d in enumerate(str(n)))))

# Chai Wah Wu, May 10 2015

Cf. A257587, A257796.

Cf. A225693, A003132.

Sequence in context: A098736 A002015 A257587 * A303269 A003132 A062331

Adjacent sequences: A257585 A257586 A257587 * A257589 A257590 A257591

nonn,base

N. J. A. Sloane, May 10 2015

approved