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.

A353199 a(1)=a(2)=1. a(n) = the sum of the indices of the terms, from among the first (n-2) terms of the sequence, which divide a(n-1).

Original entry on oeis.org

1, 1, 1, 3, 6, 10, 6, 15, 10, 12, 22, 6, 22, 17, 6, 34, 20, 21, 10, 21, 28, 6, 49, 6, 71, 6, 95, 6, 121, 6, 149, 6, 179, 6, 211, 6, 245, 29, 6, 281, 6, 320, 57, 10, 40, 101, 6, 361, 6, 408, 497, 31, 6, 457, 6, 510, 681, 10, 84, 634, 6, 565, 6, 626, 6, 689, 6, 754, 44, 30, 965
Offset: 1

Views

Author

Eric Fox, Apr 30 2022

Keywords

Examples

			a(10) = 12. Of the terms before that, a(1), a(2), a(3), a(4), a(5), and a(7) divide 12. Hence, a(11) = 1+2+3+4+5+7 = 22.
		

Crossrefs

Cf. A124063.

Programs

  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = Total[Select[Range[n - 2], Divisible[a[n - 1], a[#]] &]]; Array[a, 100] (* Amiram Eldar, Apr 30 2022 *)
  • PARI
    first(n) = { n = max(n, 2); res = List([1,1]); for(i = 3, n, v = Vec(select(x->res[#res]%x == 0, res, 1))[^-1]; listput(res, vecsum(v)) ); res } \\ David A. Corneth, Apr 30 2022