The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A248051 Numbers whose cubes become squares if some digit is prepended, inserted or appended. 2

%I #78 Mar 03 2019 01:54:26

%S 1,2,5,6,10,25,30,40,41,60,84,90,96,100,121,129,160,169,200,201,250,

%T 266,360,400,490,500,600,640,724,810,1000,1025,1210,1440,1690,1960,

%U 2250,2500,2560,2890,3000,3240,3604,3610,4000,4100,4410,4840,5216,5290,5760

%N Numbers whose cubes become squares if some digit is prepended, inserted or appended.

%C Number of terms <= 10^k for k = 0, 1, 2, ...: 1, 5, 14, 31, 64, 144, 373, ..., . _Robert G. Wilson v_, Dec 27 2016

%H Robert G. Wilson v, <a href="/A248051/b248051.txt">Table of n, a(n) for n = 1..373</a> (terms 1..100 from Paolo P. Lava, terms 101..144 from Davin Park)

%e If n = 1 then n^3 = 1 and if we append a 6 we have sqrt(16) = 4.

%e If n = 2 then n^3 = 8 and if we append a 1 we have sqrt(81) = 9.

%e If n = 5 then n^3 = 125 and if we insert a 2 we get sqrt(1225) = 35.

%e Again, if n = 25 then n^3 = 15625 and we have sqrt(105625) = 325 or sqrt(156025) = 395.

%p with(numtheory): P:=proc(q) local a,b,j,k,n,ok;

%p for n from 1 to q do a:=n^3; b:=ilog10(a)+1; ok:=1;

%p for k from 0 to b do if ok=1 then for j from 0 to 9 do

%p 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)

%p then print(n); ok:=0; break; fi; fi; od; fi;

%p od; od; end: P(10^6);

%t 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@# &];

%t Select[Range[100], f] (* _Davin Park_, Dec 28 2016 *)

%Y Cf. A248127, A249853.

%K nonn,base

%O 1,2

%A _Paolo P. Lava_, Nov 10 2014

%E Corrected and extended by _Davin Park_, Dec 26 2016

%E Extended by _Robert G. Wilson v_, Dec 27 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 1 05:26 EST 2024. Contains 370430 sequences. (Running on oeis4.)