OFFSET
1,2
COMMENTS
The decimal representation of the sum and the product of any 2 successive terms has the same set of distinct digits.
EXAMPLE
a(8) = 669, then a(9) = 83 because 83 is the least positive integer not appearing in the sequence such that 83 + 669 = 752 and 83 * 669 = 55527 have the same set of distinct digits {2, 5, 7}.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(k=1; While[MemberQ[Array[a, n-1], k]||Union@IntegerDigits[a[n-1]+k]!=Union@IntegerDigits[a[n-1]*k], k++]; k); Array[a, 70]
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
an, aset = 1, {1}
while True:
yield an
an = next(k for k in count(2) if k not in aset and set(str(an+k)) == set(str(an*k)))
aset.add(an)
print(list(islice(agen(), 66))) # Michael S. Branicky, Apr 03 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Giorgos Kalogeropoulos, Apr 03 2024
STATUS
approved