OFFSET
1,10
COMMENTS
a(10n+1)-a(10n-1)=1 for all positive integer n (conjectured).
LINKS
Joshua Oliver, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = Sum_{k=2..n} (-1)^(n-k)*A063543(k). - Robert Israel, Nov 20 2019
EXAMPLE
a(22) = 22 - 2*2 - 2 = 16.
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 *)
PROG
(PARI) for (n=1, 70, print1 (v=if (n==1, 0, n - vecprod(select(sign, digits(n))) - v)", ")) \\ Rémy Sigrist, Nov 28 2019
CROSSREFS
KEYWORD
AUTHOR
Joshua Oliver, Nov 19 2019
STATUS
approved