OFFSET
1,1
COMMENTS
Numbers coprime to 6 producing 2 odd numbers in the Collatz iteration.
Numbers appearing in A198585 (sorted and duplicates removed). These numbers occur in A002450, numbers of the form (4^k-1)/3, for k = 2, 4, 5, 7, 8, 10, ... (note that k a multiple of 3 does not appear).
A124477 \ {0,1} is a subset: for these n, 3n+1 = 2^(p-3) with p > 3 prime, whence also n !== 0 (mod 3). - M. F. Hasler, Oct 16 2018
These are exactly the odd non-multiples of 3 such 3n+1 = 2^m for some m, i.e., n = (2^m-1)/3. This is possible iff m = 2k, so we get n = (4^k-1)/3. Then n == 0 (mod 3) <=> 4^k == 1 (mod 9) <=> k == 0 (mod 3) <=> k not in A001651. This yields the FORMULA. (Multiples of 3 are excluded because the original definition implied that the terms are in the Collatz-orbit of another odd number, i.e., of the form n = (3x+1)/2^r, which is impossible for x a multiple of 3.) - M. F. Hasler, Oct 16 2018
From Wolfdieter Lang, Jan 14 2022: (Start)
a(n) mod 8 = 5. As subsequence of A002450 for n >= 1.
{a(n) mod 6} == repeat{5, 1}. See the first comment, and the periodicity modulo 6 of A002450 for n >= 1.
{a(n) mod 72} == repeat{5, 13, 53, 61, 29, 37}. Proof by induction: First with the bisection formulas, a(1+2*k) = (4^(2+3*k) - 1)/3 and a(2+2*k) = (4^(3*k+4) - 1)/3, for k >= 0, then trisection, using (4^9 - 1)/3 = 873819 = 9*9709. (End)
LINKS
T. D. Noe, Table of n, a(n) for n = 1..100
Index entries for linear recurrences with constant coefficients, signature (1,64,-64).
FORMULA
a(n) = (4^A001651(n+1) - 1)/3. - M. F. Hasler, Oct 16 2018
From Colin Barker, Jan 17 2020: (Start)
G.f.: x*(5 + 80*x - 64*x^2) / ((1 - x)*(1 - 8*x)*(1 + 8*x)).
a(n) = a(n-1) + 64*a(n-2) - 64*a(n-3) for n>3.
a(n) = (-1 + (-8)^n + 3*8^n) / 3.
(End)
MATHEMATICA
e = 19; ex = Complement[Range[2, 3*e], 3*Range[e]]; (4^ex - 1)/3
(* Second program: *)
Rest@ Map[(4^# - 1)/3 &, LinearRecurrence[{1, 1, -1}, {1, 2, 4}, 21]] (* Michael De Vlieger, Oct 17 2018 *)
PROG
(PARI) is(n)=gcd(n, 6)==1&&(n=3*n+1)>>valuation(n, 2)==1 \\ M. F. Hasler, Oct 16 2018
(PARI) A198586(n)=4^(3*n\2+1)\3 \\ M. F. Hasler, Oct 16 2018
(PARI) Vec(x*(5 + 80*x - 64*x^2) / ((1 - x)*(1 - 8*x)*(1 + 8*x)) + O(x^20)) \\ Colin Barker, Jan 17 2020
(Magma) [4^(3*n div 2 + 1) div 3: n in [1..25]]; // Vincenzo Librandi, Oct 20 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
T. D. Noe, Oct 30 2011
EXTENSIONS
Definition corrected by M. F. Hasler, Oct 16 2018
STATUS
approved