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 A329747 #10 Jan 20 2025 22:52:07 %S A329747 0,0,0,1,0,2,0,1,1,2,0,3,0,2,2,1,0,3,0,3,2,2,0,3,1,2,1,3,0,2,0,1,2,2, %T A329747 2,2,0,2,2,3,0,2,0,3,3,2,0,3,1,3,2,3,0,3,2,3,2,2,0,4,0,2,3,1,2,2,0,3, %U A329747 2,2,0,3,0,2,3,3,2,2,0,3,1,2,0,4,2,2,2,3,0,3,2,3,2,2,2,3,0,3,3,2,0,2,0,3,2,2,0,3,0,2,2,3,0,2,2,3,3,2,2,4 %N A329747 Runs-resistance of the sequence of prime indices of n. %C A329747 First differs from A304455 at a(90) = 3, A304455(90) = 4. %C A329747 For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton. %C A329747 A prime index of n is a number m such that prime(m) divides n. The sequence of prime indices of n is row n of A112798. %H A329747 Antti Karttunen, <a href="/A329747/b329747.txt">Table of n, a(n) for n = 1..65537</a> %H A329747 Claude Lenormand, <a href="/A318921/a318921.pdf">Deux transformations sur les mots</a>, Preprint, 5 pages, Nov 17 2003. %H A329747 <a href="/index/Pri#prime_indices">Index entries for sequences related to prime indices in the factorization of n</a>. %e A329747 We have (1,2,2,3) -> (1,2,1) -> (1,1,1) -> (3), so a(90) = 3. %t A329747 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; %t A329747 runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1; %t A329747 Table[runsres[primeMS[n]],{n,50}] %o A329747 (PARI) %o A329747 pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); }; %o A329747 runlengths(lista) = if(!#lista, lista, if(1==#lista, List([1]), my(runs=List([]), rl=1); for(i=1, #lista, if((i< #lista) && (lista[i]==lista[i+1]), rl++, listput(runs,rl); rl=1)); (runs))); %o A329747 A329747(n) = { my(runs=pis_to_runs(n)); for(i=0,oo,if(#runs<=1, return(i), runs = runlengths(runs))); }; \\ _Antti Karttunen_, Jan 20 2025 %Y A329747 The version for partitions is A329746. %Y A329747 The version for compositions is A329744. %Y A329747 The version for binary words is A329767. %Y A329747 The version for binary expansion is A318928. %Y A329747 Cf. A008578 (positions of 0's), A056239, A112798, A329745, A329750. %K A329747 nonn %O A329747 1,6 %A A329747 _Gus Wiseman_, Nov 21 2019 %E A329747 More terms from _Antti Karttunen_, Jan 20 2025