login
Number of times the smallest Fermi-Dirac factor of n is the smallest Fermi-Dirac factor for numbers <= n; a(1) = 1.
6

%I #9 Apr 16 2018 22:11:05

%S 1,1,1,1,1,2,1,3,1,4,1,2,1,5,3,1,1,6,1,2,4,7,1,8,1,9,5,3,1,10,1,11,6,

%T 12,2,4,1,13,7,14,1,15,1,5,3,16,1,8,1,17,9,6,1,18,4,19,10,20,1,11,1,

%U 21,2,7,5,22,1,8,12,23,1,24,1,25,13,9,3,26,1,6,1,27,1,14,7,28,15,29,1,30,4,10,16,31,8,32,1,33,2,11,1,34,1,35,17

%N Number of times the smallest Fermi-Dirac factor of n is the smallest Fermi-Dirac factor for numbers <= n; a(1) = 1.

%C Ordinal transform of A223490, or equally, of A302786.

%H Antti Karttunen, <a href="/A302788/b302788.txt">Table of n, a(n) for n = 1..65537</a>

%o (PARI)

%o up_to = 65537;

%o ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };

%o v050376 = vector(up_to);

%o A050376(n) = v050376[n];

%o ispow2(n) = (n && !bitand(n,n-1));

%o i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break));

%o A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };

%o A001511(n) = 1+valuation(n,2);

%o A302786(n) = if(1==n, 0, A001511(A052331(n)));

%o v302788 = ordinal_transform(vector(up_to,n,A302786(n)));

%o A302788(n) = v302788[n];

%Y Cf. A001511, A050376, A052331, A223490, A302786, A302789.

%Y Cf. A084400 (gives the positions of 1's).

%Y Cf. also A078898.

%K nonn

%O 1,6

%A _Antti Karttunen_, Apr 13 2018