[go: up one dir, main page]

login
A305994
a(n) = ((A000265(3*n + 1) + 1) mod 4)/2.
0
1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1
OFFSET
0
COMMENTS
The series shows up in the Collatz problem (if even, n/2; if odd, 3*n+1).
Arranging the data with 12 terms by rows like that, it shows a pattern.
1,1,0,1,1,1,0,0,1,0,0,1,
1,1,0,0,1,1,0,1,1,1,0,0,
1,0,0,1,1,0,0,0,1,1,0,1,
1,0,0,0,1,0,0,1,1,1,0,0,
1,1,0,1,1,1,0,0,1,0,0,1,
1,0,0,0,1,1,0,1,1,1,0,0,
1,0,0,1,1,1,0,0,1,1,0,1,
1,1,0,0,1,0,0,1,1,0,0,0,
1,1,0,1,1,0,0,0,1,0,0,1
The columns 2 (1,1,0,0,1,0,0,1,1), 6 (1,1,0,0,1,1,1,0,0) and 10 (0,1,1,1,0,1,1,0,0) are irregular, the others are constant.
If you write these columns completely, you get a similar pattern.
Then column 2 displayed with 12 terms by rows becomes
1,1,0,0,1,0,0,1,1,1,0,1,
1,0,0,1,1,1,0,0,1,0,0,1,
1,1,0,1,1,0,0,0,1,1,0,0,
1,0,0,0,1,1,0,1,1,0,0,1,
1,1,0,0,1,0,0,0,1,1,0,1,
1,0,0,0,1,1,0,0,1,0,0,1,
1,1,0,1,1,0,0,1,1,1,0,0,
1,0,0,1,1,1,0,1,1,0,0,0,
1,1,0,0,1,0,0,1,1,1,0,1,
1,0,0,1,1,1,0,0,1,0,0,0
In the original sequence are 4 repeating subsequences:
1,1,0,1,1,1,0,0,1,0,0,1,1,1,0,0
1,1,0,1,1,1,0,0,1,0,0,1,1,0,0,0
1,1,0,1,1,0,0,0,1,0,0,1,1,1,0,0
1,1,0,1,1,0,0,0,1,0,0,1,1,0,0,0
So if we replace in our original series these lines with just a 1,2,3 and 4, we get this:
1,2,3,2,1,2,3,4,1,4,3,2,
1,2,3,4,1,2,3,2,1,2,3,4,
1,4,3,2,1,4,3,4,1,2,3,2,
1,4,3,4,1,4,3,2,1,2,3,4,
1,2,3,2,1,2,3,4,1,4,3,2,
1,4,3,4,1,2,3,2,1,2,3,4,
1,4,3,2,1,2,3,4,1,2,3,2,
1,2,3,4,1,4,3,2,1,4,3,4,
1,2,3,2,1,4,3,4,1,4,3,2,
1,2,3,4,1,2,3,2,1,4,3,4,
1,4,3,2,1,4,3,4,1,2,3,2
So we can see a really close pattern to the others.
And here are the 4 repeating sequences:
2,2,4,4,2
4,4,2,2,2,4
2,2,4,4,4
4,4,4,2,2,4
If it were replaced again, the pattern would be similar to the others.
FORMULA
a(n) = A067745(n+1) mod 4.
a(n) = A099545(3*n+1) mod 3. - Robert Israel, Jun 19 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/2. - Amiram Eldar, Aug 30 2024
MATHEMATICA
Array[Mod[#/2^IntegerExponent[#, 2] &@ (3 # + 1) + 1, 4]/2 &, 105, 0] (* Michael De Vlieger, Jul 30 2018 *)
PROG
(C)
#include <stdio.h>
int odd_part(x)
{
while(x%2 == 0) x /= 2;
return x;
}
int main(void)
{
int n=0, x;
for (; n < 100; n++)
{
x = ((odd_part(3*n + 1) + 1) % 4) / 2;
printf("%d, ", x);
}
return 0;
}
(PARI) oddpart(n) = n >> valuation(n, 2); \\ A000265
a(n) = ((oddpart(3*n + 1) + 1) % 4)/2; \\ Michel Marcus, Jul 27 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Marvin Falkenhahn, Jun 16 2018
STATUS
approved