login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A351328 a(n) is equal to the sum of the factorials of the digits of a(n-1), with a(1) = 0; each time a duplicated term appears, we replace it with the smallest integer not yet in the sequence and iterate. 2
0, 1, 2, 3, 6, 720, 5043, 151, 122, 5, 120, 4, 24, 26, 722, 5044, 169, 363601, 1454, 7, 5040, 146, 745, 5184, 40465, 889, 443520, 177, 10081, 40324, 57, 5160, 842, 40346, 775, 10200, 8, 40320, 34, 30, 9, 362880, 81369, 403927, 367953, 368772, 51128, 40444, 97, 367920, 368649, 404670, 5810, 40442, 75 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Michael De Vlieger, Scatterplot of a(n), n = 1..10^6.
EXAMPLE
a(1) = 0; as 0! = 1 we have a(2) = 1; but as 1! = 1 is already in the sequence, we extend it with a(3) = 2, the smallest integer not yet in the sequence; as 2! = 2 (being already in the sequence) we extend it with a(4) = 3; now as 3! = 6 in new, we immediately form a(5) = 6; as 6! = 720 we have a(6) = 720 and a(7) = 7! + 2! + 0! = 5040 + 2 + 1 = 5043; etc.
This technique allows us to get rid of all the loops of the kind mentioned in A308259.
MATHEMATICA
c[_] = 0; j = c[1] = 1; Array[Set[f[#], #!] &, 10, 0];
{1}~Join~Reap[Do[While[c[u] > 0, u++]; If[c[#] > 0, Set[k, u], Set[k, #]] &@ Total@ Map[f[#] &, IntegerDigits[j]]; Sow[k]; c[k] = i; j = k, {i, 2, 53}]][[-1, -1]] (* Michael De Vlieger, Feb 07 2022 *)
CROSSREFS
Cf. A308259.
Sequence in context: A015762 A015770 A093038 * A367897 A094469 A015766
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Feb 07 2022
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 14:22 EDT 2024. Contains 374584 sequences. (Running on oeis4.)