login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347717 Number of states of the minimal deterministic finite automaton that accepts ternary strings that represent numbers that are divisible by n. 1
1, 2, 2, 4, 5, 3, 7, 8, 3, 10, 11, 5, 13, 14, 6, 16, 17, 4, 19, 20, 8, 22, 23, 9, 25, 26, 4, 28, 29, 11, 31, 32, 12, 34, 35, 6, 37, 38, 14, 40, 41, 15, 43, 44, 7, 46, 47, 17, 49, 50, 18, 52, 53, 5, 55, 56, 20, 58, 59, 21, 61, 62, 9, 64, 65, 23, 67, 68, 24, 70, 71, 10, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = n for all n coprime to 3.
LINKS
FORMULA
a(1) = 1, a(2) = 2, a(3n) = a(n) + 1, a(3n+1) = 3n+1, a(3n+2) = 3n+2.
EXAMPLE
The minimal DFA when n=6, giving the form of transition table:
+-------+-----------+
| | tr. func. |
| state +---+---+---+
| | 0 | 1 | 2 |
+-------+---+---+---+
|->*A | A | C | B | (mod 6 = 0)
+-------+---+---+---+
| B | A | C | B | (mod 6 = 2,4)
+-------+---+---+---+
| C | C | B | C | (mod 6 = 1,3,5)
+-------+---+---+---+
PROG
(PARI) a(n) = n / 3^valuation(n, 3) + valuation(n, 3)
CROSSREFS
Sequence in context: A242348 A186053 A133082 * A130265 A368156 A359045
KEYWORD
nonn
AUTHOR
Liangzhou Chen, Sep 10 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 4 00:07 EDT 2024. Contains 373986 sequences. (Running on oeis4.)