OFFSET
1,1
EXAMPLE
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.
PROG
(PARI)
up_to = 78;
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];
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Apr 27 2024
STATUS
approved