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.

Showing 1-3 of 3 results.

A245096 Numbers whose squares become cubes if one of their digits is deleted.

Original entry on oeis.org

4, 9, 10, 20, 30, 35, 46, 54, 96, 100, 200, 300, 325, 395, 411, 520, 800, 1000, 1470, 2000, 2448, 2700, 3000, 3144, 4000, 4209, 4633, 6400, 6947, 9000, 9051, 10000, 12500, 13719, 20000, 21600, 25300, 30000, 34300, 35000, 46000, 51200, 54000, 61632, 72900, 96000
Offset: 1

Views

Author

Paolo P. Lava, Nov 12 2014

Keywords

Comments

A249853 gives the numbers whose cubes become squares if one of their digits is deleted.
Numbers with single-digit squares are not included. - Davin Park, Dec 30 2016

Examples

			4^2 = 16 and (1)^1/3 = 1.
9^2 = 81 and (8)^1/3 = 2 or (1)^1/3 = 1.
10^2 = 100 and (00)^1/3 = 0.
3144^2 = 9884736 and (884736)^1/3 = 96.
		

Crossrefs

Cf. A249853.

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n;
    for n from 4 to q do a:=n^2; for k from 0 to ilog10(a) do
    b:=trunc(a/10^(k+1))*10^k+(a mod 10^k);
    if b=trunc(evalf((b)^(1/h)))^h then print(n);
    break; fi; od; od; end: P(10^9,3);
  • Mathematica
    f[n_] := !MissingQ@SelectFirst[Delete[IntegerDigits[n^2], #] & /@ Range[IntegerLength[n^2]], IntegerQ@CubeRoot@FromDigits@# &];
    Select[Range[4, 1000], f] (* Davin Park, Dec 30 2016 *)
    scddQ[x_]:=AnyTrue[Table[FromDigits[Delete[IntegerDigits[x^2],n]],{n, IntegerLength[ x^2]}],IntegerQ[CubeRoot[#]]&]; Select[Range[100000], scddQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 02 2018 *)

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

Original entry on oeis.org

1, 2, 5, 6, 10, 25, 30, 40, 41, 60, 84, 90, 96, 100, 121, 129, 160, 169, 200, 201, 250, 266, 360, 400, 490, 500, 600, 640, 724, 810, 1000, 1025, 1210, 1440, 1690, 1960, 2250, 2500, 2560, 2890, 3000, 3240, 3604, 3610, 4000, 4100, 4410, 4840, 5216, 5290, 5760
Offset: 1

Views

Author

Paolo P. Lava, Nov 10 2014

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

Extensions

Corrected and extended by Davin Park, Dec 26 2016
Extended by Robert G. Wilson v, Dec 27 2016

A248127 Numbers whose squares became cubes if some digit is prepended, inserted or appended.

Original entry on oeis.org

2, 4, 5, 10, 31, 72, 75, 80, 162, 270, 383, 640, 1250, 2000, 2160, 3430, 4000, 5000, 5120, 7290, 10000, 13310, 17280, 21970, 27440, 28875, 31000, 33750, 40960, 49130, 58320, 68590, 72000, 75000, 80000, 92610
Offset: 1

Views

Author

Paolo P. Lava, Nov 10 2014

Keywords

Examples

			If n = 10 then n^2 = 100 and if we append a 0 we have (1000)^1/3 = 10.
If n = 31 then n^2 = 961 and if we insert a 2 we have (9261)^1/3 = 21.
Again, if n = 112625 then n^2 = 12684390625 and if we insert an 8 we have (126884390625)^1/3 = 5025.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a, b, c, j, k, ok, n;
    for n from 1 to q do a:=n^2; c:=ilog10(a)+1; ok:=1; for k from 0 to ilog10(a)+1 do
    if ok=1 then for j from 0 to 9 do if not (k=c and j=0) then b:=trunc(a/10^k)*10^(k+1)+j*10^k+(a mod 10^k);
    if b=trunc(evalf((b)^(1/3)))^3 then print(n); ok:=0; break; fi; fi; od; fi; od; od; end: P(10^9);
  • Mathematica
    f[n_] := ! MissingQ@SelectFirst[Rest@Flatten[Outer[Insert[IntegerDigits[n^2], #2, #1] &, Range[IntegerLength[n^2] + 1], Range[0, 9]], 1], IntegerQ@CubeRoot@FromDigits@# &];
    Select[Range[100], f] (* Davin Park, Dec 30 2016 *)

Extensions

Corrected by Davin Park, Dec 30 2016
Showing 1-3 of 3 results.