login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347411 Sqrt(3)+1-adic expansion of 4, in balanced ternary alphabet. 2
0, 0, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 1, 0, 1, -1, 1, -1, 0, -1, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, 1, -1, 1, 0, 0, -1, 1, 0, 1, 0, 1, 0, 0, -1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 0, -1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, -1, 1, 0, 1, 0, 0, -1, 1, -1, 0, 0, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, -1, 0, 0, 0, -1, 1, 0, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 1, -1, 1, -1, 1, -1, 0, 0, 1, -1, 1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 0, 1, -1, 1, -1, 1, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 1, -1, 0, -1, 0, 0, 1, 0, 0, 0, 0, -1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
COMMENTS
Starting with the number 4, repeatedly "carry" into higher terms of the sequence by scaling and shifting the sequence (-2, -2, 1). For odd numbers, retain sign by scaling the carry by half its magnitude, rounded toward 0. See examples for iterates.
Also appears to work with initial sequences [2, 0, 1, -1, 1, -1, ...] (repeating 1 and -1), [0, 0, 2, -2, 2, -2] (repeating 2 and -2), and [0, 0, 0, 0, 1, -2, 3, -4] (alternating naturals).
Sequence name is by analogy with p-adic numbers and due to the carry sequence (-2, -2, 1) corresponding to the polynomial x^2 - 2x - 2, which has root sqrt(3)+1.
1 only occurs at even positions, -1 occurs only at odd positions.
First 8192 digits appear to be aperiodic.
LINKS
EXAMPLE
First few iterates of carry, starting from expansion "4":
4;
0, -4, 2;
0, 0, 6, -2;
0, 0, 0, -8, 3;
0, 0, 0, 0, 11, 4;
0, 0, 0, 0, 1, -14, 5;
0, 0, 0, 0, 1, 0, 19, -7;
0, 0, 0, 0, 1, 0, 1, -25, 9;
0, 0, 0, 0, 1, 0, 1, -1, 33, -12;
In the limit, this produces the sequence above.
PROG
(Haskell)
a347411_iterates = iterate (doubleBorrow []) (4:repeat 0) where
doubleBorrow zs (x:y:z:xs)
| abs x >= 2 = let (q, r) = quotRem x 2 in foldl (flip (:)) (r : y-x+r : z+q : xs) zs
| otherwise = doubleBorrow (x:zs) (y:z:xs)
a347411 n = (a347411_iterates !! (n+1)) !! n
CROSSREFS
Sequence in context: A333189 A011662 A011665 * A059437 A152592 A347412
KEYWORD
sign,base
AUTHOR
Ben Conner, Aug 30 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)