cp's OEIS Frontend

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.

A336725 A(n,k) is the n-th number that is a sum of k positive k-th powers; square array A(n,k), n>=1, k>=1, read by antidiagonals.

This page as a plain text file.
%I A336725 #19 Dec 03 2020 11:49:58
%S A336725 1,2,2,3,5,3,4,10,8,4,5,19,17,10,5,6,36,34,24,13,6,7,69,67,49,29,17,7,
%T A336725 8,134,132,98,64,36,18,8,9,263,261,195,129,84,43,20,9,10,520,518,388,
%U A336725 258,160,99,55,25,10,11,1033,1031,773,515,321,247,114,62,26,11,12,2058,2056,1542,1028,642,384,278,129,66,29,12
%N A336725 A(n,k) is the n-th number that is a sum of k positive k-th powers; square array A(n,k), n>=1, k>=1, read by antidiagonals.
%H A336725 Alois P. Heinz, <a href="/A336725/b336725.txt">Antidiagonals n = 1..141, flattened</a>
%e A336725 Square array A(n,k) begins:
%e A336725    1,  2,  3,   4,   5,   6,    7,    8,    9,   10, ...
%e A336725    2,  5, 10,  19,  36,  69,  134,  263,  520, 1033, ...
%e A336725    3,  8, 17,  34,  67, 132,  261,  518, 1031, 2056, ...
%e A336725    4, 10, 24,  49,  98, 195,  388,  773, 1542, 3079, ...
%e A336725    5, 13, 29,  64, 129, 258,  515, 1028, 2053, 4102, ...
%e A336725    6, 17, 36,  84, 160, 321,  642, 1283, 2564, 5125, ...
%e A336725    7, 18, 43,  99, 247, 384,  769, 1538, 3075, 6148, ...
%e A336725    8, 20, 55, 114, 278, 734,  896, 1793, 3586, 7171, ...
%e A336725    9, 25, 62, 129, 309, 797, 2193, 2048, 4097, 8194, ...
%e A336725   10, 26, 66, 164, 340, 860, 2320, 6568, 4608, 9217, ...
%p A336725 A:= proc() local l, w, A; l, w, A:= proc() [] end, proc() [] end,
%p A336725       proc(n, k) option remember; local b; b:=
%p A336725         proc(x, y) option remember; `if`(x=0, {0}, `if`(y<1, {},
%p A336725           {b(x, y-1)[], map(t-> t+l(k)[y], b(x-1, y))[]}))
%p A336725         end;
%p A336725         while nops(w(k)) < n do forget(b);
%p A336725           l(k):= [l(k)[], (nops(l(k))+1)^k];
%p A336725           w(k):= sort([select(h-> h<l(k)[-1], b(k, nops(l(k))))[]])
%p A336725         od; w(k)[n]
%p A336725       end; A
%p A336725     end():
%p A336725 seq(seq(A(n, 1+d-n), n=1..d), d=1..12);
%t A336725 nmax = 12;
%t A336725 pow[n_, k_] := IntegerPartitions[n, {k}, Range[n^(1/k) // Ceiling]^k];
%t A336725 col[k_] := col[k] = Reap[Module[{j = k, n = 1, p}, While[n <= nmax, p = pow[j, k]; If[p =!= {}, Sow[j]; n++]; j++]]][[2, 1]];
%t A336725 A[n_, k_] := col[k][[n]];
%t A336725 Table[A[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* _Jean-François Alcover_, Dec 03 2020 *)
%Y A336725 Columns k=1-11 give: A000027, A000404, A003072, A003338, A003350, A003362, A003374, A003386, A003398, A004810, A004822.
%Y A336725 Rows n=1-3 give: A000027, A052944, A145071.
%Y A336725 Main diagonal gives A000337.
%Y A336725 Cf. A336820.
%K A336725 nonn,tabl
%O A336725 1,2
%A A336725 _Alois P. Heinz_, Aug 01 2020