A191780 Triangle G(n,k): the value of n written in base k with digits reversed (but written here in base 10) for 2 <= k <= n.
1, 3, 1, 1, 4, 1, 5, 7, 5, 1, 3, 2, 9, 6, 1, 7, 5, 13, 11, 7, 1, 1, 8, 2, 16, 13, 8, 1, 9, 1, 6, 21, 19, 15, 9, 1, 5, 10, 10, 2, 25, 22, 17, 10, 1, 13, 19, 14, 7, 31, 29, 25, 19, 11, 1, 3, 4, 3, 12, 2, 36, 33, 28, 21, 12, 1, 11, 13, 7, 17, 8, 43, 41, 37, 31, 23, 13, 1, 7, 22, 11, 22, 14, 2, 49, 46, 41, 34, 25, 14, 1, 15, 7, 15, 3
Offset: 2
Examples
The triangle starts 1; 3, 1; 1, 4, 1; 5, 7, 5, 1; 3, 2, 9, 6, 1;
Programs
-
Maple
A191780 := proc(n,k) d := ListTools[Reverse](convert(n,base,k)) ; add( op(i,d)*k^(i-1),i=1..nops(d)) ; end proc: # R. J. Mathar, Aug 26 2011
-
Mathematica
G[n_, k_] := IntegerDigits[n, k] // Reverse // FromDigits[#, k]&; Table[ G[n, k], {n, 2, 15}, {k, 2, n}] // Flatten (* Jean-François Alcover, Feb 10 2018 *)
Extensions
Corrected by R. J. Mathar, Aug 26 2011