

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 (nonmultiples of 3) that produces the same succession of digits.


2



3691, 2, 1, 5, 182, 124, 27303336394, 245, 4, 8, 515, 457, 606366697, 275, 7, 88, 184, 879093969910, 2105, 10, 811, 11, 14, 1171, 20, 1231, 26, 1291, 32, 13, 5138, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Derangement here means a(n) != A008585(n) for all n.
Original name: "Write each nonmultiple 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."
This could be roughly rephrased like this: "Rewrite in the most economical way the 'multiplesof3 pattern' using only nonmultiples of 3. Do not use any nonmultiple of 3 twice."


LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..10000


EXAMPLE

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.


MATHEMATICA

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 *)


CROSSREFS

Cf. A001651, A008585, A097488.
Sequence in context: A263814 A179130 A234486 * A186198 A188155 A061660
Adjacent sequences: A097497 A097498 A097499 * A097501 A097502 A097503


KEYWORD

base,easy,nonn


AUTHOR

Eric Angelini, Sep 19 2004


EXTENSIONS

Name, Comments, and Example edited by Danny Rorabaugh, Nov 28 2015
More terms from Michael De Vlieger, Nov 30 2015


STATUS

approved



