A270000 Harmonic fractility of n.
1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 3, 1, 2, 1, 1, 1, 3, 2, 1, 3, 3, 1, 3, 3, 1, 1, 3, 2, 1, 1, 3, 1, 3, 1, 2, 3, 3, 2, 4, 1, 2, 3, 2, 3, 3, 1, 1, 3, 1, 3, 3, 1, 5, 1, 3, 3, 2, 2, 2, 1, 1, 1, 5, 3, 3, 1, 3, 3, 4, 1, 2, 2, 3, 3, 6, 3, 3, 2, 1, 4, 3, 1, 2, 2, 3, 3
Offset: 2
Examples
NI(1/11) = (11, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...), NI(2/11) = (5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...), NI(3/11) = (3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...), NI(4/11) = (2, 5, 2, 1, 2, 1, 2, 1, 2, 1, 2, ...), NI(5/11) = (2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, ...), NI(6/11) = (1, 11, 1, 1, 1, 1, 1, 1, 1, 1, ...), NI(7/11) = (1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...), NI(8/11) = (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ...), NI(9/11) = (1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...), NI(10/11) = (1, 1, 1, 3, 3, 3, 3, 3, 3, 3, ...), so that there are 3 equivalence classes for n = 11, and that the harmonic fractility of 11 is 3.
Links
- Jack W Grahl, Table of n, a(n) for n = 2..999
- Jack W Grahl, Python code to generate this sequence
Crossrefs
Programs
-
Mathematica
A270000[n_] := CountDistinct[With[{l = NestWhileList[Rescale[#, {1/(Floor[1/#] + 1), 1/Floor[1/#]}] &, #, UnsameQ, All]}, Min@l[[First@FirstPosition[l, Last@l] ;;]]] & /@ Range[1/n, 1 - 1/n, 1/n]] (* Davin Park, Nov 09 2016 *)
-
PARI
A270000(n)=#Set(vector(n-1,k,NIR(k/n))) \\ where: NIR(x, n, L=1, S=[], c=0)={for(i=2, oo, n=L\x; S=setunion(S, [x/L]); x-=L/(n+1); L/=n*(n+1); setsearch(S, x/L)&& if(c, break, c=!S=[])); S[1]} \\ variant of the function NI() below; returns just a unique representative (smallest x/L occurring within the period) of the equivalence class. NI(x, n=[], L=1, S=[], c=0)={for(i=2, oo, n=concat(n, L\x); c|| S=setunion(S, [x/L]); x-=L/(n[#n]+1); L/=n[#n]*(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 the harmonic nested interval sequence for x in the form [transition, period]. (End)
Extensions
Definition corrected by Jack W Grahl, Jun 27 2018
Edited by M. F. Hasler, Nov 05 2018
Comments