A372285 Array read by upward antidiagonals: A(n,k) is the number of terms of A086893 in the interval [b(n, k), b(n+1, k)], n,k >= 1, where b = A372282.
5, 9, 4, 17, 9, 7, 33, 17, 13, 2, 65, 33, 25, 5, 4, 129, 65, 49, 10, 6, 3, 257, 129, 97, 22, 13, 6, 6, 513, 257, 193, 45, 26, 14, 13, 3, 1025, 513, 385, 89, 54, 29, 25, 4, 4, 2049, 1025, 769, 177, 109, 57, 49, 9, 10, 3, 4097, 2049, 1537, 353, 217, 113, 97, 22, 21, 6, 9, 8193, 4097, 3073, 705, 433, 225, 193, 45, 41, 13, 17, 2
Offset: 1
Examples
Array begins: n\k| 1 2 3 4 5 6 7 8 9 10 11 ---+---------------------------------------------------------------------- 1 | 5, 4, 7, 2, 4, 3, 6, 3, 4, 3, 9, 2 | 9, 9, 13, 5, 6, 6, 13, 4, 10, 6, 17, 3 | 17, 17, 25, 10, 13, 14, 25, 9, 21, 13, 33, 4 | 33, 33, 49, 22, 26, 29, 49, 22, 41, 26, 65, 5 | 65, 65, 97, 45, 54, 57, 97, 45, 81, 54, 129, 6 | 129, 129, 193, 89, 109, 113, 193, 89, 161, 109, 257, 7 | 257, 257, 385, 177, 217, 225, 385, 177, 321, 217, 513, 8 | 513, 513, 769, 353, 433, 449, 769, 353, 641, 433, 1025, 9 | 1025, 1025, 1537, 705, 865, 897, 1537, 705, 1281, 865, 2049, 10 | 2049, 2049, 3073, 1409, 1729, 1793, 3073, 1409, 2561, 1729, 4097, 11 | 4097, 4097, 6145, 2817, 3457, 3585, 6145, 2817, 5121, 3457, 8193, 12 | 8193, 8193, 12289, 5633, 6913, 7169, 12289, 5633, 10241, 6913, 16385, etc. The count includes also the starting and/or ending point, if either of them is a term of A086893. For example, when going from A372282(2,1) = 21 to A372282(3,1) = 5461, we count terms A086893(5..13) = [21, 53, 85, 213, 341, 853, 1365, 3413, 5461], nine in total, therefore A(2,1) = 9. When going from A371102(1,8) = 15 to A371102(2,8) = 93, we count terms 21, 53, 85 of A086893 in the interval [15, 93], therefore A(1,8) = 3.
Programs
-
PARI
up_to = 78; A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3); \\ From A086893 A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); }; A372282sq(n,k) = if(1==n,2*k-1,A371094(A372282sq(n-1,k))); A372286(n) = { my(u=A371094(n), k1); for(i=1,oo,if(A086893(i)>=n,k1=i-1; break)); for(i=k1,oo,if(A086893(i)>u,return(i-k1-1))); }; A372285sq(n,k) = A372286(A372282sq(n,k)); A372285list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372285sq((a-(col-1)),col))); (v); }; v372285 = A372285list(up_to); A372285(n) = v372285[n];
Comments