OFFSET
1,2
COMMENTS
See A244672(n) - partial sums of a(n).
FORMULA
A244672(a(n)) / a(n) = integer.
EXAMPLE
a(1) = 1 because 1 divides the first term (1/1=1); a(2) cannot be 2 because 2 does not divide the sum of the first 2 terms (3/2 is not integer), a(2) must be 3; if a(2) = 3 then a(3) must be 5 (5 is the smallest number > a(2) such that the sum of the first 3 terms (i.e. 9) is divisible by a(2) = 3; if a(4) = 6 (holds 6 > a(3)), a(5) must be 10 (10 is the smallest number > a(4) such that the sum of first 5 terms (i.e. 25) is divisible by a(3) = 5; etc…
MAPLE
N:= 1000: # to get the first N terms
A:= {1, 3}: s:= 4:
for n from 3 to N do
if member(n, A, 'p') then
r:= A[n-1]+1 + (-s-A[n-1]-1 mod A[p])
else
r:= A[n-1]+1
fi;
A:= A union {r};
s:= s + r;
od:
A; # Robert Israel, Jul 06 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Jul 04 2014
STATUS
approved