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.

A095113 a(1)=1. a(n) is the sum of n/d over all divisors d of n which are among a(1), ..., a(n-1).

Original entry on oeis.org

1, 2, 3, 6, 5, 12, 7, 12, 12, 17, 11, 25, 13, 23, 23, 24, 18, 37, 19, 34, 31, 35, 24, 51, 31, 41, 36, 46, 29, 66, 32, 49, 47, 54, 48, 78, 38, 60, 55, 68, 42, 91, 43, 70, 69, 72, 48, 103, 57, 87, 72, 82, 53, 112, 72, 92, 80, 89, 59, 138, 61, 95, 93, 98, 83, 139, 67, 109, 96, 132
Offset: 1

Views

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Examples

			The divisors of 8 are 1, 2, 4 and 8, of which only 1 and 2 occur among a(1), ..., a(7), so a(8) = 8/1 + 8/2 = 12.
		

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=Module[{as=a/@Range[n-1]}, Plus@@(If[MemberQ[as, # ], n/#, 0]& /@ Divisors[n])]
    Fold[Append[#1, Total[#2/Intersection[Divisors[#2], #1]]] &, {1}, Range[2, 70]] (* Ivan Neretin, Jun 20 2019 *)