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 A097500 #15 Dec 18 2015 11:54:48 %S A097500 3691,2,1,5,182,124,27303336394,245,4,8,515,457,606366697,275,7,88, %T A097500 184,879093969910,2105,10,811,11,14,1171,20,1231,26,1291,32,13,5138, %U A097500 1411,44,1471,50,1531,56,1591,62,16,5168,17,1174,1771,80,1831,86,1891,92,19,5198,20120,4207,2102,1321,62192,22 %N A097500 Consider the succession of single digits of A008585 (multiples of 3): 3 6 9 1 2 1 5 1 8 2 1 2 4 2 7 3 0 .... This sequence gives the lexicographically earliest derangement of A001651 (non-multiples of 3) that produces the same succession of digits. %C A097500 Derangement here means a(n) != A008585(n) for all n. %C A097500 Original name: "Write each non-multiple of 3 integer >0 on a single label. Put the labels in numerical order to form an infinite sequence L. Now consider the succession of single digits of A008585 (multiples of 3): 3,6,9,1,2,1,5,1,8,2,1,2,4,2,7,3,0,3,3,3,6,3,9,4,2,4,5,4,8,5,1,5,4,5,7,6,0... The sequence S gives a rearrangement of the labels that reproduces the same succession of digits, subject to the constraint that the smallest label must be used that does not lead to a contradiction." %C A097500 This could be roughly rephrased like this: "Rewrite in the most economical way the 'multiples-of-3 pattern' using only non-multiples of 3. Do not use any non-multiple of 3 twice." %H A097500 Michael De Vlieger, <a href="/A097500/b097500.txt">Table of n, a(n) for n = 1..10000</a> %e A097500 We must begin with "3,6,9,12,..." and we cannot represent "3" with 3, 36, or 369, because they are all multiples of 3. So the first possibility for a(1) is 3691. %t A097500 f[lst_List, k_] := Block[{L = lst, g, a = {}, m = 0}, g[] := {Set[m, First@ FromDigits@ Append[IntegerDigits@ m, First@ #]], Set[L, Last@ #]} &@ TakeDrop[L, 1]; Do[g[]; While[Or[Mod[m, 3] == 0, First@ L == 0, MemberQ[a, m]], g[]]; AppendTo[a, m]; m = 0, {k}]; a]; f[Flatten@ Map[IntegerDigits, Array[3 # &, {120}]], 57] (* _Michael De Vlieger_, Nov 30 2015, Version 10.2 *) %Y A097500 Cf. A001651, A008585, A097488. %K A097500 base,easy,nonn %O A097500 1,1 %A A097500 _Eric Angelini_, Sep 19 2004 %E A097500 Name, Comments, and Example edited by _Danny Rorabaugh_, Nov 28 2015 %E A097500 More terms from _Michael De Vlieger_, Nov 30 2015