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.

Showing 1-2 of 2 results.

A336820 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.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Aug 04 2020

Keywords

Examples

			Square array A(n,k) begins:
   0,  0,  0,  0,  0,  0,   0,   0,   0,  0,  0, ...
   1,  1,  1,  1,  1,  1,   1,   1,   1,  1,  1, ...
   2,  2,  2,  2,  2,  2,   2,   2,   2,  2,  2, ...
   3,  4,  3,  3,  3,  3,   3,   3,   3,  3,  3, ...
   4,  5,  8,  4,  4,  4,   4,   4,   4,  4,  4, ...
   5,  8,  9, 16,  5,  5,   5,   5,   5,  5,  5, ...
   6,  9, 10, 17, 32,  6,   6,   6,   6,  6,  6, ...
   7, 10, 16, 18, 33, 64,   7,   7,   7,  7,  7, ...
   8, 13, 17, 19, 34, 65, 128,   8,   8,  8,  8, ...
   9, 16, 24, 32, 35, 66, 129, 256,   9,  9,  9, ...
  10, 17, 27, 33, 36, 67, 130, 257, 512, 10, 10, ...
		

Crossrefs

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

Programs

  • 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
    				
  • 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 *)

Formula

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

A140834 Primes that are the sum of at most four nonzero 4th powers.

Original entry on oeis.org

2, 3, 17, 19, 83, 97, 113, 163, 179, 257, 337, 353, 419, 499, 593, 641, 643, 673, 769, 787, 881, 883, 1153, 1297, 1409, 1459, 1553, 1889, 2003, 2083, 2131, 2417, 2579, 2593, 2609, 2657, 2659, 2689, 2819, 3169, 3217, 3697, 3779, 3889, 3907, 4099, 4129, 4177
Offset: 1

Views

Author

Jonathan Vos Post, Jul 18 2008

Keywords

Comments

This sequence was checked by T. D. Noe, who had supplied the b-list for A004833. A037896 is a subset of {Primes that are the sum of at exactly 2 nonzero 4th powers}, itself a subset of A002645 Quartan primes: primes of the form x^4 + y^4, x>0, y>0.

Crossrefs

Formula

A000040 INTERSECTION A004833. {A133740 = Primes that are the sum of at exactly 4 nonzero 4th powers} UNION {A085318 = Primes that are the sum of at exactly 3 nonzero 4th powers} UNION {A002645 = Primes that are the sum of at exactly 2 nonzero 4th powers}.

Extensions

Missing term 353 inserted by Georg Fischer, May 11 2024
Showing 1-2 of 2 results.