A258060 Squares, without multiplicity, that are the concatenation of two integers (without leading zeros) the product of which is also a square.
49, 169, 361, 1225, 1444, 1681, 3249, 4225, 4900, 15625, 16900, 36100, 42025, 49729, 64009, 81225, 93025, 122500, 142129, 144400, 168100, 225625, 237169, 324900, 414736, 422500, 490000, 519841, 819025, 950625, 970225, 1024144, 1442401, 1562500, 1600225, 1690000, 1692601, 2079364, 2304324
Offset: 1
Examples
169 = 13^2 can be split up into 16 and 9 and 16*9 = 144, a square.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..1386 (first 200 terms from Reiner Moewald)
Crossrefs
Subsequence of A039686.
Programs
-
Maple
p:= proc(k,n) local t; t:= n mod 10^k; t >= 10^(k-1) and issqr(t*(n-t)/10^k) end proc: filter:= n -> ormap(p, [$1..ilog10(n)], n): select(filter, [seq(i^2, i=1..10^4)]); # Robert Israel, Sep 22 2015
-
Mathematica
f[n_] := Block[{idn = IntegerDigits@ n, c = 0, k = 1, lmt = Floor[1 + Log10@ n]}, While[k < lmt, m = Mod[n, 10^(lmt - k)]; If[ IntegerQ@ Sqrt[ FromDigits[ Take[idn, {1, k}]] m] && m > 0 && IntegerDigits[m] == Take[idn, {k + 1, -1}], c++]; k++]; c]; Select[ Range[1700]^2, f@# > 0 &] (* Robert G. Wilson v, Aug 13 2015 *)
-
PARI
isok(n) = {if (issquare(n), len = #Str(n); for (k=1, len-1, na = n\10^k; nb = n%10^k; if (na && nb && (eval(Str(na,nb))==n) && issquare(na*nb), return (1));););} \\ Michel Marcus, Oct 09 2015
-
Python
import math list =[] for i in range(1,100000): a = i*i b = str(a) l = len(b) for j in range(1, l): a_1 = b[:j] a_2 = b[j:] c = int(a_1)* int(a_2) sqrt_c = int(math.sqrt(int(c))) if (sqrt_c * sqrt_c == c) and (int(a_2[:1]) > 0): if not a in list: list.append(a) list.append(a) print(list)
Comments