OFFSET
1,1
COMMENTS
The definition "a(1)=1; for n > 1, a(n) is the largest number <= 2*a(n-1) divisible by n" produces the natural numbers 1,2,3,4,5,... (A000027).
EXAMPLE
2*36=72. But 72 is not a multiple of 7, so we must look for the largest multiple of 7 <= 72, and this is 70.
MAPLE
A178901 := proc(n) option remember; if n =1 then 2; else for a from 2*procname(n-1) by -1 do if a mod n = 0 then return a; end if; end do: end if; end proc: seq(A178901(n), n=1..30) ; # R. J. Mathar, Jun 26 2010
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = n*(2*va[n-1]\n); ); va; } \\ Michel Marcus, Dec 18 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Lowell, Jun 21 2010
EXTENSIONS
a(8)-a(32) from Robert G. Wilson v and John W. Layman, Jun 28 2010
STATUS
approved