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.

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