A198586 a(n) = (4^A001651(n+1) - 1)/3: numbers (4^k-1)/3 for k > 1, not multiples of 3.
5, 85, 341, 5461, 21845, 349525, 1398101, 22369621, 89478485, 1431655765, 5726623061, 91625968981, 366503875925, 5864062014805, 23456248059221, 375299968947541, 1501199875790165, 24019198012642645, 96076792050570581, 1537228672809129301
Offset: 1
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).
Programs
-
Magma
[4^(3*n div 2 + 1) div 3: n in [1..25]]; // Vincenzo Librandi, Oct 20 2018
-
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 *)
-
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
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)
Extensions
Definition corrected by M. F. Hasler, Oct 16 2018
Comments