OFFSET
1,1
COMMENTS
EXAMPLE
PROG
(Magma) f:=func<n|&+[(-1)^c*c:c in Intseq(n)] eq 0>; a:=[112]; for n in [2..50] do k:=1; while k in a or not f(k) or not f(k*a[n-1]) do k:=k+1; end while; Append(~a, k); end for; a;
(PARI) isokd(n) = my(d=digits(n)); sum(k=1, #d, d[k]*(d[k] % 2)) == sum(k=1, #d, d[k]*(1-d[k]%2)); \\ A036301
nextk(va, n) = {my(ok = 0, k = 1); while (! (isokd(k) && isokd(k*va[n-1]) && !#select(x->(x==k), va)), k++); k; }
lista(nn) = {my(va = vector(nn)); va[1] = 112; for (n=2, nn, my(k = nextk(va, n)); va[n] = k; ); va; } \\ Michel Marcus, Jan 14 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Jan 12 2021
STATUS
approved