A384336 a(1) = 1, a(2) = 2. For n > 2, a(n) = number of a(k), k = 1..n-2 such that a(k) divides a(n-1).
1, 2, 1, 1, 2, 4, 5, 3, 3, 4, 6, 7, 3, 5, 4, 7, 4, 8, 9, 6, 9, 7, 5, 5, 6, 10, 9, 8, 10, 10, 11, 3, 6, 12, 17, 3, 7, 6, 14, 9, 11, 4, 9, 12, 21, 12, 22, 7, 7, 8, 12, 23, 3, 8, 13, 3, 9, 15, 14, 12, 26, 6, 17, 4, 10, 12, 29, 3, 10, 13, 4, 11, 5, 7, 9, 17, 5, 8
Offset: 1
Keywords
Examples
Since a(1) = 1, and a(2) = 2, a(3) must be 1 since there is only one term (a(1) = 1) which is a divisor of 2. Then a(4) = 1 because a(1) = 1 is the only prior divisor of a(3) = 1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..16384
Crossrefs
Cf. A000005.
Programs
-
Maple
a:= proc(n) option remember; `if`(n<3, n, add( `if`(irem(a(n-1), a(j))=0, 1, 0), j=1..n-2)) end: seq(a(n), n=1..100); # Alois P. Heinz, Jun 01 2025
-
Mathematica
nn = 120; Array[Set[a[#], #] &, 2]; j = 2; Do[k = Count[Array[a, n - 2], ?(Divisible[j, #] &)]; Set[{a[n], j}, {k, k}], {n, 3, nn}]; Array[a, nn] (* _Michael De Vlieger, Jun 01 2025 *)
Extensions
More terms from Alois P. Heinz, Jun 01 2025
Comments