login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Square array read by downward antidiagonals: A(n, k) is the k-th Niven number (or Harshad number) in base n.
0

%I #14 Sep 10 2019 21:49:29

%S 1,2,1,4,2,1,6,3,2,1,8,4,3,2,1,10,6,4,3,2,1,12,8,6,4,3,2,1,16,9,8,5,4,

%T 3,2,1,18,10,9,6,5,4,3,2,1,20,12,12,8,6,5,4,3,2,1,21,15,16,10,10,6,5,

%U 4,3,2,1,24,16,18,12,12,7,6,5,4,3,2,1,32,18

%N Square array read by downward antidiagonals: A(n, k) is the k-th Niven number (or Harshad number) in base n.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Harshad_number">Harshad number</a>

%e The array starts as follows:

%e 1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 21, 24, 32, 34, 36, 40, 42, 48, 55, 60

%e 1, 2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32

%e 1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 20, 21, 24, 28, 30, 32, 33, 35, 36, 40

%e 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 18, 20, 24, 25, 26, 27, 28, 30, 32

%e 1, 2, 3, 4, 5, 6, 10, 12, 15, 18, 20, 24, 25, 30, 36, 40, 42, 44, 45, 48

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 18, 21, 24, 27, 28, 30, 32

%e 1, 2, 3, 4, 5, 6, 7, 8, 14, 16, 21, 24, 28, 32, 35, 40, 42, 48, 49, 56

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 18, 20, 24, 27, 28, 30, 32, 36

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 20, 22, 24, 25, 30, 33, 35

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 22, 24, 33, 36, 44, 48, 55, 60

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 24, 26, 27

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 26, 28, 39, 42, 52, 56

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21, 28, 30, 32

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 30, 32

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 24

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 34, 36

%o (PARI) row(n, terms) = my(i=0); for(x=1, oo, if(i >= terms, break); if(x%sumdigits(x, n)==0, print1(x, ", "); i++))

%o array(rows, cols) = for(x=2, rows+1, row(x, cols); print(""))

%o array(18, 20) \\ Print initial 18 rows and 20 columns of array

%Y Cf. A049445 (row 2), A064150 (row 3), A064438 (row 4), A064481 (row 5), A245802 (row 8), A005349 (row 10).

%Y Cf. A005349.

%K nonn,tabl,base,easy

%O 2,2

%A _Felix Fröhlich_, Sep 06 2019