login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A134451 Ternary digital root of n. 21
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Continued fraction expansion of sqrt(3) - 1. - N. J. A. Sloane, Dec 17 2007. Cf. A040001, A048878/A002530.

a(A005408(n)) = 1; a(A005843(n)) = 2 for n>0;

a(n) = if n=0 then 0 else A000034(n-1).

Minimum number of terms required to express n as a sum of odd numbers.

Shadow transform of even numbers A005843. - Michel Marcus, Jun 06 2013

LINKS

Harry J. Smith, Table of n, a(n) for n = 0..20000

Lorenz Halbeisen and Norbert Hungerbuehler, Number theoretic aspects of a combinatorial function, Notes on Number Theory and Discrete Mathematics 5(4) (1999), 138-150; see Definition 7 for the shadow transform.

N. J. A. Sloane, Transforms.

Eric Weisstein's World of Mathematics, Ternary.

Eric Weisstein's World of Mathematics, Digital Root.

FORMULA

a(n) = if n<=2 then n else a(A053735(n)).

a(n) = -1/2+[(-1)^n]/2+2*[(n+2) mod (n+1)]. - Paolo P. Lava, Oct 29 2007

a(n) = ((n+1) mod 2) + 2*sign(n) - 1. - Wesley Ivan Hurt, Dec 06 2013

Multiplicative with a(2^e) = 2, a(p^e) = 1 for odd prime p. - Andrew Howroyd, Aug 06 2018

EXAMPLE

n=42: A007089(42) = '1120', A053735(42) = 1+1+2+0 = 4,

A007089(4)='11', A053735(4)=1+1=2: therefore a(42) = 2.

0.732050807568877293527446341... = 0 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))) [Harry J. Smith, May 31 2009]

MAPLE

A134451:=n->((n+1) mod 2)+2*signum(n)-1; seq(A134451(n), n=0..100); # Wesley Ivan Hurt, Dec 06 2013

MATHEMATICA

Table[Mod[n + 1, 2] + 2 Sign[n] - 1, {n, 0, 100}] (* Wesley Ivan Hurt, Dec 06 2013 *)

PROG

(PARI) { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)-1); for (n=0, 20000, write("b134451.txt", n, " ", x[n+1])); } [Harry J. Smith, May 31 2009]

(Haskell)

a134451 = until (< 3) a053735

-- Reinhard Zumkeller, May 12 2011

CROSSREFS

Cf. A134452, A160390 (decimal expansion).

Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

Sequence in context: A107393 A000034 A040001 * A229217 A167965 A270370

Adjacent sequences:  A134448 A134449 A134450 * A134452 A134453 A134454

KEYWORD

nonn,base,easy,mult

AUTHOR

Reinhard Zumkeller, Oct 27 2007

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 22:47 EDT 2019. Contains 328315 sequences. (Running on oeis4.)