login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Square array A(n,k) = A156552(A005940(1+n) + A005940(1+k)), read by antidiagonals.
5

%I #7 Feb 27 2022 22:24:35

%S 1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,8,8,8,8,8,8,9,7,7,7,7,7,9,6,16,6,6,6,6,

%T 16,6,7,9,11,9,9,9,11,9,7,16,6,16,32,16,16,32,16,6,16,15,11,9,11,17,

%U 11,17,11,9,11,15,32,64,32,16,32,10,10,32,16,32,64,32,65,17,13,17,11,17,13,17,11,17,13,17,65

%N Square array A(n,k) = A156552(A005940(1+n) + A005940(1+k)), read by antidiagonals.

%C 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.

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%e The top left corner of the array:

%e |n= 0 1 2 3 4 5 6 7 8 9 10 11 12

%e -----+--------------------------------------------------------------------------

%e k= 0 | 1, 2, 3, 4, 5, 8, 9, 6, 7, 16, 15, 32, 65,

%e 1 | 2, 3, 4, 5, 8, 7, 16, 9, 6, 11, 64, 17, 14,

%e 2 | 3, 4, 5, 8, 7, 6, 11, 16, 9, 32, 13, 10, 35,

%e 3 | 4, 5, 8, 7, 6, 9, 32, 11, 16, 17, 128, 15, 512,

%e 4 | 5, 8, 7, 6, 9, 16, 17, 32, 11, 10, 19, 64, 21,

%e 5 | 8, 7, 6, 9, 16, 11, 10, 17, 32, 15, 18, 13, 1024,

%e 6 | 9, 16, 11, 32, 17, 10, 13, 64, 15, 128, 23, 18, 129,

%e 7 | 6, 9, 16, 11, 32, 17, 64, 15, 10, 13, 256, 19, 34,

%e 8 | 7, 6, 9, 16, 11, 32, 15, 10, 17, 64, 33, 128, 31,

%e 9 | 16, 11, 32, 17, 10, 15, 128, 13, 64, 19, 12, 33, 20,

%e 10 | 15, 64, 13, 128, 19, 18, 23, 256, 33, 12, 21, 14, 39,

%e 11 | 32, 17, 10, 15, 64, 13, 18, 19, 128, 33, 14, 23, 2048,

%e 12 | 65, 14, 35, 512, 21, 1024, 129, 34, 31, 20, 39, 2048, 25,

%e 13 | 128, 19, 18, 33, 256, 23, 14, 65, 12, 35, 34, 21, 8192,

%e 14 | 35, 512, 21, 1024, 31, 34, 27, 20, 129, 2048, 37, 66, 131,

%e 15 | 64, 13, 128, 19, 18, 33, 12, 23, 256, 65, 1024, 35, 4096,

%e 16 | 11, 32, 17, 10, 15, 64, 19, 128, 13, 18, 65, 256, 27,

%o (PARI)

%o up_to = 104;

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };

%o 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 };

%o A351960sq(n,k) = A156552(A005940(1+n)+A005940(1+k));

%o A351960list(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] = A351960sq(col,(a-(col))))); (v); };

%o v351960 = A351960list(up_to);

%o A351960(n) = v351960[1+n];

%Y Cf. A005940, A156552.

%Y Cf. A005408 (main diagonal), A297163 (row/column 0).

%Y Cf. also A341510, A341520, A351961, A351962.

%K nonn,tabl

%O 0,2

%A _Antti Karttunen_, Feb 26 2022