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.

A374256 a(n) is the smallest number which can be represented as the sum of n distinct positive n-th powers in exactly 2 ways, or -1 if no such number exists.

This page as a plain text file.
%I A374256 #14 Jul 02 2024 02:12:56
%S A374256 -1,65,1009,6834,1158224,19198660,1518471174,301963223843,
%T A374256 14599274102522,1601155487573222
%N A374256 a(n) is the smallest number which can be represented as the sum of n distinct positive n-th powers in exactly 2 ways, or -1 if no such number exists.
%e A374256 a(2) = 65 = 1^2 + 8^2 = 4^2 + 7^2.
%e A374256 a(3) = 1009 = 1^3 + 2^3 + 10^3 = 4^3 + 6^3 + 9^3.
%p A374256 f:= proc(n) uses priqueue;
%p A374256   local pq,w,t,g,i,count,newt;
%p A374256   g:= proc(t) local i; [-add((t[i]+i)^n,i=1..n),op(t)] end proc;
%p A374256   w:= [0$(n+1)];
%p A374256   initialize(pq);
%p A374256   insert(g([0$n]),pq);
%p A374256   do
%p A374256     t:= extract(pq);
%p A374256     if t[1] = w[1] then return -t[1] fi;
%p A374256     w:= t;
%p A374256     for i from 2 to n+1 do
%p A374256         if t[i]=t[-1] then
%p A374256           newt:= g(t[2..-1] + [0$(i-2),1$(n+2-i)]);
%p A374256         insert(newt,pq);
%p A374256   fi od od;
%p A374256 end proc:
%p A374256 -1, seq(f(n),n=2..10); # _Robert Israel_, Jul 01 2024
%Y A374256 Cf. A025303, A025400, A091414, A146756, A374226, A374257.
%K A374256 sign,more
%O A374256 1,2
%A A374256 _Ilya Gutkovskiy_, Jul 01 2024
%E A374256 a(9)-a(10) from _Robert Israel_, Jul 01 2024