login
Triangle where a(1,1)=0; a(n,m) is number of terms among the first (n-1) terms of A115863 that are not coprime to m. A115863(n) is the sum of the terms of the n-th row of A115862.
2

%I #15 Sep 06 2019 17:15:56

%S 0,0,1,0,1,1,0,2,1,2,0,2,1,2,2,0,2,1,2,2,2,0,2,2,2,2,3,2,0,2,2,2,2,3,

%T 2,2,0,2,3,2,3,4,2,2,3,0,2,4,2,3,5,3,2,4,4,0,2,4,2,3,5,3,2,4,4,1,0,3,

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

%N Triangle where a(1,1)=0; a(n,m) is number of terms among the first (n-1) terms of A115863 that are not coprime to m. A115863(n) is the sum of the terms of the n-th row of A115862.

%C If a(1,1) were instead 1, then row 2 would be [0,0] and the rest of the triangle would be the same as when a(1,1) = 0. For our purposes, 0 is considered to be coprime only with 1.

%e The first 5 terms of A115863 are 0,1,2,5 and 7. Among these terms 0 are not coprime with 1, 2 are not coprime with 2, 1 is not coprime with 3, 2 are not coprime with 4, 2 are not coprime with 5 and 2 are not coprime with 6.

%e So row 6 of the triangle is [0,2,1,2,2,2].

%e (And so A115863(6) = 0 + 2 + 1 + 2 + 2 + 2 = 9.)

%e Triangle begins:

%e 0,

%e 0, 1,

%e 0, 1, 1,

%e 0, 2, 1, 2,

%e 0, 2, 1, 2, 2,

%e 0, 2, 1, 2, 2, 2,

%e 0, 2, 2, 2, 2, 3, 2,

%e 0, 2, 2, 2, 2, 3, 2, 2,

%e ...

%o (PARI) tabl(nn) = {my(row = vector(1), v = vector(nn)); row[1] = 0; print(row); for (n=1, nn, v[n] = vecsum(row); row = vector(n+1, k, #select(x->(gcd(x, k)!=1), vector(n, k, v[k]))); print(row););} \\ _Michel Marcus_, Sep 06 2019

%Y Cf. A115863, A115758.

%K nonn,tabl

%O 1,8

%A _Leroy Quet_, Feb 01 2006

%E More terms from _Michel Marcus_, Sep 06 2019