OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..1996
Michael De Vlieger, Log log scatterplot of log_10 a(n), n = 2..2^18.
EXAMPLE
a(2) = 2, as a(1) = 1 and 1 times 2 is 2.
a(6) = 114, as a(3) = 6 = n, thus a(6) = a(5) - 6 = 114.
a(7) = 798, as a(6) = 114 and 7 times 114 is 798.
MATHEMATICA
nn = 120; c[_] := False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; j = 2; Do[k = If[c[n], If[And[! c[#], # >= 0], #, j + n] &[j - n], If[Divisible[j, n], j/n, j n]]; Set[{a[n], c[k], j}, {k, True, k}], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Aug 30 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Kelvin Voskuijl, Jul 07 2023
EXTENSIONS
More terms from Michael De Vlieger, Aug 30 2023
STATUS
approved