login
Irregular triangle in which n-th row lists squarefree divisors (A005117) of n.
16

%I #17 Mar 06 2023 05:11:45

%S 1,1,2,1,3,1,2,1,5,1,2,3,6,1,7,1,2,1,3,1,2,5,10,1,11,1,2,3,6,1,13,1,2,

%T 7,14,1,3,5,15,1,2,1,17,1,2,3,6,1,19,1,2,5,10,1,3,7,21,1,2,11,22,1,23,

%U 1,2,3,6,1,5,1,2,13,26,1,3,1,2,7,14,1,29

%N Irregular triangle in which n-th row lists squarefree divisors (A005117) of n.

%H Reinhard Zumkeller, <a href="/A206778/b206778.txt">Rows n=1..1000 of triangle, flattened</a>

%e Triangle begins:

%e . 1: [1]

%e . 2: [1, 2]

%e . 3: [1, 3]

%e . 4: [1, 2]

%e . 5: [1, 5]

%e . 6: [1, 2, 3, 6]

%e . 7: [1, 7]

%e . 8: [1, 2]

%e . 9: [1, 3]

%e . 10: [1, 2, 5, 10]

%e . 11: [1, 11]

%e . 12: [1, 2, 3, 6].

%p A206778 := proc(n)

%p local sqdvs ,nfac,d;

%p sqdvs := {} ;

%p nfac := ifactors(n)[2] ;

%p for d in numtheory[divisors](n) do

%p if issqrfree(d) then

%p sqdvs := sqdvs union {d} ;

%p end if;

%p end do:

%p sort(sqdvs) ;

%p end proc:

%p seq(op(A206778(n)),n=1..10) ; # _R. J. Mathar_, Mar 06 2023

%t Flatten[Table[Select[Divisors[n],SquareFreeQ],{n,30}]] (* _Harvey P. Dale_, Apr 11 2012 *)

%o (Haskell)

%o a206778 n k = a206778_row n !! k

%o a206778_row = filter ((== 1) . a008966) . a027750_row

%o a206778_tabf = map a206778_row [1..]

%o _Reinhard Zumkeller_, May 03 2013, Feb 12 2012

%Y Cf. A008966, A034444 (row length), A048250 (row sums), A206787; A077610.

%Y Cf. A027750, A050320, A050326, A050328.

%K nonn,tabf

%O 1,3

%A _Reinhard Zumkeller_, Feb 12 2012