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 A134451 #69 Feb 16 2025 08:33:06 %S A134451 0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, %T A134451 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, %U A134451 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 %N A134451 Ternary digital root of n. %C A134451 Continued fraction expansion of sqrt(3) - 1. - _N. J. A. Sloane_, Dec 17 2007. Cf. A040001, A048878/A002530. %C A134451 Minimum number of terms required to express n as a sum of odd numbers. %C A134451 Shadow transform of even numbers A005843. - _Michel Marcus_, Jun 06 2013 %C A134451 From _Jianing Song_, Nov 01 2022: (Start) %C A134451 For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious. %C A134451 The maximal gap is given by A048669. (End) %H A134451 Harry J. Smith, <a href="/A134451/b134451.txt">Table of n, a(n) for n = 0..20000</a> %H A134451 Lorenz Halbeisen and Norbert Hungerbuehler, <a href="https://nntdm.net/volume-05-1999/number-4/138-150/">Number theoretic aspects of a combinatorial function</a>, Notes on Number Theory and Discrete Mathematics 5(4) (1999), 138-150; see Definition 7 for the shadow transform. %H A134451 N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>. %H A134451 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DigitalRoot.html">Digital Root</a>. %H A134451 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Ternary.html">Ternary</a>. %F A134451 a(n) = n if n <= 2, otherwise a(A053735(n)). %F A134451 a(A005408(n)) = 1; a(A005843(n)) = 2 for n>0; %F A134451 a(n) = 0 if n=0, otherwise A000034(n-1). %F A134451 a(n) = ((n+1) mod 2) + 2*sign(n) - 1. - _Wesley Ivan Hurt_, Dec 06 2013 %F A134451 Multiplicative with a(2^e) = 2, a(p^e) = 1 for odd prime p. - _Andrew Howroyd_, Aug 06 2018 %F A134451 a(0) = A055034(1) / A000010(1), a(n) = A000010(n+1) / A055034(n+1), n>1. - _Torlach Rush_, Oct 29 2019 %F A134451 Dirichlet g.f.: zeta(s)*(1+1/2^s). - _Amiram Eldar_, Jan 01 2023 %e A134451 n=42: A007089(42) = '1120', A053735(42) = 1+1+2+0 = 4, %e A134451 A007089(4)='11', A053735(4)=1+1=2: therefore a(42) = 2. %e A134451 0.732050807568877293527446341... = 0 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))). - _Harry J. Smith_, May 31 2009 %p A134451 A134451:=n->((n+1) mod 2)+2*signum(n)-1; seq(A134451(n), n=0..100); # _Wesley Ivan Hurt_, Dec 06 2013 %t A134451 Table[Mod[n + 1, 2] + 2 Sign[n] - 1, {n, 0, 100}] (* _Wesley Ivan Hurt_, Dec 06 2013 *) %o A134451 (Haskell) %o A134451 a134451 = until (< 3) a053735 %o A134451 -- _Reinhard Zumkeller_, May 12 2011 %o A134451 (PARI) a(n) = if(!n, 0, 2 - n%2) \\ _Andrew Howroyd_, Dec 08 2024 %Y A134451 Cf. A000010, A055034, A134452, A160390 (decimal expansion). %Y A134451 Apart from a(0) the same as A040001. %Y A134451 Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1). %K A134451 nonn,base,easy,mult %O A134451 0,3 %A A134451 _Reinhard Zumkeller_, Oct 27 2007