OFFSET
0,3
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
N. J. A. Sloane, Maple code for Gilbreath transform and related arrays
EXAMPLE
For n = 1029: the Gilbreath transform of (1 0 2 9) is (1 1 1 4), so a(1029) = 1114.
MATHEMATICA
A363038[n_]:=Module[{d=IntegerDigits[n]}, FromDigits[Join[{First[d]}, Table[First[d=Abs[Differences[d]]], Length[d]-1]]]]; Array[A363038, 200, 0] (* Paolo Xausa, May 19 2023 *)
PROG
(PARI) a(n, base = 10) = { my (d = digits(n, base), t = vector(#d)); for (i = 1, #d, t[i] = d[1]; d = vector(#d-1, j, abs(d[j+1]-d[j])); ); fromdigits(t, base); }
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, May 14 2023
STATUS
approved