cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376257 a(n) = (n - c(n))*(-1)^c(n), where c(n) is the product of the digits of n (A007954).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, -28, 26, -24, 22, -20, 18, -16, 14, -12, 40, 37, 34, 31, 28, 25, 22, 19, 16, 13, 50, -46, 42, -38, 34, -30, 26, -22, 18, -14, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 70, -64, 58
Offset: 1

Views

Author

Stuart Coe, Sep 17 2024

Keywords

Comments

There is an interesting pattern on the graph of the sequence.

Examples

			For n = 129: 1*2*9=18. So a(n) = (129-18)*(-1)^18 = 111.
		

Crossrefs

Programs

  • Mathematica
    A376257[n_] := (n - #)*(-1)^# & [Times @@ IntegerDigits[n]];
    Array[A376257, 100] (* Paolo Xausa, Dec 10 2024 *)

Formula

a(n) = (n-A007954(n)) * (-1)^A007954(n).