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.

A175396 Numbers whose sum of squares of digits is a square.

This page as a plain text file.
%I A175396 #41 Jul 08 2025 10:45:08
%S A175396 0,1,2,3,4,5,6,7,8,9,10,20,30,34,40,43,50,60,68,70,80,86,90,100,122,
%T A175396 148,184,200,212,221,236,244,263,269,296,300,304,326,340,362,366,400,
%U A175396 403,418,424,430,442,447,474,481,488,500,600,608,623,629,632,636,663
%N A175396 Numbers whose sum of squares of digits is a square.
%C A175396 Previous name: Numbers n such that Sum_{i=1..r, x(i)^2} is a perfect square, where x(i) = digits of n. r=1+floor(log_10 n).
%H A175396 Christian N. K. Anderson, <a href="/A175396/b175396.txt">Table of n, a(n) for n = 1..10000</a>
%e A175396 34 is a term: 3^2 + 4^2 = 25 = 5^2.
%e A175396 122 is a term: 1^2 + 2^2 + 2^2 = 9 = 3^2.
%t A175396 Select[Range[0, 666], IntegerQ[Sqrt[Plus @@ (IntegerDigits[#]^2)]] &] (* _Ivan Neretin_, Aug 03 2015 *)
%o A175396 (PARI) isok(n) = {my(digs = digits(n)); issquare(sum(i=1, #digs, digs[i]^2))} \\ _Michel Marcus_, Jun 02 2013
%o A175396 (Python)
%o A175396 from math import isqrt
%o A175396 def ok(n): s = sum(int(i)**2 for i in str(n)); return isqrt(s)**2 == s
%o A175396 print(*[k for k in range(664) if ok(k)], sep = ', ')  # _Ya-Ping Lu_, Jul 07 2025
%Y A175396 Cf. A000290, A003132, A084561.
%K A175396 base,easy,nonn
%O A175396 1,3
%A A175396 _Ctibor O. Zizka_, Apr 30 2010
%E A175396 Corrected and extended by Neven Juric, Jul 12 2010
%E A175396 Simpler definition by _Michel Marcus_, Jun 02 2013