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.
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
Offset: 1
Examples
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.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Extensions
Name, Comments, and Example edited by Danny Rorabaugh, Nov 28 2015
More terms from Michael De Vlieger, Nov 30 2015
Comments