login
Smallest composite that is not an n-th power, but can be written as the sum of the n-th powers of two or more of its distinct prime factors.
0

%I #16 Mar 09 2017 16:44:07

%S 870,378,107827277891825604,178101,594839010,275223438741,

%T 26584448904822018,40373802,420707243066850,952809806744100

%N Smallest composite that is not an n-th power, but can be written as the sum of the n-th powers of two or more of its distinct prime factors.

%C a(2)-a(10) are given at the bottom of page 7 of DeKoninck, Luca, 2007.

%C a(12) <= 2183128876699456840262188163473698588738, a(13)=26036721925607706907290, and a(14)=297558232681902995490. _Giovanni Resta_, Mar 09 2017

%H J. M. DeKoninck and F. Luca, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Koninck/koninck71.html">Partial Sums of Powers of Prime Factors</a>, Journal of Integer Sequences, 10 (2007), Article 07.1.6.

%e For n = 2: 870 = 2 * 3 * 5 * 29 and 2^2 + 5^2 + 29^2 = 870. Since 870 is the smallest number that is not a square and can be written as the sum of squares of some of its distinct prime factors, a(2) = 870.

%o (PARI) nextrowcomb(rowarr) = my(k=#rowarr, i=0); while(rowarr[k]==1, rowarr[k]=0; i++; k--); while(rowarr[k]==0 && k > 1, k--); if(rowarr[k]==1, rowarr[k]=0; rowarr[k+1]=1; k=k+2; while(i > 0, rowarr[k]=1; k++; i--), for(x=k, k+i, rowarr[x]=1)); rowarr

%o a(n) = forcomposite(c=1, , if(!ispower(c, n), my(f=factor(c)[, 1]~, v=vector(#f)); while(1, my(s=0); for(k=1, #v, if(v[k]==1, s=s+f[k]^n)); if(s==c, return(c)); if(vecmin(v)==1, break, v=nextrowcomb(v)))))

%Y Cf. A058041, A257659.

%K nonn,hard,more

%O 2,1

%A _Felix Fröhlich_, Mar 07 2017

%E a(11) from _Giovanni Resta_, Mar 09 2017