OFFSET
1,2
COMMENTS
Start the sequence with a(1)=1 and always extend it with the smallest integer not yet present in the sequence that does not lead to a contradiction.
It is conjectured that this sequence is a permutation of the nonnegative numbers.
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..13981
EXAMPLE
a(1) = 1.
a(2) = 2 because (1+2) is a divisor of 12 (as 12/3 = 4).
The next term can't be "3" as (2+3)=5 and 5 is not a divisor of 23.
The next term is 4 because (2+4) is a divisor of 24 (as 24/6 = 4).
The next term can't be "3" as (4+3)=7 and 7 is not a divisor of 43.
The next term is 5 because (4+5) is a divisor of 45 (as 45/9 = 5).
The next term still can't be "3" as (5+3)=8 and 8 is not a divisor of 53.
The next term can't be "6" as (5+6)=11 and 11 is not a divisor of 56.
The next term can't be "7" as (5+7)=12 and 12 is not a divisor of 57.
The next term can't be "8" as (5+8)=13 and 13 is not a divisor of 58.
The next term can't be "9" as (5+9)=14 and 14 is not a divisor of 59.
The next term is 10 because (5+1) is a divisor of 510 (as 510/6 = 85).
Etc.
MATHEMATICA
a[1] = 1; a[2] = 2; a[n_] := a[n] = Catch[With[{arr = Array[a, n - 1]}, Do[If[! MemberQ[arr, k] && Divisible[FromDigits[Join[IntegerDigits[a[n - 1]], IntegerDigits[k]]], IntegerDigits[a[n - 1]][[-1]] + IntegerDigits[k][[1]]], Throw[k]], {k, Infinity}]]]; Array[a, 50] (* JungHwan Min, Jul 29 2016 *)
a = {1}; Do[k = 1; While[Or[MemberQ[a, k], ! Divisible[FromDigits@ Flatten@ #, #[[1, -1]] + #[[-1, 1]]] &@ IntegerDigits@ {a[[n - 1]], k}], k++]; AppendTo[a, k], {n, 2, 120}]; a (* Michael De Vlieger, Jul 31 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Jul 29 2016
STATUS
approved