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.

A048375 Numbers whose square is a concatenation of two nonzero squares.

Original entry on oeis.org

7, 13, 19, 35, 38, 41, 57, 65, 70, 125, 130, 190, 205, 223, 253, 285, 305, 350, 380, 410, 475, 487, 570, 650, 700, 721, 905, 975, 985, 1012, 1201, 1250, 1265, 1300, 1301, 1442, 1518, 1771, 1900, 2024, 2050, 2163, 2225, 2230, 2277, 2402, 2435, 2530, 2850
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Comments

Leading zeros not allowed, trailing zeros are.
This means that, e.g., 95 is not in the sequence although 95^2 = 9025 could be seen as concatenation of 9 and 025 = 5^2. - M. F. Hasler, Jan 25 2016

Examples

			1771^2 = 3136441 = 3136_441 and 3136 = 56^2, 441 = 21^2.
		

Crossrefs

Programs

  • Mathematica
    squareQ[n_] := IntegerQ[Sqrt[n]]; okQ[n_] := MatchQ[IntegerDigits[n^2], {a__ /; squareQ[FromDigits[{a}]], b__ /; First[{b}] > 0 && squareQ[FromDigits[{b}]]}]; Select[Range[3000], okQ] (* Jean-François Alcover, Oct 20 2011, updated Dec 13 2016 *)
  • PARI
    is_A048375(n)={my(p=100^valuation(n,10));n*=n;while(n>p*=10,issquare(n%p)&&issquare(n\p)&&n%p*10>=p&&return(1))} \\ M. F. Hasler, Jan 25 2016
    
  • Python
    from math import isqrt
    def issquare(n): return isqrt(n)**2 == n
    def ok(n):
      d = str(n)
      for i in range(1, len(d)):
        if d[i] != '0' and issquare(int(d[:i])) and issquare(int(d[i:])):
          return True
      return False
    print([r for r in range(2851) if ok(r*r)]) # Michael S. Branicky, Jul 13 2021

Formula

a(n) = sqrt(A039686(n)). - M. F. Hasler, Jan 25 2016