A231719 After zero, a(n) = largest m such that m! divides the difference between successive nodes A219666(n-1) and A219666(n) in the infinite trunk of the factorial beanstalk.
0, 1, 1, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 1, 3, 2, 2, 1, 3, 1, 2, 1, 3, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 3, 2, 2, 1, 3, 1, 2, 1, 3, 1, 1, 1, 3, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 3, 1, 1, 1, 3, 2, 3, 2, 2, 1, 2, 1, 2, 1, 3, 1, 1, 1, 3, 2, 3, 2, 2, 1, 2, 3, 2, 1, 1, 1
Offset: 0
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..21622
Programs
-
Mathematica
nn = 1200; m = 1; While[Factorial@ m < nn, m++]; m; t = TakeWhile[ Reverse@ NestList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, nn, 182], # <= 1000 &]; {0}~Join~Table[SelectFirst[Reverse@ Range@ 10, Divisible[t[[n]] - t[[n - 1]], #!] &], {n, 2, 87}] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
-
Scheme
(define (A231719 n) (if (zero? n) n (A055881 (A230406 n))))
Comments