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.

A245631 Least number k such that n concatenated with k produces a cube.

Original entry on oeis.org

25, 7, 43, 913, 12, 4, 29, 5184, 261, 648, 7649, 5, 31, 8877, 625, 6375, 28, 5193, 683, 5379, 6, 6981, 8328, 389, 15456, 2144, 44, 7496, 791, 48625, 4432, 768, 75, 3, 937, 52264, 3248, 9017, 304, 96, 73281, 875, 8976, 10944, 6533, 656, 4552, 26809, 13, 653, 2, 68024, 1441, 872, 1368, 39752, 1787, 32, 319
Offset: 1

Views

Author

Derek Orr, Jul 27 2014

Keywords

Examples

			20, 21, 22, 23, 24, 25, and 26 are not cubes. 27 is a cube. Thus a(2) = 7.
		

Crossrefs

Cf. A071176.

Programs

  • Mathematica
    lnc[n_]:=Module[{k=1},While[!IntegerQ[Surd[n*10^IntegerLength[k]+k,3]],k++];k]; Array[lnc,60] (* Harvey P. Dale, Aug 08 2019 *)
  • PARI
    a(n)=p="";for(k=0,10^6,p=concat(Str(n),Str(k));if(ispower(eval(p))&&ispower(eval(p))%3==0,return(k)))
    n=1;while(n<100,print1(a(n),", ");n++)
    
  • Python
    from sympy import integer_nthroot
    def A245631(n):
        m = 10*n
        if integer_nthroot(m,3)[1]: return 0
        a = 1
        while (k:=(integer_nthroot(a*(m+1)-1,3)[0]+1)**3-m*a)>=10*a:
            a *= 10
        return k # Chai Wah Wu, Feb 15 2023