OFFSET
1,1
COMMENTS
(a(n+1)+a(n+2))/a(n) gives the sequence 4, 4, 3, 3, 4, 3, 3, 4, 3, 4, 4, 4, 3, 3, 4, 3, 4, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 4, 3, 4, 3, 3, 4, 4, 4, 4, 3, 3, 4, 3, 4, 3, 3, 3, 4, 3, ...
LINKS
Robert Israel, Table of n, a(n) for n = 1..6866
EXAMPLE
a(7)=19; a(8)=20. 37 is the smallest number, larger than 20, that can be added to 20 and the result (57) is divisible by 19. So, a(9)=37.
MAPLE
A[1]:= 2: A[2]:= 3:
for n from 3 to 50 do
k:= -A[n-1] mod A[n-2];
A[n]:= k + A[n-2]*(1+floor((A[n-1]-k)/A[n-2]));
od:
seq(A[i], i=1..50); # Robert Israel, Oct 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ali Sada, Oct 26 2019
STATUS
approved