login
A391260
Square array A(n,k): Index of the product of Stern polynomials B(n,x) and B(k,x) among the Stern polynomials, or 0 if the product is not a Stern polynomial (see A125184).
18
1, 2, 2, 3, 4, 3, 4, 6, 6, 4, 5, 8, 9, 8, 5, 6, 10, 12, 12, 10, 6, 7, 12, 0, 16, 0, 12, 7, 8, 14, 18, 20, 20, 18, 14, 8, 9, 16, 0, 24, 0, 24, 0, 16, 9, 10, 18, 24, 28, 0, 0, 28, 24, 18, 10, 11, 20, 27, 32, 35, 36, 35, 32, 27, 20, 11, 12, 22, 0, 36, 40, 0, 0, 40, 36, 0, 22, 12, 13, 24, 0, 40, 45, 48, 49, 48, 45, 40, 0, 24, 13
OFFSET
1,2
COMMENTS
The array is symmetric and is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
It A(n, k) is not 0, then it is n*k, because A048675(A297845(n, k)) = A048675(n) * A048675(k), and A048675(A260443(n)) = n. [For the first part, see Peter Munn's comments in A297845]
FORMULA
A(n, k) = A277333(A391259(n, k)) = A277333(A297845(A260443(n), A260443(k))).
If A389449(A391259(n, k)) = 0 [i.e., if A391259(n, k) is not one of the terms of A260443], then A(n, k) = 0, otherwise A(n, k) = A048675(A391259(n, k)), which then reduces to A003991(n, k) = n*k. [See comments]
EXAMPLE
The top left corner of the array:
n\k | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
----+--------------------------------------------------------------------------
1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
2 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32,
3 | 3, 6, 9, 12, 0, 18, 0, 24, 27, 0, 0, 36, 39, 0, 0, 48,
4 | 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64,
5 | 5, 10, 0, 20, 0, 0, 35, 40, 45, 0, 0, 0, 0, 70, 0, 80,
6 | 6, 12, 18, 24, 0, 36, 0, 48, 54, 0, 0, 72, 78, 0, 0, 96,
7 | 7, 14, 0, 28, 35, 0, 49, 56, 0, 70, 0, 0, 0, 98, 0, 112,
8 | 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128,
9 | 9, 18, 27, 36, 45, 54, 0, 72, 0, 90, 0, 108, 0, 0, 135, 144,
10 | 10, 20, 0, 40, 0, 0, 70, 80, 90, 0, 0, 0, 0, 140, 0, 160,
11 | 11, 22, 0, 44, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 176,
12 | 12, 24, 36, 48, 0, 72, 0, 96, 108, 0, 0, 144, 156, 0, 0, 192,
13 | 13, 26, 39, 52, 0, 78, 0, 104, 0, 0, 0, 156, 0, 0, 195, 208,
14 | 14, 28, 0, 56, 70, 0, 98, 112, 0, 140, 0, 0, 0, 196, 0, 224,
15 | 15, 30, 0, 60, 0, 0, 0, 120, 135, 0, 0, 0, 195, 0, 225, 240,
16 | 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256,
.
From the example given in A391259 we know that A391259(3, 5) = A391259(5, 3) = 1350, but as 1350 is not in A260442, here we have A(3, 5) = A(5, 3) = 0.
PROG
(PARI)
up_to = 105;
memo_for_ps = Map();
ps(n) = if(n<2, n, my(v); if(mapisdefined(memo_for_ps, n, &v), v, v = if(n%2, ps(n\2)+ps(n\2+1), 'x*ps(n\2)); mapput(memo_for_ps, n, v); (v)));
p2r(p) = { my(v=Vecrev(Vec(p))); prod(i=1, #v, prime(i)^v[i]); };
A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(1+f[i, 1])); factorback(f); };
A260443(n) = if(n<2, n+1, if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n\2))));
A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1]));
A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
A389449(n) = ((1==n) || isprime(n) || ((omega(n) == 1+(A061395(n)-A055396(n))) && (A260443(A048675(n)) == n))); \\ Somewhat optimized.
A391260sq(n, k) = { my(w=p2r(ps(n)*ps(k))); if(A389449(w), A048675(w), 0); };
A391260list(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] = A391260sq((a-(col-1)), col))); (v); };
v391260 = A391260list(up_to);
A391260(n) = v391260[n];
CROSSREFS
Cf. A391249 (main diagonal), A391250.
Cf. A391239 (how many times n occurs in this array), A391241 (numbers that occur exactly twice, on the edges), A391242 (numbers that occur more than twice, i.e., not only on edges), A391243 (odd terms of A391242), A391256 (semiprimes in A391242).
Cf. A391338 / A391339 (positions of nonzeros / zeros on row 3 of the array).
Cf. A391348 / A391349 (positions of nonzeros / zeros on row 5 of the array).
Sequence in context: A091257 A216622 A319840 * A368310 A003991 A131923
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Dec 04 2025
STATUS
approved