|
|
A137850
|
|
a(n) = n base 5, under morphism f(1) = 121, f(2) = 123, f(3) = 141, f(4) = 142, or 0 if n base 5 has a zero.
|
|
0
|
|
|
121, 123, 141, 142, 0, 121121, 121123, 121141, 121142, 0, 123121, 123123, 123141, 123142, 0, 141121, 141123, 141141, 141142, 0, 142121, 142123, 142141, 142142, 0, 0, 0, 0, 0, 0, 121121121, 121121123, 121121141, 121121142, 0, 121123121, 121123123, 121123141
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = A007091(n) under the morphism f(1) = 121, f(2) = 123, f(3) = 141, f(4) = 142, or 0 if n base 5 is not a word in the alphabet {1,2,3,4}* i.e., has a zero.
|
|
MATHEMATICA
|
a[n_] := Block[{d = IntegerDigits[n, 5]}, If[Min[d] == 0, 0, FromDigits[ Flatten[d /. {1 -> {1, 2, 1}, 2 -> {1, 2, 3}, 3 -> {1, 4, 1}, 4 -> {1, 4, 2}}]]]]; Array[a, 38] (* Giovanni Resta, Jun 20 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|