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.

A004881 Numbers that are the sum of at most 8 nonzero 8th powers.

This page as a plain text file.
%I A004881 #17 Aug 04 2020 21:53:30
%S A004881 0,1,2,3,4,5,6,7,8,256,257,258,259,260,261,262,263,512,513,514,515,
%T A004881 516,517,518,768,769,770,771,772,773,1024,1025,1026,1027,1028,1280,
%U A004881 1281,1282,1283,1536,1537,1538,1792,1793,2048,6561,6562,6563,6564,6565,6566
%N A004881 Numbers that are the sum of at most 8 nonzero 8th powers.
%H A004881 Alois P. Heinz, <a href="/A004881/b004881.txt">Table of n, a(n) for n = 1..10000</a>
%p A004881 b:= proc(n, i, t) option remember; n=0 or i>0 and t>0
%p A004881       and (b(n, i-1, t) or i^8<=n and b(n-i^8, i, t-1))
%p A004881     end:
%p A004881 a:= proc(n) option remember; local k;
%p A004881       for k from 1+ `if`(n=1, -1, a(n-1))
%p A004881       while not b(k, iroot(k, 8), 8) do od; k
%p A004881     end:
%p A004881 seq(a(n), n=1..60);  # _Alois P. Heinz_, Sep 16 2016
%t A004881 b[n_, i_, t_] := b[n, i, t] = n == 0 || i > 0 && t > 0 && (b[n, i - 1, t] || i^8 <= n && b[n - i^8, i, t - 1]);
%t A004881 a[n_] := a[n] = (For[k = 1 + If[n == 1, -1, a[n - 1]], !b[k, k^(1/8) // Floor, 8], k++]; k);
%t A004881 Array[a, 60] (* _Jean-François Alcover_, Apr 06 2017, after _Alois P. Heinz_ *)
%Y A004881 Column k=8 of A336820.
%K A004881 nonn
%O A004881 1,3
%A A004881 _N. J. A. Sloane_
%E A004881 More terms from _Alois P. Heinz_, Sep 16 2016