login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257587 If n = abcd... in decimal, a(n) = a^2 - b^2 + c^2 - d^2 + ... 3
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 0, -3, -8, -15, -24, -35, -48, -63, -80, 4, 3, 0, -5, -12, -21, -32, -45, -60, -77, 9, 8, 5, 0, -7, -16, -27, -40, -55, -72, 16, 15, 12, 7, 0, -9, -20, -33, -48, -65, 25, 24, 21, 16, 9, 0, -11, -24, -39, -56, 36, 35, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
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
First 100 terms coincide with those of A177894, but then they diverge.
Cf. A257588, A257796, A352535 (indices of zeros).
Sequence in context: A063462 A098736 A002015 * A257588 A352598 A303269
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, May 10 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 05:47 EDT 2024. Contains 375027 sequences. (Running on oeis4.)