login
Irregular triangle read by rows in which row n lists the proper divisors of n (those divisors of n which are < n), with the first row {1} by convention.
61

%I #40 Apr 28 2020 07:16:53

%S 1,1,1,1,2,1,1,2,3,1,1,2,4,1,3,1,2,5,1,1,2,3,4,6,1,1,2,7,1,3,5,1,2,4,

%T 8,1,1,2,3,6,9,1,1,2,4,5,10,1,3,7,1,2,11,1,1,2,3,4,6,8,12,1,5,1,2,13,

%U 1,3,9,1,2,4,7,14,1,1,2,3,5,6,10,15,1,1,2,4,8,16,1,3,11,1,2,17,1,5,7,1,2,3,4,6,9,12,18

%N Irregular triangle read by rows in which row n lists the proper divisors of n (those divisors of n which are < n), with the first row {1} by convention.

%C Or, take the list 1,2,3,4,... of natural numbers (A000027) and replace each number by its proper divisors.

%C The row length is 1 for n = 1 and A032741(n) for n >= 2. - _Wolfdieter Lang_, Jan 16 2016

%H Alois P. Heinz, <a href="/A027751/b027751.txt">Rows n = 1..1540, flattened</a>

%e The irregular triangle T(n,k) begins:

%e n\k 1 2 3 4 5 ...

%e 1: 1 (by convention)

%e 2: 1

%e 3: 1

%e 4: 1 2

%e 5: 1

%e 6: 1 2 3

%e 7: 1

%e 8: 1 2 4

%e 9: 1 3

%e 10: 1 2 5

%e 11: 1

%e 12: 1 2 3 4 6

%e 13: 1

%e 14: 1 2 7

%e 15: 1 3 5

%e 16: 1 2 4 8

%e 17: 1

%e 18: 1 2 3 6 9

%e 19: 1

%e 20: 1 2 4 5 10

%e .... reformatted - _Wolfdieter Lang_, Jan 16 2016

%p with(numtheory):

%p T:= n-> sort([(divisors(n) minus {n})[]])[]: T(1):=1:

%p seq(T(n), n=1..50); # _Alois P. Heinz_, Apr 11 2012

%t Table[ Divisors[n] // Most, {n, 1, 36}] // Flatten // Prepend[#, 1] & (* _Jean-François Alcover_, Jun 10 2013 *)

%o (Haskell)

%o a027751 n k = a027751_tabf !! (n-1) !! (k-1)

%o a027751_row n = a027751_tabf !! (n-1)

%o a027751_tabf = [1] : map init (tail a027750_tabf)

%o -- _Reinhard Zumkeller_, Apr 18 2012

%o (Python)

%o from sympy import divisors

%o def a(n): return [1] if n==1 else divisors(n)[:-1]

%o for n in range(21): print(a(n)) # _Indranil Ghosh_, Apr 30 2017

%o (PARI) row(n) = if (n==1, [1], my(d = divisors(n)); vector(#d-1,k, d[k])); \\ _Michel Marcus_, Apr 30 2017

%Y Cf. A027750, A032741 (row lengths), A001065, A000005.

%Y Row sums give A173455. - _Omar E. Pol_, Nov 23 2010

%K nonn,easy,tabf

%O 1,5

%A _N. J. A. Sloane_.

%E More terms from _Patrick De Geest_, May 15 1998

%E Example edited by _Omar E. Pol_, Nov 23 2010