OFFSET
1,2
LINKS
Eric Angelini, SuperSums, SuperProducts, personal blog.
EXAMPLE
digitsum a(1) + digitsum a(2) = 1 + 1 + 0 = 2 and 2 divides exactly 1 * 1 * 0 = 0;
digitsum a(2) + digitsum a(3) = 1 + 0 + 2 = 3 and 3 divides exactly 1 * 0 * 2 = 0;
digitsum a(3) + digitsum a(4) = 2 + 1 + 3 = 6 and 6 divides exactly 2 * 1 * 3 = 6;
digitsum a(4) + digitsum a(5) = 1 + 3 + 8 = 12 and 12 divides exactly 1 * 3 * 8 = 24; etc.
PROG
(PARI) {first(N, U=[], P(x)=vecprod(digits(x)), a)=vector(N, n, a=if(n>1, U=setunion(U, [a]); while(#U>1&&U[1]+1==U[2], U=U[^1]); my(s=sumdigits(a), p=P(a), k=U[1]); while(setsearch(U, k++) || P(k)*p%(sumdigits(k)+s), ); k, 1))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and M. F. Hasler, Jul 12 2023
STATUS
approved