login
A364188
The sum of the digits present in a(n) and a(n+1) divides exactly the product of the same digits. This is the lexicographically earliest sequence of distinct positive terms with this property.
4
1, 10, 2, 13, 8, 19, 5, 14, 12, 3, 6, 17, 20, 4, 15, 9, 18, 16, 7, 25, 21, 30, 11, 24, 28, 33, 40, 22, 26, 31, 23, 27, 32, 34, 29, 37, 38, 41, 43, 35, 44, 50, 36, 45, 47, 46, 42, 39, 48, 53, 52, 49, 56, 54, 60, 51, 63, 57, 58, 61, 65, 59, 64, 55, 68, 70, 62, 67, 69, 66, 72, 80, 71, 76, 74, 73, 83, 79, 84
OFFSET
1,2
LINKS
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