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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

10, 12, 24, 25, 48, 49, 54, 60, 78, 91, 96, 97, 107, 114, 120, 121, 142, 151, 167, 170, 172, 180, 192, 193, 212, 222, 226, 238, 240, 241, 246, 252, 270, 279, 301, 307, 309, 318, 327, 333, 344, 345, 357, 360, 361, 367, 375, 379, 384, 385, 403, 405, 421, 424, 425
Offset: 1

Views

Author

Hugo Pfoertner, Jun 15 2003

Keywords

Comments

The asymptotic density of this sequence is 1/8 (Deshouillers and Luca, 2010). - Amiram Eldar, Jan 11 2021

Examples

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

Crossrefs

Complement of A267215.

Programs

  • C
    /* See Alpern link. */
    
  • Mathematica
    Select[Range[500], Mod[#!/4^IntegerExponent[#!, 4], 8] == 7 &] (* Amiram Eldar, Jan 11 2021 *)
  • PARI
    isA004215(n)= n\4^valuation(n, 4)%8==7;
    isok(n) = isA004215(n!); \\ Michel Marcus, Dec 30 2020
    
  • Python
    from math import factorial
    from itertools import count, islice
    def A084953_gen(startvalue=1): # generator of terms >= startvalue
            return filter(lambda n:(factorial(n)>>((n-n.bit_count())&-2))&7==7,count(max(startvalue,1)))
    A084953_list = list(islice(A084953_gen(),30)) # Chai Wah Wu, Jul 09 2022

Formula

Equivalently, k! is of the form (4^i)*(8*j+7), i >= 0, j >= 0.
a(n) ~ 8n. - Charles R Greathouse IV, Jan 06 2025

Extensions

Edited and extended by Robert G. Wilson v, Jun 17 2003
Added missing term 357 by Rob Burns, Dec 30 2020
Showing 1-1 of 1 results.