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.
%I A246561 #16 Feb 16 2023 17:01:21 %S A246561 133,51,34,6,12,21,2,172,72,0,3579,5,49,0,0,2,3890,0,593,0,689,0,1038, %T A246561 138,1,0,10927,17,7,0,13,58,4565,0,0,973,359,0,4930,0,5314,0,3,27,0,0, %U A246561 2500,106,1176,0,1326,219,506,0,0,466,8043,0,68,0,92,0,3007,1574,0,0,121,327,7049,0,7535,548,9126,0,33 %N A246561 Least number k such that k concatenated with n is a cube, or 0 if no such k exists. %C A246561 a(n) = 0 if and only if n is in A246449. %H A246561 Chai Wah Wu, <a href="/A246561/b246561.txt">Table of n, a(n) for n = 1..10000</a> %e A246561 512 is the smallest cube ending with digit 2, so a(2) = 51. %o A246561 (PARI) %o A246561 b(n)=v=[];for(k=10^(n-1),10^n,v=concat(v,k^3%10^n));v=vecsort(v,,8);v %o A246561 w=[];for(k=1,250,d=digits(k);if(vecsearch(b(#d),k),w=concat(w,k)));w=vecsort(w,,8);w; %o A246561 a(n)=if(!vecsearch(w,n),return(0));if(vecsearch(w,n),j=1;s=Str(n);while(!ispower(eval(concat(Str(j),s)),3),j++);return(j)) %o A246561 vector(200,n,a(n)) %o A246561 (Python) %o A246561 from sympy import nthroot_mod %o A246561 def A246561(n): return 0 if len(l:=nthroot_mod(n,3,(m:=10**(len(str(n)))))) == 0 else int((min(x for x in l+[d+m for d in l] if x**3>=m)**3-n)//m) # _Chai Wah Wu_, Feb 16 2023 %Y A246561 Cf. A000578, A246449, A245631. %K A246561 nonn,look,base %O A246561 1,1 %A A246561 _Derek Orr_, Aug 29 2014 %E A246561 a(27), a(29) and a(43) corrected by _Chai Wah Wu_, Feb 16 2023