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.

A128783 Numbers whose square is a nontrivial concatenation of other squares.

This page as a plain text file.
%I A128783 #14 Jul 10 2021 10:51:28
%S A128783 7,10,12,13,19,20,21,30,35,37,38,40,41,44,50,57,60,65,70,80,90,95,97,
%T A128783 100,102,105,107,108,110,112,119,120,121,125,129,130,138,140,150,160,
%U A128783 170,180,190,191,200,201,204,205,209,210,212,220,223,230,240,250
%N A128783 Numbers whose square is a nontrivial concatenation of other squares.
%C A128783 a(n) = sqrt(A019547(n)); the sequence A019547 gives the squares themselves and this sequence gives the numbers whose squares yield the numbers in A019547. All multiples of 10 are included, because for any value of x, (x*10)^2 = x^2*100, which is x^2 followed by two zeros. Every digit except 6 is used as the last digit of a number in this sequence before 50. 6 is not used as the last digit of a number in this sequence until 306.
%H A128783 Reinhard Zumkeller, <a href="/A128783/b128783.txt">Table of n, a(n) for n = 1..10000</a>
%e A128783 13 is included because 13^2 = 169, which includes 16 and 9, two perfect squares.
%o A128783 (Haskell)
%o A128783 a128783 n = a128783_list !! (n-1)
%o A128783 a128783_list = filter (f . show . (^ 2)) [1..] where
%o A128783    f zs = g (init $ tail $ inits zs) (tail $ init $ tails zs)
%o A128783    g (xs:xss) (ys:yss)
%o A128783      | a010052 (read xs) == 1 = a010052 (read ys) == 1 || f ys || g xss yss
%o A128783      | otherwise              = g xss yss
%o A128783    g _ _ = False
%o A128783 -- _Reinhard Zumkeller_, Oct 11 2011
%o A128783 (Python)
%o A128783 from math import isqrt
%o A128783 def issquare(n): return isqrt(n)**2 == n
%o A128783 def ok(n, c):
%o A128783     if n%10 in { 2, 3, 7, 8}: return False
%o A128783     if issquare(n) and c > 1: return True
%o A128783     d = str(n)
%o A128783     for i in range(1, len(d)):
%o A128783         if issquare(int(d[:i])) and ok(int(d[i:]), c+1): return True
%o A128783     return False
%o A128783 print([r for r in range(251) if ok(r*r, 1)]) # _Michael S. Branicky_, Jul 10 2021
%Y A128783 Cf. A019547.
%Y A128783 Cf. A010052, A000290; A048653 is a subsequence.
%K A128783 base,nonn
%O A128783 1,1
%A A128783 Jonathan R. Love (japanada11(AT)yahoo.ca), Apr 07 2007
%E A128783 Missing terms 205 and 209 inserted by _Reinhard Zumkeller_, Oct 11 2011