OFFSET
1,1
COMMENTS
Sequence and program were provided by Ralf Stephan Aug 28 2003.
Comment from David W. Wilson, Jan 05 2009: I believe there is an algorithm for solving x^3 - y^2 = k, which should have a finite number of solutions for any k. That means that we should in principle be able to compute this sequence.
Up to the initial 0 in A165288, these two sequences appear to be the same, but according to its current definition, A165288 should be the same as the (different) sequence A229618 = the range of the sequence A181138 (= least k>0 such that n^2+k is a cube): If n^2+k=y^3 is the smallest cube above n^2, then n^2 is not necessarily the largest square below y^3. E.g., 18 is in A181138 and A229618, since 9+18=27 is the least cube above 9=3^2, but 25=5^2 is the largest square below 27. - M. F. Hasler, Oct 05 2013
REFERENCES
See under A081121.
EXAMPLE
a(1)=2 because the next smaller square below 3^3=27 is 5^2=25.
PROG
(PARI) v=vector(200):for(n=2, 10^7, t=n^3:s=sqrtint(t)^2: if(s==t, s=sqrtint(t-1)^2):tt=t-s: if(tt>0&&tt<=200&&!v[tt], v[tt]=n)):for(k=1, 200, if(v[k], print1(k", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Sep 18 2003
STATUS
approved