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.

A117552 Largest partial sum of the increasingly ordered divisors of n, not exceeding n.

Original entry on oeis.org

1, 1, 1, 3, 1, 6, 1, 7, 4, 8, 1, 10, 1, 10, 9, 15, 1, 12, 1, 12, 11, 14, 1, 24, 6, 16, 13, 28, 1, 27, 1, 31, 15, 20, 13, 25, 1, 22, 17, 30, 1, 33, 1, 40, 33, 26, 1, 36, 8, 43, 21, 46, 1, 39, 17, 36, 23, 32, 1, 58, 1, 34, 41, 63, 19, 45, 1, 58, 27, 39, 1, 63, 1, 40, 49, 64, 19, 51, 1, 66
Offset: 1

Views

Author

Leroy Quet, Mar 28 2006

Keywords

Examples

			a(12)=10 because the increasingly ordered divisors of 12 are 1,2,3,4,6 and 12, with partial sums 1,3,6,10,16 and 28; the largest partial sum not exceeding 12 is 10.
		

Crossrefs

Cf. A117553, A109883, A377247 (corresponding largest divisor index).

Programs

  • Maple
    with(numtheory): a:=proc(n) local div,j: if n=1 then 1 else div:=divisors(n): for j from 1 by 1 while sum(div[i],i=1..j)<=n do sum(div[k],k=1..j) od: fi: end: seq(a(n),n=1..90); # Emeric Deutsch, Apr 01 2006
  • Mathematica
    Table[Last@ TakeWhile[Accumulate@ Divisors@ n, # <= n &], {n, 80}] (* Michael De Vlieger, Oct 30 2017 *)
  • PARI
    A117552(n) = { my(divs=divisors(n), s=0); for(i=1,#divs,if((s+divs[i])>n,return(s),s+=divs[i])); s; }; \\ Antti Karttunen, Oct 30 2017

Formula

a(n) = n - A109883(n). - Ridouane Oudra, Jan 25 2024

Extensions

More terms from Emeric Deutsch, Apr 01 2006