OFFSET
0,3
LINKS
Michel Marcus, Table of n, a(n) for n = 0..10000
FORMULA
a(A352535(n)) = 0. - Bernard Schott, Jul 12 2022
MATHEMATICA
A257587[n_] := Total[-(-1)^Range[Max[IntegerLength[n], 1]]*IntegerDigits[n]^2];
Array[A257587, 100, 0] (* Paolo Xausa, Mar 11 2024 *)
PROG
(Python)
def a(n): return sum(int(d)**2*(-1)**i for i, d in enumerate(str(n)))
print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 11 2022
(PARI) a(n) = my(d=digits(n)); sum(k=1, #d, (-1)^(k+1)*d[k]^2); \\ Michel Marcus, Jul 12 2022
CROSSREFS
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, May 10 2015
STATUS
approved