A357005 Smallest k that is cyclically equivalent (see Comment for definition) to n.
1, 2, 3, 4, 5, 5, 7, 8, 9, 10, 11, 9, 11, 11, 15, 16, 17, 17, 19, 17, 19, 19, 23, 17, 19, 19, 23, 19, 23, 23, 31, 32, 33, 34, 35, 36, 37, 37, 39, 34, 37, 42, 43, 37, 45, 43, 47, 33, 35, 37, 39, 37, 43, 45, 47, 35, 39, 43, 47, 39, 47, 47, 63, 64, 65, 65, 67, 65
Offset: 1
Keywords
Links
- Pontus von Brömssen, Table of n, a(n) for n = 1..10000
- Milan Hladnik, Dragan Marušič, and Tomaž Pisanski, Cyclic Haar graphs, Discrete Mathematics 244 (2002), 137-152.
Programs
-
Python
from math import gcd def A357005(n): p=[int(d) for d in format(n,'b')] m=len(p) p0=min([p[(k*i+j)%m] for i in range(m)] for k in range(1,m+1) if gcd(k,m)==1 for j in range(m) if p[j]) return sum(p0[i]*2**(m-1-i) for i in range(m))
Comments