login
Number of squares between n! and (n+1)!, exclusive.
1

%I #21 Aug 04 2024 01:25:15

%S 0,0,1,2,6,16,44,130,402,1302,4413,15569,57025,216348,848276,3430608,

%T 14285534,61155157,268761742,1210999692,5588016550,26378327264,

%U 127259503463,626899847777,3150741885292,16143690587631,84267627864828,447817207758155,2421343092445682

%N Number of squares between n! and (n+1)!, exclusive.

%C Number of integers k such that n! < k^2 < (n + 1)!.

%F a(n) = A055226(n+1) - A055226(n). - _Alois P. Heinz_, Aug 02 2024

%e For n = 3, between 3! and 4! there are only two squares: 9 and 16, so a(3) = 2.

%o (Python)

%o from math import isqrt, factorial

%o def A373048(n): return isqrt((m:=factorial(n))*(n+1))-isqrt(m) # _Chai Wah Wu_, Aug 03 2024

%Y Cf. A000142, A000290, A055226.

%K nonn,easy

%O 0,4

%A _Gonzalo Martínez_, Aug 02 2024