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 A281681 #34 Aug 02 2024 17:16:47 %S A281681 1,1,1,2,1,1,2,1,1,3,1,2,1,1,2,1,1,3,1,2,1,3,1,2,1,1,1,2,1,3,4,1,2,1, %T A281681 3,1,1,4,2,1,1,2,1,3,1,5,1,2,1,1,2,4,1,1,1,3,2,1,4,1,2,3,1,5,1,1,2,1, %U A281681 1,2,5,1,4,1,3,1,2,1,1,2,1,1,3,6,1,2,1,5,3,1,2,1,1,4,1,6,2,1,3,1,2,1,4,3,1,1,2,1,7,1,2,1,3,1,5,1,2,1,6,1,2,1,5,1,4,1,3,2,1 %N A281681 a(n) = A055396(A071904(n)) - 1. %C A281681 The sequence measures, in a sense, inversions in remainders of odd numbers upon factoring out their largest divisors (see A281680). %C A281681 In A281680, we have A281680(4) = A281680(7) = A281680(10) = 3 (and there will be infinitely many 1's to the right after each one of them), so there is why a(1)=a(2)=a(3)=1. Then we have A281680(12) = 5 (and there will be infinitely many 1's and 3's to the right), so that's why a(4) = 2, and so forth. I used 1,2,3,... here to represent these inversions, but any other symbols could have been used. %C A281681 Entries correspond to the position of the lowest prime factor of the odd composites, with prime=3 being position 1. - _Bill McEachen_, Jan 28 2018 %H A281681 Bill McEachen, <a href="/A281681/b281681.txt">Table of n, a(n) for n = 1..10000</a> %o A281681 (PARI) genit(maxx)={forcomposite(i5=9,maxx,if(i5%2==0,next);ptr=0;forprime(x=3,maxx,ptr+=1;if(i5%x==0,print1(ptr,",");break)));} \\ _Bill McEachen_, Jan 28 2018 %o A281681 (Python) %o A281681 from sympy import primepi, primefactors %o A281681 def A281681(n): %o A281681 if n == 1: return 1 %o A281681 m, k = n, primepi(n) + n + (n>>1) %o A281681 while m != k: %o A281681 m, k = k, primepi(k) + n + (k>>1) %o A281681 return primepi(min(primefactors(m)))-1 # _Chai Wah Wu_, Aug 02 2024 %Y A281681 Cf. A055396, A071904, A281680, A162022. %K A281681 nonn %O A281681 1,4 %A A281681 _Enrique Navarrete_, Jan 26 2017 %E A281681 Name changed by _Robert Israel_, Aug 03 2020