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.

A252486 Smallest k such that n^6 = a_1^6+...+a_k^6 where all the a_i are positive integers less than n.

Original entry on oeis.org

64, 36, 15, 29, 22, 21, 15, 19, 15, 17, 15, 16, 14, 15, 13, 12, 11, 11, 13, 14, 12, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 13, 11, 11, 11, 10, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 9, 11, 10, 11, 11, 11, 9, 10, 11, 11, 11, 11, 10
Offset: 2

Views

Author

M. F. Hasler, Dec 17 2014

Keywords

Comments

Inspired by Fermat's Last Theorem: 2 never occurs in this sequence.
No n is known for which a(n)<7, according to the MathWorld page. The values 7, 8, 9, 10 and 11 occur first at indices 1141, 251, 54, 39, 18, cf. sequence A252476.
I conjecture that the sequence is bounded by the initial term. Probably even a(3)=36, a(5)=29, a(6)=22 and some more are followed only by smaller terms.
From results on Waring's problem, it is known that all a(n) <= A002804(6) = 73, and a(n) <= 24 for all sufficiently large n. - Robert Israel, Aug 17 2015

Crossrefs

Programs

  • Maple
    M:= 10^8:
    R:= Vector(M, 74, datatype=integer[4]):
    for p from 1 to floor(M^(1/6)) do
      p6:= p^6;
      if p > 1 then A[p]:= R[p6] fi;
      R[p6]:= 1;
      for j from p6+1 to M do
        R[j]:= min(R[j], 1+R[j - p6]);
      od
    od:
    F:= proc(n, k, ub)
       local lb, m, bestyet, res;
       if ub <= 0 then return -1 fi;
       if n <= M then
         if n = 0 then return 0
         elif R[n] > ub then return -1
         else return R[n]
         fi
       fi;
       lb:= floor(n/k^6);
       if lb > ub then return -1 fi;
       bestyet:= ub;
       for m from lb to 0 by -1 do
         res:= procname(n-m*k^6, k-1, bestyet-m);
         if res >= 0 then
           bestyet:= res+m;
         fi
       od:
       return bestyet
    end proc:
    for n from floor(M^(1/6))+1 to 50 do
       A[n]:= F(n^6, n-1, 73)
    od:
    seq(A[n], n=2..50); # Robert Israel, Aug 17 2015
  • Mathematica
    a[n_] := Module[{k}, For[k = 7, True, k++, If[IntegerPartitions[n^6, {k}, Range[n-1]^6] != {}, Print[n, " ", k]; Return[k]]]];
    Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Jul 29 2023 *)
  • PARI
    a(n,verbose=0,m=6)={N=n^m;for(k=3,64,forvec(v=vector(k-1,i,[1,n\sqrtn(k+1-i,m)]),ispower(N-sum(i=1,k-1,v[i]^m),m,&K)&&K>0&&!(verbose&&print1("/*"n" "v"*/"))&&return(k),1))}
    
  • Python
    from itertools import count
    from sympy.solvers.diophantine.diophantine import power_representation
    def A252486(n):
        m = n**6
        for k in count(2):
            try:
                next(power_representation(m,6,k))
            except:
                continue
            return k # Chai Wah Wu, Jun 25 2024

Extensions

More terms from Manfred Scheucher, Aug 15 2015
a(53)-a(66) from Giovanni Resta, Aug 17 2015