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-4 of 4 results.

A211217 Maximum of sigma(x) * sigma(y), where x + y = n.

Original entry on oeis.org

1, 3, 9, 12, 21, 28, 49, 48, 84, 72, 144, 96, 180, 156, 225, 195, 336, 234, 420, 364, 504, 360, 784, 432, 672, 672, 868, 576, 1092, 744, 1176, 936, 1209, 1008, 1680, 992, 1638, 1440, 1860, 1344, 2340, 1344, 2520, 1920, 2232, 1680, 3600, 1860, 3024, 2400
Offset: 2

Views

Author

Paolo P. Lava, Apr 05 2012

Keywords

Examples

			For n=83 the maximum product is reached when 35 and 48 (35+48=83) are considered: sigma(35)*sigma(48) = 48*124 = 5952.
For n=99 the maximum product is reached when 36 and 63 (36+63=99) are considered: sigma(36)*sigma(63) = 91*104 = 9464.
		

Crossrefs

Programs

  • Maple
    with(combstruct); with(numtheory);
    A211217:=proc(i)
    local a,b,j,n,t;
    for n from 2 to i do
      t:=0;
      for j from 0 to floor(n/2) do
        a:=n-j; b:=sigma(j)*sigma(a); if b>t then t:=b; fi;
      od;
      print(t);
    od; end:
    A211217(1000);
  • Mathematica
    a[n_] := Max[Times @@ DivisorSigma[1, #]& /@ IntegerPartitions[n, {2}]]; Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Dec 26 2013 *)

A211218 Maximum value of sigma(x) + sigma(y) + sigma(z), where x + y + z = n.

Original entry on oeis.org

3, 5, 7, 9, 11, 14, 16, 18, 20, 22, 25, 30, 32, 34, 36, 38, 41, 43, 44, 47, 47, 52, 57, 62, 64, 66, 68, 70, 73, 75, 76, 79, 80, 84, 89, 93, 95, 97, 99, 101, 104, 106, 107, 110, 110, 116, 121, 126, 128, 130, 132, 134, 137, 139, 140, 143
Offset: 3

Views

Author

Paolo P. Lava, Apr 05 2012

Keywords

Comments

Not monotonic: a(86) = 235 > 234 = a(87). - Charles R Greathouse IV, Apr 06 2012

Examples

			a(76) = sigma(4)+sigma(12)+sigma(60) = 7 + 28 + 168 = 203.
a(83) = sigma(1)+sigma(10)+sigma(72) = 1 + 18 + 195 = 214.
		

Crossrefs

Programs

  • Maple
    with(numtheory) :
    A211218 := proc(n)
            local x,y,z,mx ;
            mx := 0 ;
            for x from 1 to n do
                    for y from x do
                            z := n-x-y ;
                            if z < y then
                                    break;
                            end if;
                            mx := max(mx, sigma(x)+sigma(y)+sigma(z)) ;
                    end do:
            end do:
            mx ;
    end proc: # R. J. Mathar, Apr 05 2012
  • Mathematica
    a[n_] := Max[Plus @@ DivisorSigma[1, #]& /@ IntegerPartitions[n, {3}]]; Table[a[n], {n, 3, 100}] (* Jean-François Alcover, Dec 26 2013 *)
  • PARI
    v=vector(200);for(n=2,#v,best=sigma(n-1)+1;for(k=2,n\2, best=max(best,sigma(k)+sigma(n-k)));v[n]=best)
    u=vector(#v);for(n=3,#u,best=sigma(n-2)+v[2];for(k=2,n-3, best=max(best,sigma(k)+v[n-k]));u[n]=best)
    vecextract(u,"3..") \\ Charles R Greathouse IV, Apr 06 2012

Extensions

Rewritten by R. J. Mathar, Apr 05 2012

A211221 For any partition of n consider the product of the sigma of each element. Sequence gives the maximum of such values.

Original entry on oeis.org

1, 3, 4, 9, 12, 27, 36, 81, 108, 243, 324, 729, 972, 2187, 2916, 6561, 8748, 19683, 26244, 59049, 78732, 177147, 236196, 531441, 708588, 1594323, 2125764, 4782969, 6377292, 14348907, 19131876, 43046721, 57395628, 129140163, 172186884, 387420489, 516560652
Offset: 1

Views

Author

Paolo P. Lava, Apr 13 2012

Keywords

Examples

			For n=21 the partition (2,2,2,2,2,2,2,2,2,3) gives sigma(2)^9*sigma(3)=3^9*4=78732 that is the maximum value that can be reached.
		

Crossrefs

Programs

  • Maple
    with(numtheory); with(combinat);
    A211221:=proc(q)
    local b,c,i,j,k,m,n,t;
    for n from 1 to q do
      k:=partition(n); b:=numbpart(n); m:=0;
      for i from 1 to b do
        c:=nops(k[i]); t:=1;
        for j from 1 to c do t:=t*sigma(k[i][j]); od; if t>m then m:=t; fi; od;
      print(m);
    od; end:
    A211221(100)
  • Mathematica
    LinearRecurrence[{0,3},{1,3,4},40] (* Harvey P. Dale, Jun 06 2015 *)

Formula

For n>1, a(n) = 3^n/2 for n even and a(n) = 4*3^(n-3)/2 for n odd.
For n>3, a(n) = 3*a(n-2). G.f.: x*(1+3*x+x^2)/(1-3*x^2). [Colin Barker, Apr 18 2012]
Closed form: a(1)=1, then a(n) = 1/6*(7-(-1)^(n-2))*3^(1/4*(-1)^(n-2))*3^(1/2*(n-2))*27^(1/4) = 3^((2*n+(-1)^n-5)/4)*(7-(-1)^n)/2. [Paolo P. Lava, Apr 20 2012]

A211220 For any partition of n consider the sum of the sigma of each element. Sequence gives the maximum of such values.

Original entry on oeis.org

1, 3, 4, 7, 8, 12, 13, 15, 16, 19, 20, 28, 29, 31, 32, 35, 36, 40, 41, 43, 44, 47, 48, 60, 61, 63, 64, 67, 68, 72, 73, 75, 76, 79, 80, 91, 92, 94, 95, 98, 99, 103, 104, 106, 107, 110, 111, 124, 125, 127, 128, 131, 132, 136, 137, 139, 140, 143, 144, 168, 169
Offset: 1

Views

Author

Paolo P. Lava, Apr 11 2012

Keywords

Comments

For n equal to 1, 2, 3, 4, 6, 8, 12, 24, 30, 36, etc. the maximum value is equal to sigma(n).

Examples

			For n=10 the partition (4,6) gives sigma(4)+sigma(6)= 7 + 12 = 19 that is the maximum value that can be reached.
For n=21 the partitions (1,8,12), (3,6,12) and (1,2,6,12) give:
sigma(1)+sigma(8)+sigma(12)= 1 + 15 + 28 = 44;
sigma(3)+sigma(6)+sigma(12)= 4 + 12 + 28 = 44;
sigma(1)+sigma(2)+ sigma(6)+sigma(12)= 1 + 3 + 12 + 28 = 44
that is the maximum value that can be reached.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; `if`(n=0, 0, `if`(i<1,
          -infinity, max(seq(sigma(i)*j+b(n-i*j, i-1), j=0..n/i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=1..70);  # Alois P. Heinz, May 30 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 0, If[i<1, -Infinity, Max[Table[ DivisorSigma[1, i]*j + b[n-i*j, i-1], {j, 0, n/i}]]]]; a[n_] := b[n, n]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)

Extensions

Extended beyond a(47) by Alois P. Heinz, May 30 2013
Showing 1-4 of 4 results.