%I #30 Oct 16 2021 18:29:44
%S 1,1,2,1,3,3,1,4,7,4,1,5,13,15,5,1,6,21,40,31,6,1,7,31,85,121,63,7,1,
%T 8,43,156,341,364,127,8,1,9,57,259,781,1365,1093,255,9,1,10,73,400,
%U 1555,3906,5461,3280,511,10,1,11,91,585,2801,9331,19531,21845,9841,1023,11
%N Repunits in different bases: table by antidiagonals of numbers written in base k as a string of n 1's.
%H Michael De Vlieger, <a href="/A055129/b055129.txt">Table of n, a(n) for n = 1..11325</a> (1 <= n <= 150).
%F T(n, k) = (k^n-1)/(k-1) [with T(n, 1) = n] = T(n-1, k)+k^(n-1) = (k+1)*T(n-1, k)-k*T(n-2, k) [with T(0, k) = 0 and T(1, k) = 1].
%F From _Werner Schulte_, Aug 29 2021 and Sep 18 2021: (Start)
%F T(n,k) = 1 + k * T(n-1,k) for k > 0 and n > 1.
%F Sum_{m=2..n} T(m-1,k)/Product_{i=2..m} T(i,k) = (1 - 1/Product_{i=2..n} T(i,k))/k for k > 0 and n > 1.
%F Sum_{n > 1} T(n-1,k)/Product_{i=2..n} T(i,k) = 1/k for k > 0.
%F Sum_{i=1..n} k^(i-1) / (T(i,k) * T(i+1,k)) = T(n,k) / T(n+1,k) for k > 0 and n > 0. (End)
%e T(3,5)=31 because 111 base 5 represents 25+5+1=31.
%e 1 1 1 1 1 1 1
%e 2 3 4 5 6 7 8
%e 3 7 13 21 31 43 57
%e 4 15 40 85 156 259 400
%e 5 31 121 341 781 1555 2801
%e 6 63 364 1365 3906 9331 19608
%e 7 127 1093 5461 19531 55987 137257
%e Starting with the second column, the q-th column list the numbers that are written as 11...1 in base q. - _John Keith_, Apr 12 2021
%p A055129 := proc(n,k)
%p add(k^j,j=0..n-1) ;
%p end proc: # _R. J. Mathar_, Dec 09 2015
%t Table[FromDigits[ConstantArray[1, #], k] &[n - k + 1], {n, 11}, {k, n, 1, -1}] // Flatten (* or *)
%t Table[If[k == 1, n, (k^# - 1)/(k - 1) &[n - k + 1]], {n, 11}, {k, n, 1, -1}] // Flatten (* _Michael De Vlieger_, Dec 11 2016 *)
%Y Rows include A000012, A000027, A002061, A053698, A053699, A053700. Columns (see recurrence) include A000027, A000225, A003462, A002450, A003463, A003464, A023000, A023001, A002275, A016123, A016125. Diagonals include A023037, A031973. Numbers in the table (apart from the first column and first two rows) are ordered in A053696.
%K base,easy,nonn,tabl
%O 1,3
%A _Henry Bottomley_, Jun 14 2000