OFFSET
1,2
LINKS
Eric Angelini, SuperSums, SuperProducts, personal blog.
EXAMPLE
digitsum a(1) + digitsum a(2) = 1 + 1 + 0 = 2 and 2 divides 1 * 10 = 10 (result = 5);
digitsum a(2) + digitsum a(3) = 1 + 0 + 4 = 5 and 5 divides 10 * 4 = 40 (result = 8);
digitsum a(3) + digitsum a(4) = 4 + 1 + 5 = 10 and 10 divides 4 * 15 = 60 (result = 6);
digitsum a(4) + digitsum a(5) = 1 + 5 + 3 = 9 and 9 divides 15 * 3 = 45 (result = 5);
digitsum a(5) + digitsum a(6) = 3 + 6 = 9 and 9 divides 3 * 6 = 18 (result = 2); etc.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(k=1; While[MemberQ[Array[a, n-1], k]||Mod[a[n-1]*k, Total[Join[IntegerDigits@a[n-1], IntegerDigits@k]]]!=0, k++]; k)
Array[a, 60] (* Giorgos Kalogeropoulos, Jul 14 2023 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Jul 12 2023
STATUS
approved