A130687 Numbers n such that a_1! + a_2! + ... + a_m! is a square number, where a_1a_2...a_m is the decimal expansion of n.
1, 14, 15, 17, 22, 40, 41, 45, 50, 51, 54, 70, 71, 102, 112, 120, 121, 123, 132, 144, 156, 165, 200, 201, 203, 210, 211, 213, 230, 231, 302, 312, 320, 321, 334, 343, 404, 414, 433, 440, 441, 457, 475, 506, 516, 547, 560, 561, 574, 605, 615
Offset: 1
Examples
1! + 4! = 4! + 1! = 5^2, hence 14 and 41 are in the sequence.
Programs
-
Maple
A061602 := proc(n) local digs ; digs := convert(n,base,10) ; add(factorial(op(i,digs)),i=1..nops(digs)) ; end: isA130687 := proc(n) issqr(A061602(n)) ; end: for n from 1 to 3000 do if isA130687(n) then printf("%d, ",n) ; fi ; od ; # R. J. Mathar, Jul 12 2007
-
Mathematica
Select[Range[755], IntegerQ[Sqrt[DigitCount[ # ][[10]]+Sum[DigitCount[ # ][[i]]*i!, {i, 1, 9}]]] &]
Formula
Extensions
Edited by Stefan Steinerberger and R. J. Mathar, Jul 12 2007