This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A357005 #11 Sep 17 2022 09:53:46 %S A357005 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, %T A357005 23,19,23,23,31,32,33,34,35,36,37,37,39,34,37,42,43,37,45,43,47,33,35, %U A357005 37,39,37,43,45,47,35,39,43,47,39,47,47,63,64,65,65,67,65 %N A357005 Smallest k that is cyclically equivalent (see Comment for definition) to n. %C A357005 Two positive integers k and n are cyclically equivalent (as defined by Hladnik, Marušič, and Pisanski, 2002) if they have the same number m of binary digits, and there exist integers s and t such that gcd(s,m) = 1 and the map x -> s*x+t mod m maps the set of exponents of 2 occurring in the binary expansion of n bijectively to the corresponding set for k. (In particular, A000120(k) = A000120(n).) For example, k = 17 = 2^0 + 2^4 and n = 18 = 2^1 + 2^4 are cyclically equivalent, because the map x -> 2*x+2 mod 5 maps {1,4} to {0,4}. %C A357005 The fixed points are the terms of A357006. %C A357005 The number of fixed points n in the interval 2^(m-1) <= n < 2^m equals A002729(m)-1. %H A357005 Pontus von Brömssen, <a href="/A357005/b357005.txt">Table of n, a(n) for n = 1..10000</a> %H A357005 Milan Hladnik, Dragan Marušič, and Tomaž Pisanski, <a href="https://doi.org/10.1016/S0012-365X(01)00064-4">Cyclic Haar graphs</a>, Discrete Mathematics 244 (2002), 137-152. %F A357005 a(a(n)) = a(n). %F A357005 a(n) = A357004(n) for n <= 146, but a(147) = 147 > 141 = A357004(147). %F A357005 A357004(n) <= a(n) <= A163382(n). %o A357005 (Python) %o A357005 from math import gcd %o A357005 def A357005(n): %o A357005 p=[int(d) for d in format(n,'b')] %o A357005 m=len(p) %o A357005 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]) %o A357005 return sum(p0[i]*2**(m-1-i) for i in range(m)) %Y A357005 Cf. A000120, A002729, A163382, A267508, A357004, A357006. %K A357005 nonn %O A357005 1,2 %A A357005 _Pontus von Brömssen_, Sep 08 2022