OFFSET
1,3
COMMENTS
Subsequence of A343376.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..100
Michael De Vlieger, Annotated log-log scatterplot of A343376(n) for 1..120 indicating n in this sequence in red.
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):
map(x-> a(x+1), select(q, [$1..300]))[]; # 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, 300}]; a[[b + 2]] ] (* 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(va[k]/k, ", ")); ); } \\ Michel Marcus, Apr 20 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Timothy L. Tiffin, Apr 15 2021
STATUS
approved