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.

A257649 Squares that are the concatenation of two integers (without leading zeros) the sum of which is also a square.

Original entry on oeis.org

36, 81, 169, 196, 324, 361, 576, 729, 841, 1156, 1521, 1681, 1764, 2809, 3249, 3481, 4356, 5625, 6084, 6241, 6724, 7396, 7569, 7744, 7921, 8281, 9216, 12321, 12544, 12769, 12996, 13689, 15129, 16384, 17424, 18769, 19881, 24964, 25600, 31684, 32041, 34596, 36864, 38416, 39601
Offset: 1

Views

Author

Reiner Moewald, Jul 25 2015

Keywords

Comments

Squares that can be split up in more than one way, e.g., 729 (72 + 9 and 7 + 29), appear only once.
The number of such squares is infinite, since 39...960...01 (the numbers of the digits 9 and 0 is equal) can be split up into 3 and 9...960..01 with 3 + 9...960...01 = (100...0-2)^2 and 39...960...01 = (2*100...0 - 1)^2.
From Robert G. Wilson v, Aug 06 2015: (Start)
Number of terms < 10^k: 0, 2, 9, 27, 66, 149, 370, 910, 2164, 5325, 12916, 29448, ..., .
Terms which are members of A257649 in more than one way: 729, 7569, 15129, 56169, 86436, 123201, ..., .
Terms which are members of A257649 in more than two way: 881377344, 3784833441, 39999600001, 54444755556, 71111288889, 89999400001, 159999200001, 321111488889, 751111688889, ..., .
Least term which is a member of A257649 in k ways: 36, 729, 881377344, 399999960000001, ..., . (End)

Examples

			36 = 6^2 and 3 + 6 = 9 = 3^2.
		

Crossrefs

Subsequence of A052041.

Programs

  • Mathematica
    f[n_] := Block[{a, b, c, k = 1, idn = IntegerDigits@ n, lng, lst = {}}, lng = Length@ idn; While[k < lng, a = FromDigits[ Take[idn, {1, k}]]; b = FromDigits[ Take[idn, {k + 1, lng}]]; c = a*10^(lng - k) + b; If[b > 0 && Floor[1 + Log10@ b] == lng - k && IntegerQ@ Sqrt[a + b], AppendTo[lst, c]]; k++]; Length@ lst]; k = 1; lst = {}; While[k < 201, If[ f[k^2] > 0, AppendTo[lst, k^2]]; k++]; lst (* Robert G. Wilson v, Aug 06 2015 *)
    ctiQ[n_]:=AnyTrue[Total/@Select[Table[FromDigits/@TakeDrop[IntegerDigits[n],d],{d,IntegerLength[ n]-1}],IntegerLength[#[[1]]]+IntegerLength[#[[2]]] ==IntegerLength[ n]&],IntegerQ[ Sqrt[#]]&]; Select[Range[200]^2,ctiQ] (* Harvey P. Dale, Jun 04 2023 *)
  • Python
    import math
    print("Start")
    list =[]
    for i in range(1,1000):
       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)
    print(list)
    print("End")