login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers k that can be written as the sum of a perfect square and a factorial in at least 2 distinct ways.
1

%I #28 Dec 11 2022 00:47:35

%S 2,6,10,124,145,220,649,745,1081,1249,1345,2929,3601,3745,5065,5076,

%T 5161,5209,5481,6049,6196,6265,6804,7249,7945,8289,9529,11124,14644,

%U 15649,17361,17809,21169,22921,30649,35316,40321,40384,40720,40761,43456,43569,43801

%N Numbers k that can be written as the sum of a perfect square and a factorial in at least 2 distinct ways.

%C This does not count x^2 and (-x)^2 as distinct, nor does it count 0! and 1! as distinct.

%C For any two factorials a > b, where a-b = m*n where m > n and (m and n are both even or m and n are both odd), (((m-n)/2)^2 + a) will appear in this sequence.

%e 145 = 5^2 + 5! = 11^2 + 4! = 12^2 + 1!.

%t With[{f = Range[8]!}, c[n_] := Count[f, _?(IntegerQ @ Sqrt[n - #] &)]; Select[Range[f[[-1]]], c[#] > 1 &]] (* _Amiram Eldar_, Oct 30 2022 *)

%Y Cf. A000142, A000290.

%K nonn

%O 1,1

%A _Walter Robinson_, Oct 30 2022