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 A084953 #47 Jan 07 2025 12:44:09 %S A084953 10,12,24,25,48,49,54,60,78,91,96,97,107,114,120,121,142,151,167,170, %T A084953 172,180,192,193,212,222,226,238,240,241,246,252,270,279,301,307,309, %U A084953 318,327,333,344,345,357,360,361,367,375,379,384,385,403,405,421,424,425 %N A084953 Numbers k such that k! is the sum of 4 but no fewer nonzero squares. %C A084953 The asymptotic density of this sequence is 1/8 (Deshouillers and Luca, 2010). - _Amiram Eldar_, Jan 11 2021 %H A084953 Hugo Pfoertner, <a href="/A084953/b084953.txt">Table of n, a(n) for n = 1..5000</a> %H A084953 Dario Alpern, <a href="https://www.alpertron.com.ar/FSQUARES.HTM">Sum of squares web application</a>. See also <a href="https://github.com/alpertron/calculators">code on GitHub</a>. %H A084953 Rob Burns, <a href="https://arxiv.org/abs/2101.01567">Factorials and Legendre's three-square theorem</a>, arXiv:2101.01567 [math.NT], 2021. %H A084953 Jean-Marc Deshouillers and Florian Luca, <a href="https://doi.org/10.1007/978-1-4419-6263-8_14">How often is n! a sum of three squares?</a>, in: The legacy of Alladi Ramakrishnan in the mathematical sciences, Springer, New York, 2010, pp. 243-251. %F A084953 Equivalently, k! is of the form (4^i)*(8*j+7), i >= 0, j >= 0. %F A084953 a(n) ~ 8n. - _Charles R Greathouse IV_, Jan 06 2025 %e A084953 a(1) = 10 because 10! cannot be written as the sum of fewer than 4 squares. %t A084953 Select[Range[500], Mod[#!/4^IntegerExponent[#!, 4], 8] == 7 &] (* _Amiram Eldar_, Jan 11 2021 *) %o A084953 (C) /* See Alpern link. */ %o A084953 (PARI) isA004215(n)= n\4^valuation(n, 4)%8==7; %o A084953 isok(n) = isA004215(n!); \\ _Michel Marcus_, Dec 30 2020 %o A084953 (Python) %o A084953 from math import factorial %o A084953 from itertools import count, islice %o A084953 def A084953_gen(startvalue=1): # generator of terms >= startvalue %o A084953 return filter(lambda n:(factorial(n)>>((n-n.bit_count())&-2))&7==7,count(max(startvalue,1))) %o A084953 A084953_list = list(islice(A084953_gen(),30)) # _Chai Wah Wu_, Jul 09 2022 %Y A084953 Cf. A000142, A004215, A084966. %Y A084953 Complement of A267215. %K A084953 nonn %O A084953 1,1 %A A084953 _Hugo Pfoertner_, Jun 15 2003 %E A084953 Edited and extended by _Robert G. Wilson v_, Jun 17 2003 %E A084953 Added missing term 357 by _Rob Burns_, Dec 30 2020