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.

Showing 1-5 of 5 results.

A305671 Most common value of sigma (A000203) among all composites (A073255) up to composite(n) = A002808(n) inclusive, or 0 if there is a tie.

Original entry on oeis.org

7, 0, 0, 0, 0, 0, 0, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Felix Fröhlich, Jun 08 2018

Keywords

Examples

			In the following table, column A lists the n-th composite and column B lists sigma(A(n)).
   n |  A |   B | a(n)
  ---------------------
   1 |  4 |   7 |  7
   2 |  6 |  12 |  0
   3 |  8 |  15 |  0
   4 |  9 |  13 |  0
   5 | 10 |  18 |  0
   6 | 12 |  28 |  0
   7 | 14 |  24 |  0
   8 | 15 |  24 | 24 <--- first time a value of sigma occurs twice
   9 | 16 |  31 | 24
  10 | 18 |  39 | 24
  11 | 20 |  42 | 24
  12 | 21 |  32 | 24
  13 | 22 |  36 | 24
  14 | 24 |  60 | 24
  15 | 25 |  31 |  0 <--- second time a value of sigma occurs twice
  16 | 26 |  42 |  0
  17 | 27 |  40 |  0
  18 | 28 |  56 |  0
  19 | 30 |  72 |  0
  20 | 32 |  63 |  0
  21 | 33 |  48 |  0
  22 | 34 |  54 |  0
  23 | 35 |  48 |  0
  24 | 36 |  91 |  0
  25 | 38 |  60 |  0
  26 | 39 |  56 |  0
  27 | 40 |  90 |  0
  28 | 42 |  96 |  0
  29 | 44 |  84 |  0
  30 | 45 |  78 |  0
  31 | 46 |  72 |  0
  32 | 48 | 124 |  0
  33 | 49 |  57 |  0
  34 | 50 |  93 |  0
  35 | 51 |  72 | 72 <--- first time a value of sigma occurs three times
  36 | 52 |  98 | 72
  37 | 54 | 120 | 72
  38 | 55 |  72 | 72 <--- fourth occurrence of the value 72
  39 | 56 | 120 | 72
  40 | 57 |  80 | 72
  41 | 58 |  90 | 72
  42 | 60 | 168 | 72
  43 | 62 |  96 | 72
  44 | 63 | 104 | 72
  45 | 64 | 127 | 72
  46 | 65 |  84 | 72
  47 | 66 | 144 | 72
  48 | 68 | 126 | 72
  49 | 69 |  96 | 72
  50 | 70 | 144 | 72
  51 | 72 | 195 | 72
  52 | 74 | 114 | 72
  53 | 75 | 124 | 72
  54 | 76 | 140 | 72
  55 | 77 |  96 |  0 <--- another value apart from 72 occurs four times
  56 | 78 | 168 |  0
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    cmax:= 3*N: Counts:= Vector(cmax):
    i:= 0:
    for n from 4 do
      if isprime(n) then next fi;
      i:= i+1;
      if i > N then break fi;
      s:= numtheory:-sigma(n);
      if s > cmax then cmax:= s; Counts(s):= 1;
      else Counts[s]:= Counts[s]+1;
      fi;
      vmax:= max[index](Counts):
      if max(Counts[1..vmax-1]) = Counts[vmax] or max(Counts[vmax+1..-1])=Counts[vmax] then A[i]:= 0 else A[i]:= vmax fi
    od:
    seq(A[i],i=1..N); # Robert Israel, Jun 12 2018
  • Mathematica
    Block[{c = Select[Range@ 120, CompositeQ], s}, s = DivisorSigma[1, c]; Array[If[Length@ # == 1, #[[1, 1]], 0] &@ Last@ SplitBy[SortBy[Tally@ Take[s, #], Last], Last] &, Length@ s]] (* Michael De Vlieger, Jun 14 2018 *)
  • PARI
    add_sigma(vec, val) = if(val > #vec, vec=concat(vec, vector(val-#vec))); vec[val]++; vec
    max_pos(vec) = if(#setintersect(vecsort(vec), vector(#vec, t, vecmax(vec))) > 1, return(0), for(k=1, #vec, if(vec[k]==vecmax(vec), return(k))))
    terms(n) = my(sig=[], i=0); forcomposite(c=1, , sig=add_sigma(sig, sigma(c)); print1(max_pos(sig), ", "); i++; if(i==n, break))
    terms(100) \\ Print initial 100 terms of the sequence

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

Original entry on oeis.org

1, 8, 35, 88, 162, 225, 363, 386, 427, 508, 998, 1633, 1901, 3091, 4816, 5905, 6179, 6297, 6674, 7221, 7293, 7715, 13100, 13130, 13238, 14927, 15012, 15520, 22413, 32219, 39561, 79864, 148622, 175500, 274750, 402174
Offset: 1

Views

Author

Felix Fröhlich, Jun 08 2018

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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)

A305673 Indices i where a run of zeros starts in A305671.

Original entry on oeis.org

2, 15, 55, 108, 195, 256, 370, 419, 437, 782, 1616, 1857, 3055, 4806, 5851, 6142, 6275, 6487, 7161, 7278, 7591, 13041, 13122, 13179, 14904, 14979, 15451, 21767, 32056, 39478, 79649, 148518, 174716, 273952, 400581
Offset: 1

Views

Author

Felix Fröhlich, Jun 08 2018

Keywords

Comments

Numbers i such that A305671(i) = 0 and A305671(i-1) != 0.

Crossrefs

Programs

  • Mathematica
    Block[{c = Select[Range[10^3], CompositeQ], s}, s = DivisorSigma[1, c]; Select[SplitBy[Partition[Position[Array[If[Length@ # == 1, #[[1, 1]], 0] &@ Last@ SplitBy[SortBy[Tally@ Take[s, #], Last], Last] &, Length@ s], 0][[All, 1]], 2, 1], Differences], Length@ # > 1 &][[All, 1, 1]]] (* Michael De Vlieger, Jun 14 2018 *)
  • PARI
    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]))
    my(v=[], i=1, t=0); forcomposite(c=1, , v=concat(v, [sigma(c)]); if(mcv(v)==0, if(t==0, print1(i, ", ")); t++, t=0); i++)

Extensions

More terms from Michael De Vlieger, Jun 14 2018

A305675 Run lengths of successive equal terms in A305671.

Original entry on oeis.org

1, 6, 7, 20, 20, 33, 20, 54, 33, 30, 31, 107, 7, 16, 33, 8, 10, 71, 274, 216, 618, 17, 224, 44, 1154, 36, 1715, 10, 1035, 54, 237, 37, 96, 22, 190, 187, 487, 60, 57, 15, 298, 124, 5326, 59, 22, 8, 49, 59, 1666, 23, 52, 33, 439, 69, 6247, 646, 9643, 163, 7259
Offset: 1

Views

Author

Felix Fröhlich, Jun 08 2018

Keywords

Comments

First differences of A305672 UNION A305673.

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    composite(n) = my(i=0); forcomposite(c=1, , i++; if(i==n, return(c)))
    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]))
    a305671(n) = my(v=[]); for(k=1, n, v=concat(v, sigma(composite(k)))); mcv(v)
    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))
    terms(20) \\ Print initial 20 terms of the sequence

A305674 Indices i such that A305671(i) != A305671(i-1).

Original entry on oeis.org

2, 8, 15, 35, 55, 88, 108, 162, 195, 225, 256, 363, 370, 386, 419, 427, 437, 508, 782, 998, 1616, 1633, 1857, 1901, 3055, 3091, 4806, 4816, 5851, 5905, 6142, 6179, 6275, 6297, 6487, 6674, 7161, 7221, 7278, 7293, 7591, 7715, 13041, 13100, 13122, 13130, 13179
Offset: 1

Views

Author

Felix Fröhlich, Jun 08 2018

Keywords

Crossrefs

Programs

Showing 1-5 of 5 results.