This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A302566 #53 Apr 02 2024 14:33:58 %S A302566 1,2,10,22,11,20,13,24,3,4,23,14,30,41,32,40,31,42,33,44,35,46,5,6,15, %T A302566 26,45,16,25,36,50,61,52,60,51,62,53,64,55,63,54,66,57,68,7,8,17,28, %U A302566 37,18,27,38,47,58,67,48,70,81,72,80,71,82,73,84,75,83,74,85,76,88,77,86,79,108,9,78,19,87 %N A302566 a(n) is the least positive integer not yet in the sequence in which the largest digit of a(n-2) appears among its digits, and a(n) cannot share digits with a(n-1); a(1) = 1, a(2) = 2. %C A302566 The only pairs of consecutive numbers are 1, 2; 3, 4; 5, 6; 7, 8. %C A302566 The 2-digit numbers that are not in the sequence are 12, 21, 34, 43, 56, 65, 89, 98 (78 and 87 do appear at n = 76 and n = 78, respectively). %C A302566 The last 2-digit number to appear is 91 at n = 113. %C A302566 Starting from a(73) = 79, the first term of alternating terms must contain 9, and the second term must contain 8. %C A302566 If the initial terms of this sequence are swapped (by defining a(1)=2 and a(2)=1) then the resulting sequence is identical to this for n>12. - _R. J. Cano_, Apr 13 2018 %H A302566 Rémy Sigrist, <a href="/A302566/a302566.gp.txt">PARI program for A302566</a> %H A302566 R. J. Cano, <a href="/A302566/a302566_3.txt">Sequencer program in PARI</a> %e A302566 a(4) = 22 since it contains the largest digit from a(2) = 2, and can't be 12 since the digit 1 appears in a(3) = 10. %t A302566 Nest[Append[#, Block[{k = 2, d}, While[Nand[FreeQ[#[[All, 1]], k], MemberQ[Set[d, IntegerDigits[k]], Max[#[[-2, -1]] ] ], ! IntersectingQ[d, #[[-1, -1]]] ], k++]; {k, d}]] &, Transpose@ {#, IntegerDigits@ #} &@ Range[2], 73][[All, 1]] (* _Michael De Vlieger_, Apr 12 2018 *) %o A302566 (PARI) \\ See Links section. %Y A302566 Cf. A011531-A011540, A300907. %K A302566 nonn,base %O A302566 1,2 %A A302566 _Enrique Navarrete_, Apr 09 2018