OFFSET
1,2
COMMENTS
1 appears 3 times and 2 appears 2 times, all other numbers are conjectured to appear infinitely many times. The first occurrence of an odd prime is followed by 3, see Example, and the order of first appearances of primes starts: 2,5,3,7,11,19,23,13.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..16384
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, May 28 2025
EXTENSIONS
More terms from Alois P. Heinz, Jun 01 2025
STATUS
approved
