cp's OEIS Frontend

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.

User: Fabian S. Reid

Fabian S. Reid's wiki page.

Fabian S. Reid has authored 1 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).

Original entry on oeis.org

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
Offset: 1

Author

Fabian S. Reid, Jun 07 2020

Keywords

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

Examples

			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)
		

Crossrefs

Programs

  • 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 *)
  • 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

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)