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.

A006488 Numbers n such that n! has a square number of digits.

This page as a plain text file.
%I A006488 M0830 #69 Feb 16 2025 08:32:30
%S A006488 0,1,2,3,7,12,18,32,59,81,105,132,228,265,284,304,367,389,435,483,508,
%T A006488 697,726,944,1011,1045,1080,1115,1187,1454,1494,1617,1659,1788,1921,
%U A006488 2012,2105,2200,2248,2395,2445,2861,2915,3192,3480,3539,3902,3964,4476
%N A006488 Numbers n such that n! has a square number of digits.
%C A006488 Numbers whose square is represented by the number of digits of n!: 1, 2, 3, 4, 6, 9, 11, 13, 15, 21, 23, 24, 25, 28, 29, ..., . - _Robert G. Wilson v_, May 14 2014
%C A006488 From _Bernard Schott_, Jan 04 2020: (Start)
%C A006488 In M. Gardner's book, see reference, there is a tree printout of 105! with 169 digits, where the bottom row consists of the 25 trailing zeros of 105!. M. Gardner does not explain if this is the only factorial that can be displayed in a similar tree form.
%C A006488 Proof: If m! has q^2 digits, hence the number of trailing zeros in m! must be equal to 2*q-1 to satisfy this triangular look; m = 105 satisfies these two conditions with q = 13 because 105! has 13^2 = 169 digits and 2*13-1 = 25 trailing zeros.
%C A006488 When m < 105 and m! has q^2 digits (m <= 81), then q <= 11 and the number of trailing zeros is <= 2*q - 3.
%C A006488 When m > 105 and m! has q^2 digits (m >= 132), then q >= 15 and the number of trailing zeros is >= 2*q + 2.
%C A006488 Hence, only 105! presents such a tree printout.
%C A006488               1
%C A006488              081
%C A006488             39675
%C A006488            8240290
%C A006488           900504101
%C A006488          30580032964
%C A006488         9720646107774
%C A006488        902579144176636
%C A006488       57322653190990515
%C A006488      3326984536526808240
%C A006488     339776398934872029657
%C A006488    99387290781343681609728
%C A006488   0000000000000000000000000
%C A006488 (End)
%D A006488 M. Gardner, Mathematical Magic Show. Random House, NY, 1978, p. 55.
%D A006488 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A006488 Robert G. Wilson v, <a href="/A006488/b006488.txt">Table of n, a(n) for n = 1..1311</a>
%H A006488 D. S. Kluk and N. J. A. Sloane, <a href="/A002050/a002050_3.pdf">Correspondence, 1979</a>
%H A006488 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/StirlingsApproximation.html">Stirling's Approximation</a> and <a href="https://mathworld.wolfram.com/StirlingsSeries.html">Stirling's Series</a>
%H A006488 <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>
%t A006488 LogBase10Stirling[n_] := Floor[Log[10, 2 Pi n]/2 + n*Log[10, n/E] + Log[10, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5)]]; Select[ Range[ 4500], IntegerQ[ Sqrt[ (LogBase10Stirling[ # ] + 1)]] & ] (* The Mathematica coding comes from J. Stirling's expansion for the Gamma function; see the links. For more terms inside the last Log_10 function, use A001163 & A001164. _Robert G. Wilson v_, Apr 27 2014 *)
%t A006488 Select[Range[0,4500],IntegerQ[Sqrt[IntegerLength[#!]]]&] (* _Harvey P. Dale_, Sep 27 2018 *)
%o A006488 (PARI) isok(n) = issquare(#Str(n!)); \\ _Michel Marcus_, Sep 05 2015
%o A006488 (Magma) [k:k in [0..5000]| IsSquare(#Intseq(Factorial(k)))]; // _Marius A. Burtea_, Jan 04 2020
%Y A006488 Cf. A000142, A027868 (trailing zeros), A034886 (number of digits), A056851.
%K A006488 nonn,base
%O A006488 1,3
%A A006488 _N. J. A. Sloane_ and _Robert G. Wilson v_