The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214285 List of amicable sums-of-factorial-of-digits pairs (A,B): A equals the sum of the factorials of B's digits in base 10, and vice versa. 6
871, 45361, 872, 45362 (list; graph; refs; listen; history; text; internal format)



Number pairs (A,B), A <> B, such that A061602(A)=B and A061602(B)=A, indicating where the mapping of A to the sum of the factorials of its digits has a cycle of length 2.

Peter Kiss (1977) showed there are no further terms. - N. J. A. Sloane, Mar 17 2019


P. Kiss, A generalization of a problem in number theory, Math. Sem. Notes Kobe Univ., 5 (1977), no. 3, 313-317. MR 0472667 (57 #12362).


Table of n, a(n) for n=1..4.

P. Kiss, A generalization of a problem in number theory, [Hungarian], Mat. Lapok, 25 (No. 1-2, 1974), 145-149.

Jaeyool Park, Blog [in Korean].

G. D. Poole, Integers and the sum of the factorials of their digits, Math. Mag., 44 (1971), 278-279, [JSTOR].

Project Euler, Problem 74-Digit factorial chains

H. J. J. te Riele, Iteration of number-theoretic functions, Nieuw Archief v. Wiskunde, (4) 1 (1983), 345-360. See Example I.1.b.


8! + 7! + 1! = 45361, 4! + 5! + 3! + 6! + 1! = 871.




local a, b, c, d, i, n;

for n from 1 to q do

  a:=n; b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=n; c:=0; d:=0;

  for i from 1 to b do  c:=c+(a-trunc(a/10)*10)!; a:=trunc(a/10); od;

  a:=c; b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=c;

  for i from 1 to b do  d:=d+(a-trunc(a/10)*10)!; a:=trunc(a/10); od;

  if n=d and n<>c then lprint(n, c); fi;

od; end:

A214285(1000000000000) # Paolo P. Lava, Jul 10 2012


Cf. A061602, A014080, A188284, A254499, A306955.

Sequence in context: A317806 A031783 A253167 * A251841 A251085 A334011

Adjacent sequences:  A214282 A214283 A214284 * A214286 A214287 A214288




Jaeyool Park, Jul 10 2012



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 20:19 EST 2021. Contains 349588 sequences. (Running on oeis4.)