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!)
A329480 a(n) = (1 - A075677(n))/6 if 6|(A075677(n)-1) or a(n) = (A075677(n) + 1)/6 if 6|(A075677(n)+1). 1
0, 1, 0, 2, -1, 3, 1, 4, -2, 5, 0, 6, -3, 7, 2, 8, -4, 9, -1, 10, -5, 11, 3, 12, -6, 13, 1, 14, -7, 15, 4, 16, -8, 17, -2, 18, -9, 19, 5, 20, -10, 21, 0, 22, -11, 23, 6, 24, -12, 25, -3, 26, -13, 27, 7, 28, -14, 29, 2, 30, -15, 31, 8, 32, -16, 33, -4, 34, -17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
A fractal sequence.
This sequence is related to the Collatz Problem and can be illustrated on a logarithmic spiral to determine the odd numbers in the trajectory of a natural number of the form 6x+1 or 6x-1 simply by moving forward if the integer is positive, backward if the integer is negative, and continuing this forward-backward movement indefinitely.
When formatted as a table T with 4 columns, the third column T(n,3) is equal to the sequence. - Ruud H.G. van Tol, Oct 16 2023
LINKS
Commons.Wikimedia Integer Spiral
FORMULA
a(n) = (1 - A075677(n))/6 when 1 = A075677(n) mod 6, or
a(n) = (A075677(n) + 1)/6 when 5 = A075677(n) mod 6.
From Ruud H.G. van Tol, Oct 16 2023: (Start)
a(4*n-1) = a(n).
T(n,1) = 1-n; T(n,2) = 2*n-1 = n - T(n,1); T(n,3) = T(floor((n-1)/4) + 1, (n-1) mod 4 + 1) = a(n); T(n,4) = 2*n = T(n,2) + 1. (End)
EXAMPLE
For n = 2, A075677(2) = 5, so a(2) = 1.
For n = 9, A075677(9) = 13, so a(9) = -2.
From Ruud H.G. van Tol, Oct 16 2023: (Start)
Array T begins:
n|k_1|__2|__3|__4|
1| 0 1 0 2
2| -1 3 1 4
3| -2 5 0 6
4| -3 7 2 8
5| -4 9 -1 10
6| -5 11 3 12
... (End)
MATHEMATICA
nterms=100; Table[r=(c=3(2n-1)+1)/2^IntegerExponent[c, 2]; If[Mod[r, 6]==1, (1-r)/6, (1+r)/6], {n, nterms}] (* Paolo Xausa, Nov 28 2021 *)
PROG
(PARI) a(n) = my(x=3*n-1); x>>=valuation(x, 2); if(1==x%6, 1-x, 1+x)/6; \\ Ruud H.G. van Tol, Oct 16 2023
CROSSREFS
Sequence in context: A029207 A111902 A316211 * A277895 A328772 A300726
KEYWORD
sign
AUTHOR
Fabian S. Reid, Jun 07 2020
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 06:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)