[go: up one dir, main page]

login
Revision History for A336820 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
A(n,k) is the n-th number that is a sum of at most k positive k-th powers; square array A(n,k), n>=1, k>=1, read by antidiagonals.
(history; published version)
#16 by Alois P. Heinz at Thu Dec 03 07:37:12 EST 2020
STATUS

proposed

approved

#15 by Jean-François Alcover at Thu Dec 03 04:50:41 EST 2020
STATUS

editing

proposed

#14 by Jean-François Alcover at Thu Dec 03 04:50:35 EST 2020
MATHEMATICA

b[n_, k_, i_, t_] := b[n, k, i, t] = n == 0 || i > 0 && t > 0 && (b[n, k, i - 1, t] || i^k <= n && b[n - i^k, k, i, t - 1]);

A[n_, k_] := A[n, k] = Module[{m}, For[m = 1 + If[n == 1, -1, A[n - 1, k]], !b[m, k, m^(1/k) // Floor, k], m++]; m];

Table[A[n, 1+d-n], {d, 1, 14}, {n, 1, d}] // Flatten (* Jean-François Alcover, Dec 03 2020, using Alois P. Heinz's code for columns *)

STATUS

approved

editing

#13 by Alois P. Heinz at Tue Aug 04 21:51:27 EDT 2020
STATUS

editing

approved

#12 by Alois P. Heinz at Tue Aug 04 21:50:43 EDT 2020
LINKS

Alois P. Heinz, <a href="/A336820/b336820.txt">Table of n, a(n) for Antidiagonals n = 1..10011141, flattened</a>

#11 by Alois P. Heinz at Tue Aug 04 21:50:07 EDT 2020
LINKS

Alois P. Heinz, <a href="/A336820/b336820.txt">Table of n, a(n) for n = 1..10011</a>

#10 by Alois P. Heinz at Tue Aug 04 18:56:58 EDT 2020
CROSSREFS

A(n+j,n) for j=0-3 give: A001477(n-1), A000027, A000079, A000051.

#9 by Alois P. Heinz at Tue Aug 04 18:50:42 EDT 2020
FORMULA

A(n,k) = n-1 for n <= k+1.

#8 by Alois P. Heinz at Tue Aug 04 18:41:42 EDT 2020
EXAMPLE

Square array A(n,k) begins:

MAPLE

A:= proc() local l, w, A; l, w, A:= proc() [] end, proc() [] end,

proc(n, k) option remember; local b; b:=

proc(x, y) option remember; `if`(x<0 or y<1, {},

{0, b(x, y-1)[], map(t-> t+l(k)[y], b(x-1, y))[]})

end;

while nops(w(k)) < n do forget(b);

l(k):= [l(k)[], (nops(l(k))+1)^k];

w(k):= sort([select(h-> h<l(k)[-1], b(k, nops(l(k))))[]])

od; w(k)[n]

end; A

end():

seq(seq(A(n, 1+d-n), n=1..d), d=1..14);

#7 by Alois P. Heinz at Tue Aug 04 18:40:32 EDT 2020
DATA

0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 4, 4, 0, 1, 2, 3, 5, 5, 0, 1, 2, 3, 8, 8, 6, 0, 1, 2, 3, 4, 9, 9, 7, 0, 1, 2, 3, 4, 16, 10, 10, 8, 0, 1, 2, 3, 4, 5, 17, 16, 13, 9, 0, 1, 2, 3, 4, 5, 32, 18, 17, 16, 10, 0, 1, 2, 3, 4, 5, 6, 33, 19, 24, 17, 11, 0, 1, 2, 3, 4, 5, 6, 64, 34, 32, 27, 18, 12

OFFSET

1,16