login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = A055396(A071904(n)) - 1.
2

%I #34 Aug 02 2024 17:16:47

%S 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 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 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 a(n) = A055396(A071904(n)) - 1.

%C The sequence measures, in a sense, inversions in remainders of odd numbers upon factoring out their largest divisors (see A281680).

%C 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 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 Bill McEachen, <a href="/A281681/b281681.txt">Table of n, a(n) for n = 1..10000</a>

%o (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 (Python)

%o from sympy import primepi, primefactors

%o def A281681(n):

%o if n == 1: return 1

%o m, k = n, primepi(n) + n + (n>>1)

%o while m != k:

%o m, k = k, primepi(k) + n + (k>>1)

%o return primepi(min(primefactors(m)))-1 # _Chai Wah Wu_, Aug 02 2024

%Y Cf. A055396, A071904, A281680, A162022.

%K nonn

%O 1,4

%A _Enrique Navarrete_, Jan 26 2017

%E Name changed by _Robert Israel_, Aug 03 2020