A363038 The decimal digits of a(n) correspond to the Gilbreath transform of the decimal digits of n.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 21, 20, 21, 22, 23, 24, 25, 26, 27, 33, 32, 31, 30, 31, 32, 33, 34, 35, 36, 44, 43, 42, 41, 40, 41, 42, 43, 44, 45, 55, 54, 53, 52, 51, 50, 51, 52, 53, 54, 66, 65, 64, 63, 62, 61, 60, 61
Offset: 0
Examples
For n = 1029: the Gilbreath transform of (1 0 2 9) is (1 1 1 4), so a(1029) = 1114.
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
Programs
-
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 *)
-
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); }
Comments