# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a084953 Showing 1-1 of 1 %I A084953 #41 Jul 08 2023 17:06:17 %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, Table of n, a(n) for n = 1..5000 %H A084953 Dario Alpern, Sum of squares web application. %H A084953 Rob Burns, Factorials and Legendre's three-square theorem, arXiv:2101.01567 [math.NT], 2021. %H A084953 Jean-Marc Deshouillers and Florian Luca, How often is n! a sum of three squares?, 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. %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 See 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 3.10+) %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 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE