OFFSET
2,3
COMMENTS
In order to define (factorial) fractility of an integer n > 1, we first define nested interval sequences. Suppose that r = (r(n)) is a sequence satisfying (i) 1 = r(1) > r(2) > r(3) > ... and (ii) r(n) -> 0. For x in (0,1], let n(1) be the index n such that r(n+1) < x <= r(n), and let L(1) = r(n(1))-r(n(1)+1). Let n(2) be the largest index n such that x <= r(n(1)+1) + L(1)*r(n), and let L(2) = (r(n(2)) - r(n(2)+1))*L(1). Continue inductively to obtain the sequence (n(1), n(2), n(3), ...) =: NI(x), the r-nested interval sequence of x.
For fixed r, call x and y equivalent if NI(x) and NI(y) are eventually equal (up to an offset). For n > 1, the r-fractility of n is the number of equivalence classes of sequences NI(m/n) for 0 < m < n. Taking r = (1/1, 1/2!, 1/3!, 1/4!, ... ) gives factorial fractility.
For factorial fractility, r(n) = 1/n!, n(j+1) = A084558(L(j)/(x - Sum_{i=1..j} L(i-1)/(n(i)+1)!)) for all j >= 0, L(0) = 1. - M. F. Hasler, Nov 05 2018
LINKS
Robert Price, Table of n, a(n) for n = 2..500
EXAMPLE
NI(1/10) = (3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, ...)
NI(2/10) = (2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, ...)
NI(3/10) = (2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...)
NI(4/10) = (2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, ...)
NI(5/10) = (2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...)
NI(6/10) = (1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, ...)
NI(7/10) = (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...)
NI(8/10) = (1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, ...)
NI(9/10) = (1, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, 2, 3, ...),
so that there are 3 equivalence classes for n = 10, and the factorial fractility of 10 is 3.
MATHEMATICA
A269982[n_] := CountDistinct[With[{l = NestWhileList[Rescale[#, {1/(Floor[x] + 1)!, 1/Floor[x]!} /. FindRoot[1/x! == #, {x, 1}]] &, #, UnsameQ, All]}, Min@l[[First@First@Position[l, Last@l] ;; ]]] & /@ Range[1/n, 1 - 1/n, 1/n]] (* Davin Park, Nov 19 2016 *)
PROG
From M. F. Hasler, Nov 05 2018: (Start)
(PARI) A269982(n)=#Set(vector(n-1, k, NIFR(k/n))) \\ where:
NIFR(x, n, L=1, S=[], c=0)={for(i=2, oo, n=A084558(L\x); S=setunion(S, [x/L]); x-=L/(n+1)!; L/=(n+1)!\n; setsearch(S, x/L)&& if(c, break, c=!S=[])); S[1]} \\ variant of the function NIF() below; returns just a unique representative (smallest x/L occurring within the period) of the equivalence class.
NIF(x, n=[], L=1, S=[], c=0)={for(i=2, oo, n=concat(n, A084558(L\x)); c|| S=setunion(S, [x/L]); x-=L/(n[#n]+1)!; L/=(n[#n]-1)!*(n[#n]+1); if(!c, setsearch(S, x/L)&& [c, S]=[i, x/L], x/L==S, c-=i; break)); [n[1..2*c-1], n[c..-1]]} \\ Returns [transition, period] of "factorial" NI(x). (End)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling and Peter J. C. Moses, Mar 10 2016
EXTENSIONS
Edited by M. F. Hasler, Nov 05 2018
STATUS
approved