OFFSET
2,1
COMMENTS
LINKS
Peter McGavin, Table of n, a(n) for n = 2..1000
EXAMPLE
In A002182, hcn(5),hcn(6),hcn(7) = 12,24,36.
We have hcn(6) = 2 * hcn(5), therefore a(6) = 2.
hcn(6) is not a divisor of hcn(7), but hcn(7) = 3 * hcn(5), therefore a(7) = 3.
MAPLE
# Uses "http://oeis.org/wiki/User:R._J._Mathar/transforms3" to read a b-file
read("transforms3");
hcn:=BFILETOLIST("b002182.txt"):
a:=[]:
for i from 2 to nops(hcn) do \
j := i - 1: \
while (j > 0 and hcn[i] mod hcn[j] <> 0) do \
j := j - 1:
end do: \
a := [op(a), hcn[i] / hcn[j]]: \
end do:
a;
# Peter McGavin, Mar 15 2015
PROG
(C)
/* program fragment */
/* All variables are int */
/* Given the sequence A002182 already is in hcn[0..n-1] */
for (i = 1; i < n; i++) {
for (j = i - 1; j >= 0 && hcn[i] % hcn[j] != 0; --j)
/* do nothing */ ;
printf (", %d", hcn[i] / hcn[j]);
}
/* Peter McGavin, Mar 10 2015 */
(PARI) lista(nn) = {v = readvec("c:/gp/bfiles/b002182.txt"); for (n=2, nn, k = 0; for (i=1, n-1, if (type(kv = v[n]/v[i]) == "t_INT", if (k==0, k = kv, k = min(k, kv)); ); ); print1(k, ", "); ); } \\ Michel Marcus, Mar 11 2015
(Python)
from sympy import divisor_count
for i in range(1, 10**6):
....d = divisor_count(i)
....if d > m:
........m = d
........A002182_list.append(i)
........for j in range(count-1, -1, -1):
............q, r = divmod(i, A002182_list[j])
............if not r:
................A255911_list.append(q)
................break
........count += 1 # Chai Wah Wu, Mar 23 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter McGavin, Mar 10 2015
STATUS
approved