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.
%I A236247 #19 May 20 2025 12:52:26 %S A236247 1,49,25,121,784,196,33124,4900,4,4356,2304324,213444,2371600,379456, %T A236247 87616,360000,3802500,562500,100,532900,5456896,767376,5934096,992016, %U A236247 9947716,1350244,32467204,44100,2414916,10458756,2683044 %N A236247 Sequence of distinct least squares such that the arithmetic mean of the first n squares is also a square. %H A236247 Giovanni Resta, <a href="/A236247/b236247.txt">Table of n, a(n) for n = 1..200</a> %F A236247 a(n) = A141391(n)^2 %e A236247 a(1) = 1. %e A236247 a(2) is the smallest unused square such that (a(2)+a(1))/2 is a square. So, a(2) = 49. %e A236247 a(3) is the smallest unused square such that (a(3)+a(2)+a(1))/3 is a square. So, a(3) = 25. %e A236247 ...and so on. %o A236247 (Python) %o A236247 def Sq(x): %o A236247 for n in range(10**15): %o A236247 if x == n**2: %o A236247 return True %o A236247 if x < n**2: %o A236247 return False %o A236247 return False %o A236247 def SqAve(init): %o A236247 print(init) %o A236247 lst = [] %o A236247 lst.append(init) %o A236247 n = 1 %o A236247 while n < 10**9: %o A236247 if n**2 not in lst: %o A236247 if Sq(((sum(lst)+n**2)/(len(lst)+1))): %o A236247 print(n**2) %o A236247 lst.append(n**2) %o A236247 n = 1 %o A236247 else: %o A236247 n += 1 %o A236247 else: %o A236247 n += 1 %o A236247 SqAve(1) %Y A236247 Cf. A019444, A141391. %K A236247 nonn %O A236247 1,2 %A A236247 _Derek Orr_, Jan 20 2014