login
A351961
Square array A(n,k) = A156552(gcd(A005940(1+n), A005940(1+k))), read by antidiagonals.
4
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 2, 1, 4, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 1, 6, 1, 0, 1, 2, 1, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 4, 0, 2, 0, 0
OFFSET
0,13
COMMENTS
The indices run as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc. The array is symmetric.
FORMULA
For all x, y >= 0, A(x, y) = A(x, A351960(x,y)) = A(A351960(x,y), y).
EXAMPLE
The top left corner of the array:
n= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
-----|--------------------------------------------------------------
k= 0 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1 | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
2 | 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0,
3 | 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1,
4 | 0, 0, 0, 0, 4, 0, 0, 0, 0, 4, 4, 0, 4, 0, 0, 0, 0, 0,
5 | 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 2, 5, 0, 5, 2, 1, 0, 1,
6 | 0, 0, 2, 0, 0, 2, 6, 0, 0, 0, 2, 2, 0, 6, 6, 0, 0, 0,
7 | 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 7, 0, 1,
8 | 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8,
9 | 0, 1, 0, 1, 4, 1, 0, 1, 0, 9, 4, 1, 4, 1, 0, 1, 0, 1,
10 | 0, 0, 2, 0, 4, 2, 2, 0, 0, 4, 10, 2, 4, 2, 2, 0, 0, 0,
11 | 0, 1, 2, 3, 0, 5, 2, 3, 0, 1, 2, 11, 0, 5, 2, 3, 0, 1,
12 | 0, 0, 0, 0, 4, 0, 0, 0, 0, 4, 4, 0, 12, 0, 0, 0, 0, 0,
13 | 0, 1, 2, 1, 0, 5, 6, 1, 0, 1, 2, 5, 0, 13, 6, 1, 0, 1,
14 | 0, 0, 2, 0, 0, 2, 6, 0, 0, 0, 2, 2, 0, 6, 14, 0, 0, 0,
15 | 0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1,
16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0,
17 | 0, 1, 0, 1, 0, 1, 0, 1, 8, 1, 0, 1, 0, 1, 0, 1, 0, 17,
PROG
(PARI)
up_to = 104; \\ 10439 = binomial(144+1, 2)-1
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
A351961sq(n, k) = A156552(gcd(A005940(1+n), A005940(1+k)));
A351961list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0, oo, for(col=0, a, i++; if(i > #v, return(v)); v[i] = A351961sq(col, (a-(col))))); (v); };
v351961 = A351961list(up_to);
A351961(n) = v351961[1+n];
CROSSREFS
Cf. A001477 (main diagonal).
Cf. also A341520, A351960, A351962.
Sequence in context: A297231 A056620 A316869 * A258772 A178401 A357911
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Feb 26 2022
STATUS
approved