This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A302786 #15 Jan 08 2022 06:32:01 %S A302786 0,1,2,3,4,1,5,1,6,1,7,2,8,1,2,9,10,1,11,3,2,1,12,1,13,1,2,3,14,1,15, %T A302786 1,2,1,4,3,16,1,2,1,17,1,18,3,4,1,19,2,20,1,2,3,21,1,4,1,2,1,22,2,23, %U A302786 1,5,3,4,1,24,3,2,1,25,1,26,1,2,3,5,1,27,4,28,1,29,2,4,1,2,1,30,1,5,3,2,1,4,1,31,1,6,3,32,1,33,1,2 %N A302786 Index of the smallest Fermi-Dirac factor of n, a(1) = 0 by convention: a(n) = A302778(A223490(n)). %H A302786 Antti Karttunen, <a href="/A302786/b302786.txt">Table of n, a(n) for n = 1..65537</a> %F A302786 a(n) = A302778(A223490(n)). %F A302786 a(1) = 0; for n > 1, a(n) = A001511(A052331(n)). %F A302786 For n >= 1, a(A050376(n)) = n. %F A302786 For n > 1, A050376(a(n)) = A223490(n). %t A302786 nn = 105; t = {}; k = 1; %t A302786 While[lim = nn^(1/k); lim > 2, %t A302786 t = Join[t, Prime[Range[PrimePi[lim]]]^k]; k = 2 k]; %t A302786 A050376 = Union[t]; %t A302786 A223490[n_] := Table[{p, e} = pe; p^(2^IntegerExponent[e, 2]), {pe, FactorInteger[n]}] // Min; %t A302786 a[n_] := If[n == 1, 0, FirstPosition[A050376, A223490[n]][[1]]]; %t A302786 Array[a, nn] (* _Jean-François Alcover_, Jan 08 2022, after _T. D. Noe_ in A050376 *) %o A302786 (PARI) %o A302786 up_to = 65537; %o A302786 v050376 = vector(up_to); %o A302786 ispow2(n) = (n && !bitand(n,n-1)); %o A302786 i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break)); %o A302786 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 A302786 A001511(n) = 1+valuation(n,2); %o A302786 A302786(n) = if(1==n,0,A001511(A052331(n))); %Y A302786 A left inverse of A050376. %Y A302786 Cf. A001511, A052331, A223490, A302778, A302785, A302787, A302788 (ordinal transform), A302789. %Y A302786 Cf. also A055396. %K A302786 nonn %O A302786 1,3 %A A302786 _Antti Karttunen_, Apr 13 2018