Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #43 Nov 29 2019 12:01:08
%S 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,
%T -1,27,-3,25,-5,23,-7,21,-9,45,-8,42,-11,39,-14,36,-17,33,-20,65,-19,
%U 61,-23,57,-27,53,-31,49,-35,89,-34,84,-39,79,-44,74,-49,69,-54,117
%N a(1)=0, a(n) = n - (product of nonzero digits of n) - a(n-1).
%C a(10n+1)-a(10n-1)=1 for all positive integer n (conjectured).
%H Joshua Oliver, <a href="/A329725/b329725.txt">Table of n, a(n) for n = 1..5000</a>
%F a(n) = Sum_{k=2..n} (-1)^(n-k)*A063543(k). - _Robert Israel_, Nov 20 2019
%e a(22) = 22 - 2*2 - 2 = 16.
%p R:= ListTools:-PartialSums(map(n -> (-1)^n*(n - convert(subs(0=NULL,convert(n,base,10)),`*`)), [$1..100])):
%p seq((-1)^n*R[n],n=1..100); # _Robert Israel_, Nov 20 2019
%t Nest[Append[#1, #2 - Last[#1] - Times @@ DeleteCases[IntegerDigits[#2], 0]] & @@ {#, Length@ # + 1} &, {0}, 69] (* _Michael De Vlieger_, Nov 19 2019 *)
%o (PARI) for (n=1, 70, print1 (v=if (n==1, 0, n - vecprod(select(sign, digits(n))) - v)", ")) \\ _Rémy Sigrist_, Nov 28 2019
%Y Cf. A063108, A063543.
%K sign,base,look
%O 1,10
%A _Joshua Oliver_, Nov 19 2019