|
|
A363038
|
|
The decimal digits of a(n) correspond to the Gilbreath transform of the decimal digits of n.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Leading zeros are ignored.
This sequence preserves the number of digits (A055642) as well as the initial digit (A000030).
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|