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.

A062685 Smallest square with digit sum n (or 0 if no such square exists).

This page as a plain text file.
%I A062685 #19 Jul 07 2018 01:43:39
%S A062685 1,0,0,4,0,0,16,0,9,64,0,0,49,0,0,169,0,576,289,0,0,1849,0,0,4489,0,
%T A062685 3969,17956,0,0,6889,0,0,27889,0,69696,98596,0,0,97969,0,0,499849,0,
%U A062685 1887876,698896,0,0,2778889,0,0,4999696,0,9696996,19998784,0,0
%N A062685 Smallest square with digit sum n (or 0 if no such square exists).
%C A062685 a(n) > 0 iff n mod 9 is 0, 1, 4, or 7. - _Jon E. Schoenfield_, Jul 06 2018
%H A062685 Jon E. Schoenfield, <a href="/A062685/b062685.txt">Table of n, a(n) for n = 1..228</a> (first 213 terms from Giovanni Resta)
%e A062685 16 is the smallest square with digit sum 7, so a(7)=16.
%t A062685 Array[If[FreeQ[{1, 4, 7, 9}, FixedPoint[Total@ IntegerDigits@ # &, #]], 0, Block[{k = 1, s}, While[Total@ IntegerDigits@ Set[s, k^2] != #, k++]; s]] &, 57] (* _Michael De Vlieger_, Jul 06 2018 *)
%Y A062685 Cf. A004159, A056991.
%K A062685 base,nonn
%O A062685 1,4
%A A062685 _Erich Friedman_, Jul 04 2001