This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A319582 #20 Dec 14 2024 09:15:16 %S A319582 1,1,1,1,2,1,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,1,1,2,1,1,2, %T A319582 1,1,1,2,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1,4,1,1,1,2,1,1,1, %U A319582 1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,2,1,1,2,1,1 %N A319582 Square array T(n, k) = 2 ^ (Sum_{p prime} [v_p(n) >= v_p(k) > 0]) read by antidiagonals up, where [] is the Iverson bracket and v_p is the p-adic valuation, n >= 1, k >= 1. %C A319582 T(n, k) is the number of integers located on the sphere with center n and radius log(k), when the metric is given by log(A089913). %C A319582 T(., k) is multiplicative and k-periodic. %C A319582 T(n, .) is multiplicative and n^2-periodic. %F A319582 T(n, k) = card({x; d(n, x) = log(k)}), if d denotes log(A089913(., .)), which is a metric. %F A319582 T(n, k) = 2 ^ (Sum_{p prime} [v_p(n) >= v_p(k) > 0]). %F A319582 a(n) = 2 ^ A319581(n). %F A319582 T(n, n) = 2 ^ A001221(n) = A034444(n). %e A319582 T(60, 50) = T(2^2 * 3^1 * 5^1, 2^1 * 5^2) %e A319582 = T(2^2, 2^1) * T(3^1, 3^0) * T(5^1, 5^2) %e A319582 = 2^[2 >= 1 > 0] * 2^[1 >= 0 > 0] * 2^[1 >= 2 > 0] %e A319582 = 2^1 * 2^0 * 2^0 = 2 * 1 * 1 = 2. %e A319582 Array begins: %e A319582 k = 1 1 1 %e A319582 n 1 2 3 4 5 6 7 8 9 0 1 2 %e A319582 = ------------------------ %e A319582 1 | 1 1 1 1 1 1 1 1 1 1 1 1 %e A319582 2 | 1 2 1 1 1 2 1 1 1 2 1 1 %e A319582 3 | 1 1 2 1 1 2 1 1 1 1 1 2 %e A319582 4 | 1 2 1 2 1 2 1 1 1 2 1 2 %e A319582 5 | 1 1 1 1 2 1 1 1 1 2 1 1 %e A319582 6 | 1 2 2 1 1 4 1 1 1 2 1 2 %e A319582 7 | 1 1 1 1 1 1 2 1 1 1 1 1 %e A319582 8 | 1 2 1 2 1 2 1 2 1 2 1 2 %e A319582 9 | 1 1 2 1 1 2 1 1 2 1 1 2 %e A319582 10 | 1 2 1 1 2 2 1 1 1 4 1 1 %e A319582 11 | 1 1 1 1 1 1 1 1 1 1 2 1 %e A319582 12 | 1 2 2 2 1 4 1 1 1 2 1 4 %t A319582 F[n_] := If[n == 1, {}, FactorInteger[n]] %t A319582 V[p_] := If[KeyExistsQ[#, p], #[p], 0] & %t A319582 PreT[n_, k_] := %t A319582 Module[{fn = F[n], fk = F[k], p, an = <||>, ak = <||>, w}, %t A319582 p = Union[First /@ fn, First /@ fk]; %t A319582 (an[#[[1]]] = #[[2]]) & /@ fn; %t A319582 (ak[#[[1]]] = #[[2]]) & /@ fk; %t A319582 w = ({V[#][an], V[#][ak]}) & /@ p; %t A319582 Select[w, (#[[1]] >= #[[2]] > 0) &] %t A319582 ] %t A319582 T[n_, k_] := 2^Length[PreT[n, k]] %t A319582 A004736[n_] := Binomial[Floor[3/2 + Sqrt[2*n]], 2] - n + 1 %t A319582 A002260[n_] := n - Binomial[Floor[1/2 + Sqrt[2*n]], 2] %t A319582 a[n_] := T[A004736[n], A002260[n]] %t A319582 Table[a[n], {n, 1, 90}] %o A319582 (PARI) maxp(n) = if (n==1, 1, vecmax(factor(n)[,1])); %o A319582 T(n, k) = {pmax = max(maxp(n), maxp(k)); x = 0; forprime(p=2, pmax, if ((valuation(n, p) >= valuation(k, p)) && (valuation(k, p) > 0), x ++);); 2^x;} \\ _Michel Marcus_, Oct 28 2018 %Y A319582 Cf. A319581 (an additive variant). %Y A319582 Cf. A001221, A034444, A089913. %K A319582 nonn,tabl %O A319582 1,5 %A A319582 _Luc Rousseau_, Sep 24 2018