OFFSET
1,2
COMMENTS
No leading zeros allowed.
Number of terms <= 10^k for k = 0, 1, 2, ...: 1, 5, 14, 31, 64, 144, 373, ..., . Robert G. Wilson v, Dec 27 2016
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..373 (terms 1..100 from Paolo P. Lava, terms 101..144 from Davin Park)
EXAMPLE
If n = 1 then n^3 = 1 and if we append a 6 we have sqrt(16) = 4.
If n = 2 then n^3 = 8 and if we append a 1 we have sqrt(81) = 9.
If n = 5 then n^3 = 125 and if we insert a 2 we get sqrt(1225) = 35.
Again, if n = 25 then n^3 = 15625 and we have sqrt(105625) = 325 or sqrt(156025) = 395.
MAPLE
with(numtheory): P:=proc(q) local a, b, j, k, n, ok;
for n from 1 to q do a:=n^3; b:=ilog10(a)+1; ok:=1;
for k from 0 to b do if ok=1 then for j from 0 to 9 do
if not (j=0 and k=b) then if type(sqrt(trunc(a/10^k)*10^(k+1)+j*10^k+(a mod 10^k)), integer)
then print(n); ok:=0; break; fi; fi; od; fi;
od; od; end: P(10^6);
MATHEMATICA
f[n_] := ! MissingQ@SelectFirst[Rest@Flatten[Outer[Insert[IntegerDigits[n^3], #2, #1] &, Range[IntegerLength[n^3] + 1], Range[0, 9]], 1], IntegerQ@Sqrt@FromDigits@# &];
Select[Range[100], f] (* Davin Park, Dec 28 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Nov 10 2014
EXTENSIONS
Corrected and extended by Davin Park, Dec 26 2016
Extended by Robert G. Wilson v, Dec 27 2016
STATUS
approved