|
|
A115862
|
|
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
|
|
|
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, 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, 5, 3, 4, 6, 3, 3, 5, 5, 1, 6, 0, 4, 5, 4, 4, 7, 3, 4, 5, 6, 2, 7, 2
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
So row 6 of the triangle is [0,2,1,2,2,2].
(And so A115863(6) = 0 + 2 + 1 + 2 + 2 + 2 = 9.)
Triangle begins:
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, 2, 2,
...
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|