OFFSET
0,2
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 0..20000
EXAMPLE
Among terms a(0) through a(5) there are two terms that divide 6: a(0)=1, a(1)=2. So a(6) = a(5) + 2 = 12.
MAPLE
A123886 := proc(maxn) local a, nexta, n, i ; a := [1] ; for n from 2 to maxn do nexta := op(n-1, a) ; for i from 1 to n-1 do if (n-1) mod op(i, a) = 0 then nexta := nexta +1 ; fi ; od ; a := [op(a), nexta] ; od ; RETURN(a) ; end: maxn := 100 : alist := A123886(maxn) : for i from 1 to maxn do printf("%d, ", op(i, alist)) ; end : # R. J. Mathar, Oct 21 2006
MATHEMATICA
f[l_List] := Append[l, Last[l] + Length[Select[l, Mod[Length[l], # ] == 0 &]]]; Nest[f, {1}, 63] (* Ray Chandler, Oct 19 2006 *)
PROG
(Python)
a, an, la = [1], 1, 1
print(la-1, an)
while la < 63:
....dc, di = 0, 0
....while di < la:
........if la%a[di] == 0:
............dc = dc+1
........di = di+1
....an = an+dc
....la, a = la+1, a+[an]
....print(la-1, an) # A.H.M. Smeets, Jan 25 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Oct 17 2006
EXTENSIONS
Extended by Ray Chandler, Oct 19 2006
More terms from R. J. Mathar, Oct 21 2006
STATUS
approved