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 A122002 #21 Oct 26 2024 10:48:27 %S A122002 5,1,5,3,5,1,7,3,5,1,5,3,7,1,7,3,5,1,5,3,5,1,7,3,7,1,5,3,7,1,7,3,5,1, %T A122002 5,3,5,1,7,3,5,1,5,3,7,1,7,3,7,1,5,3,5,1,7,3,7,1,5,3,7,1,7,3,5,1,5,3, %U A122002 5,1,7,3,5,1,5,3,7,1,7,3,5,1,5,3,5,1,7,3,7,1,5,3,7,1,7,3,7,1,5,3,5 %N A122002 a(0)=5; otherwise a(n) = (n mod 4) if n is odd, a(n) = h + 4, where h = (highest odd divisor of n) mod 4 if n is even. %C A122002 a(n) in {1,3,5,7} for all n. a(4k+i) = i if i is odd. %C A122002 There is a typo in Grytczuk's definition: he has "+ 5" instead of "+ 4". %H A122002 A. Carpi, <a href="https://doi.org/10.1016/0304-3975(88)90080-1">Multidimensional unrepetitive configurations</a>, Theoret. Comput. Sci., 56 (1988), 233-241. a(n) = a_n of lemma 3.2 for the case p=2 and m=0 (which is corollary 3.3). %H A122002 Jaroslaw Grytczuk, <a href="https://dx.doi.org/10.1016/j.disc.2007.08.039">Thue type problems for graphs, points and numbers</a>, Discrete Math., 308 (2008), 4419-4429. [See Problem 15.] %H A122002 Jui-Yi Kao, Narad Rampersad, Jeffrey Shallit, Manuel Silva, <a href="https://doi.org/10.1016/j.tcs.2007.10.039">Words Avoiding Repetitions in Arithmetic Progressions</a>, Theoretical Computer Science, volume 391, issues 1-2, February 2008, pages 126-137. And <a href="https://arxiv.org/abs/math/0608607">arXiv:math/0608607</a> [math.CO], 2006. (Extending to generalized paperfolding sequences.) %H A122002 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a> %H A122002 <a href="/index/Sq#square_free">Index entries for sequences related to squarefree words</a> %F A122002 Morphism 1 -> 5,3; 3 -> 7,3; 5 -> 5,1; 7 -> 7,1 starting from 5 [Carpi, h in remark after lemma 3.2]. - _Kevin Ryde_, Sep 09 2020 %t A122002 a[0]=5;a[n_]:=If[OddQ[n],Mod[n,4],4+Mod[Select[Divisors[n],OddQ][[-1]],4]];Table[a[n],{n,0,100}] (* _James C. McMahon_, Oct 25 2024 *) %o A122002 (PARI) a(n) = 2*if(n,bittest(n,valuation(n,2)+1)) + if(n%2,1,5); \\ _Kevin Ryde_, Sep 09 2020 %Y A122002 Essentially the same: A112658 (map 1357 -> 0213), A125047 (map 1357 -> 2314). %Y A122002 Cf. A003324. %K A122002 nonn %O A122002 0,1 %A A122002 _N. J. A. Sloane_, Aug 05 2008 %E A122002 Terms from a(26) on from _John W. Layman_, Aug 27 2008