login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084953 Numbers k such that k! is the sum of 4 but no fewer nonzero squares. 3

%I #41 Jul 08 2023 17:06:17

%S 10,12,24,25,48,49,54,60,78,91,96,97,107,114,120,121,142,151,167,170,

%T 172,180,192,193,212,222,226,238,240,241,246,252,270,279,301,307,309,

%U 318,327,333,344,345,357,360,361,367,375,379,384,385,403,405,421,424,425

%N Numbers k such that k! is the sum of 4 but no fewer nonzero squares.

%C The asymptotic density of this sequence is 1/8 (Deshouillers and Luca, 2010). - _Amiram Eldar_, Jan 11 2021

%H Hugo Pfoertner, <a href="/A084953/b084953.txt">Table of n, a(n) for n = 1..5000</a>

%H Dario Alpern, <a href="https://www.alpertron.com.ar/FSQUARES.HTM">Sum of squares web application</a>.

%H 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 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 Equivalently, k! is of the form (4^i)*(8*j+7), i >= 0, j >= 0.

%e a(1) = 10 because 10! cannot be written as the sum of fewer than 4 squares.

%t Select[Range[500], Mod[#!/4^IntegerExponent[#!, 4], 8] == 7 &] (* _Amiram Eldar_, Jan 11 2021 *)

%o See link.

%o (PARI) isA004215(n)= n\4^valuation(n, 4)%8==7;

%o isok(n) = isA004215(n!); \\ _Michel Marcus_, Dec 30 2020

%o (Python 3.10+)

%o from math import factorial

%o from itertools import count, islice

%o def A084953_gen(startvalue=1): # generator of terms >= startvalue

%o return filter(lambda n:(factorial(n)>>((n-n.bit_count())&-2))&7==7,count(max(startvalue,1)))

%o A084953_list = list(islice(A084953_gen(),30)) # _Chai Wah Wu_, Jul 09 2022

%Y Cf. A000142, A004215, A084966.

%Y Complement of A267215.

%K nonn

%O 1,1

%A _Hugo Pfoertner_, Jun 15 2003

%E Edited and extended by _Robert G. Wilson v_, Jun 17 2003

%E Added missing term 357 by _Rob Burns_, Dec 30 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:30 EDT 2024. Contains 371967 sequences. (Running on oeis4.)