OFFSET
1,2
COMMENTS
LINKS
Zizheng Fang, Table of n, a(n) for n = 1..10000
Zizheng Fang, Python program to generate A331828
EXAMPLE
1: divisors -- 1;
2: divisors -- 1, 2 = 1 + 1;
4: divisors -- 1, 2 = 1 + 1, 4 = 2 + 2;
6: divisors -- 1, 2 = 1 + 1, 3 = 1 + 2, 6 = 3 + 3;
8: divisors -- 1, 2 = 1 + 1, 4 = 2 + 2, 8 = 4 + 4;
12: divisors -- 1, 2 = 1 + 1, 3 = 1 + 2, 4 = 1 + 3, 6 = 2 + 4, 12 = 6 + 6.
MAPLE
q:= n-> (s-> andmap(x-> x=1 or ormap(y-> y<x and
x-y in s, s), s))(numtheory[divisors](n)):
select(q, [$1..500])[]; # Alois P. Heinz, Jan 30 2020
PROG
(PARI) isokd(k, d) = {for (j=1, k-1, if (vecsearch(d, d[k] - d[j]), return (1)); ); return (0); }
isok(k) = {my(d=divisors(k)); for (j=2, #d, if (! isokd(j, d), return(0)); ); return (1); } \\ Michel Marcus, Jan 30 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Zizheng Fang, Jan 27 2020
STATUS
approved