login
Indices i where a run of nonzero values starts in A305671.
5

%I #16 Aug 04 2018 14:44:45

%S 1,8,35,88,162,225,363,386,427,508,998,1633,1901,3091,4816,5905,6179,

%T 6297,6674,7221,7293,7715,13100,13130,13238,14927,15012,15520,22413,

%U 32219,39561,79864,148622,175500,274750,402174

%N Indices i where a run of nonzero values starts in A305671.

%C For n > 1, numbers i such that A305671(i) != 0 and A305671(i-1) = 0.

%t Block[{c = Select[Range[10^4], CompositeQ], s}, s = DivisorSigma[1, c]; Prepend[1 + Accumulate[Total /@ #], #[[1, 1]]] &@ Partition[Length /@ SplitBy[#, # == 0 &], 2, 2] &@ Array[If[Length@ # == 1, #[[1, 1]], 0] &@ Last@ SplitBy[SortBy[Tally@ Take[s, #], Last], Last] &, Length@ s]] (* _Michael De Vlieger_, Jul 21 2018 *)

%o (PARI) my(v=[], i=0, b=0, idx=1); forcomposite(c=1, , my(sig=sigma(c)); if(#v < sig, v=concat(v, vector(sig-#v))); v[sig]++; for(k=1, #v, if(v[k]==vecmax(v), i++)); if(i < 2, if(b==0, print1(idx, ", "); b=1)); if(i > 1, b=0); idx++; i=0)

%Y Cf. A305671, A305673, A305674, A305675, A305676.

%K nonn,more

%O 1,2

%A _Felix Fröhlich_, Jun 08 2018