login
Triangle where a(1,1)=0. a(n,m) = number of terms among first (n-1) terms of sequence A115759 which are coprime to m. A115759(n) is the sum of terms in the n-th row of triangle A115758.
4

%I #21 Sep 29 2017 21:29:20

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

%T 3,3,8,3,7,3,7,3,4,3,7,9,4,7,4,7,3,5,4,7,3,10,5,8,5,8,4,6,5,8,4,9,11,

%U 5,8,5,9,4,7,5,8,4,10,4,12,5,9,5,9,4,8,5,9,4,11,4,11,13,5,9,5,10,4,9,5,9,4

%N Triangle where a(1,1)=0. a(n,m) = number of terms among first (n-1) terms of sequence A115759 which are coprime to m. A115759(n) is the sum of terms in the n-th row of triangle A115758.

%C 0 is considered here to be coprime only to 1.

%H Michael De Vlieger, <a href="/A115758/b115758.txt">Table of n, a(n) for n = 1..11325</a> (rows 1 <= n <= 150; first 5151 terms from Diana L. Mecum)

%e The first 4 terms of sequence A115759 are 0, 1, 4 and 7.

%e Among these there are 4 terms coprime to 1, 2 terms coprime to 2, 3 terms coprime to 3, 2 terms coprime to 4 and 3 terms coprime to 5.

%e So row 5 of the triangle is [4,2,3,2,3].

%e (And so A115759(5) = 4+2+3+2+3 = 14.)

%e From _Michael De Vlieger_, Sep 29 2017: (Start)

%e First 12 rows of triangle:

%e 0

%e 1 0

%e 2 1 1

%e 3 1 2 1

%e 4 2 3 2 3

%e 5 2 4 2 4 2

%e 6 3 5 3 5 3 3

%e 7 3 6 3 6 3 3 3

%e 8 3 7 3 7 3 4 3 7

%e 9 4 7 4 7 3 5 4 7 3

%e 10 5 8 5 8 4 6 5 8 4 9

%e 11 5 8 5 9 4 7 5 8 4 10 4

%e (End)

%t Fold[{Append[#1, #3], Append[#2, Total@ #3]} & @@ {First@ #1, Last@ #1, Map[Function[m, Count[Last@ #1, k_ /; CoprimeQ[m, k]]], Range@ #2]} &, {{{0}}, {0}}, Range[2, 12]] // First // Flatten (* _Michael De Vlieger_, Sep 29 2017 *)

%Y Cf. A115756, A115759.

%K nonn,tabl,look

%O 1,4

%A _Leroy Quet_, Jan 30 2006

%E a(22) and beyond from _Diana L. Mecum_, Aug 11 2008