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.

A329725 a(1)=0, a(n) = n - (product of nonzero digits of n) - a(n-1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 17, 2, 16, 1, 15, 0, 14, -1, 13, -2, 29, -1, 27, -3, 25, -5, 23, -7, 21, -9, 45, -8, 42, -11, 39, -14, 36, -17, 33, -20, 65, -19, 61, -23, 57, -27, 53, -31, 49, -35, 89, -34, 84, -39, 79, -44, 74, -49, 69, -54, 117
Offset: 1

Views

Author

Joshua Oliver, Nov 19 2019

Keywords

Comments

a(10n+1)-a(10n-1)=1 for all positive integer n (conjectured).

Examples

			a(22) = 22 - 2*2 - 2 = 16.
		

Crossrefs

Programs

  • Maple
    R:= ListTools:-PartialSums(map(n -> (-1)^n*(n - convert(subs(0=NULL,convert(n,base,10)),`*`)), [$1..100])):
    seq((-1)^n*R[n],n=1..100); # Robert Israel, Nov 20 2019
  • Mathematica
    Nest[Append[#1, #2 - Last[#1] - Times @@ DeleteCases[IntegerDigits[#2], 0]] & @@ {#, Length@ # + 1} &, {0}, 69] (* Michael De Vlieger, Nov 19 2019 *)
  • PARI
    for (n=1, 70, print1 (v=if (n==1, 0, n - vecprod(select(sign, digits(n))) - v)", ")) \\ Rémy Sigrist, Nov 28 2019

Formula

a(n) = Sum_{k=2..n} (-1)^(n-k)*A063543(k). - Robert Israel, Nov 20 2019