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!)
A351985 If n = abcd... in decimal, a(n) = |a^3 - b^3 + c^3 - d^3 + ...|. 2
0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 0, 7, 26, 63, 124, 215, 342, 511, 728, 8, 7, 0, 19, 56, 117, 208, 335, 504, 721, 27, 26, 19, 0, 37, 98, 189, 316, 485, 702, 64, 63, 56, 37, 0, 61, 152, 279, 448, 665, 125, 124, 117, 98, 61, 0, 91, 218, 387, 604, 216, 215, 208, 189, 152 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MAPLE
a:= n-> (l-> abs(add(l[i]^3*(-1)^i, i=1..nops(l))))(convert(n, base, 10)):
seq(a(n), n=0..64); # Alois P. Heinz, Mar 24 2022
MATHEMATICA
Table[Abs[Sum[(-1)^(k + 1)*Part[IntegerDigits[n]^3, k], {k, 1, Length[IntegerDigits[n]]}]], {n, 0, 100}]
PROG
(PARI) a(n) = my(d=digits(n)); abs(sum(k=1, #d, (-1)^k*d[k]^3)) \\ Michel Marcus, Feb 27 2022
(Python)
def A351985(n): return abs(sum((-1 if a%2 else 1)*int(b)**3 for a, b in enumerate(str(n)))) # Chai Wah Wu, Mar 09 2022
CROSSREFS
Sequence in context: A270437 A259603 A254521 * A352172 A055012 A069939
KEYWORD
nonn,base
AUTHOR
Luca Onnis, Feb 27 2022
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 16 09:29 EDT 2024. Contains 375174 sequences. (Running on oeis4.)