A167045 Squares that remains a square when some single digit is inserted in front of its decimal expansion.
1, 4, 9, 25, 100, 225, 400, 625, 900, 1225, 2025, 2500, 3025, 4225, 5625, 7225, 10000, 22500, 30625, 40000, 50625, 62500, 70225, 75625, 90000, 93025, 122500, 202500, 250000, 302500, 330625, 422500, 455625, 562500, 722500, 765625, 950625, 1000000
Offset: 1
Examples
225 is in the sequence because both 225 and 1225 are squares.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..1000
Programs
-
Maple
a := proc (n) local s, c, j: s := proc (n) options operator, arrow: nops(convert(n, base, 10)) end proc: c := 0: for j to 9 do if type(sqrt(j*10^s(n^2)+n^2), integer) = true then c := c+1 else end if end do: if 0 < c then n^2 else end if end proc: seq(a(n), n = 1 .. 1200); # Emeric Deutsch, Nov 01 2009
-
Mathematica
srsQ[n_]:=AnyTrue[Range[9]*10^IntegerLength[n]+n,IntegerQ[Sqrt[#]]&]; Select[ Range[1200]^2,srsQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 19 2016 *)
Formula
Extensions
Edited by N. J. A. Sloane, Oct 29 2009
More terms from R. J. Mathar and Emeric Deutsch, Oct 30 2009