login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

The decimal digits of a(n) correspond to the Gilbreath transform of the decimal digits of n.
1

%I #13 May 20 2023 13:39:56

%S 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,

%T 24,25,26,27,33,32,31,30,31,32,33,34,35,36,44,43,42,41,40,41,42,43,44,

%U 45,55,54,53,52,51,50,51,52,53,54,66,65,64,63,62,61,60,61

%N The decimal digits of a(n) correspond to the Gilbreath transform of the decimal digits of n.

%C Leading zeros are ignored.

%C This sequence preserves the number of digits (A055642) as well as the initial digit (A000030).

%H Rémy Sigrist, <a href="/A363038/b363038.txt">Table of n, a(n) for n = 0..10000</a>

%H N. J. A. Sloane, <a href="/A362451/a362451_2.txt">Maple code for Gilbreath transform and related arrays</a>

%e For n = 1029: the Gilbreath transform of (1 0 2 9) is (1 1 1 4), so a(1029) = 1114.

%t 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 *)

%o (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); }

%Y Cf. A000030, A055642, A334727 (base-2 analog).

%K nonn,base,easy

%O 0,3

%A _Rémy Sigrist_, May 14 2023