cp's OEIS Frontend

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.

A305675 Run lengths of successive equal terms in A305671.

This page as a plain text file.
%I A305675 #9 Aug 04 2018 14:45:13
%S A305675 1,6,7,20,20,33,20,54,33,30,31,107,7,16,33,8,10,71,274,216,618,17,224,
%T A305675 44,1154,36,1715,10,1035,54,237,37,96,22,190,187,487,60,57,15,298,124,
%U A305675 5326,59,22,8,49,59,1666,23,52,33,439,69,6247,646,9643,163,7259
%N A305675 Run lengths of successive equal terms in A305671.
%C A305675 First differences of A305672 UNION A305673.
%t A305675 Block[{c = Select[Range[10^4], CompositeQ], s}, s = DivisorSigma[1, c]; Most[Length /@ SplitBy[#, # == 0 &]] &@ Array[If[Length@ # == 1, #[[1, 1]], 0] &@ Last@ SplitBy[SortBy[Tally@ Take[s, #], Last], Last] &, Length@ s]] (* _Michael De Vlieger_, Jul 22 2018 *)
%o A305675 (PARI) composite(n) = my(i=0); forcomposite(c=1, , i++; if(i==n, return(c)))
%o A305675 mcv(v) = my(w=vecsort(v, , 8), count=vector(#w), ind=0, i=0); for(x=1, #w, for(y=1, #v, if(w[x]==v[y], count[x]++))); for(k=1, #count, if(count[k]==vecmax(count), ind=k; i++)); if(i > 1, return(0), return(w[ind]))
%o A305675 a305671(n) = my(v=[]); for(k=1, n, v=concat(v, sigma(composite(k)))); mcv(v)
%o A305675 terms(n) = my(i=0, j=1); for(k=1, oo, if(a305671(k)==a305671(k+1), j++, if(j > 0, print1(j, ", "); i++; j=1)); if(i==n, break))
%o A305675 terms(20) \\ Print initial 20 terms of the sequence
%Y A305675 Cf. A305671, A305672, A305673, A305674, A305676.
%K A305675 nonn
%O A305675 1,2
%A A305675 _Felix Fröhlich_, Jun 08 2018