OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
EXAMPLE
MAPLE
a:= proc(n) option remember; local q; `if`(n<2, n,
`if`(irem(a(n-1), n-1, 'q')=0, q, a(n-1)+a(n-2)))
end:
q:= n-> is(a(n+1)=a(n)/n):
select(q, [$1..2000])[]; # Alois P. Heinz, Apr 23 2021
MATHEMATICA
Block[{a = {0, 1}, b = {}}, Do[If[Mod[#, i] == 0, AppendTo[a, #/i]; AppendTo[b, i], AppendTo[a, # + a[[-2]] ]] &@ a[[-1]], {i, 2^11}]; b] (* Michael De Vlieger, Apr 22 2021 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, if (va[n-1] % (n-1), va[n] = va[n-1] + va[n-2], va[n] = va[n-1]/(n-1)); ); va; } \\ A343376
listk(nn) = {my(va = lista(nn)); for (k=1, nn-1, if (va[k]/k == va[k+1], print1(k, ", ")); ); } \\ Michel Marcus, Apr 20 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Timothy L. Tiffin, Apr 15 2021
EXTENSIONS
More terms from Michel Marcus, Apr 20 2021
STATUS
approved