A171389 a(n) = 21*2^n - 1.
20, 41, 83, 167, 335, 671, 1343, 2687, 5375, 10751, 21503, 43007, 86015, 172031, 344063, 688127, 1376255, 2752511, 5505023, 11010047, 22020095, 44040191, 88080383, 176160767, 352321535, 704643071, 1409286143, 2818572287
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Gennady Eremin, Partitioning the set of natural numbers into Mersenne trees and into arithmetic progressions; Natural Matrix and Linnik's constant, arXiv:2405.16143 [math.CO], 2024. See pp. 3, 14.
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
Programs
-
BASIC
for j = 0 to 30 : print str$((21*2^j)-1)+", "; : next j [Jeremy Gardiner, Oct 23 2011]
-
Magma
I:=[20, 41]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 06 2012
-
Maple
A171389:=n->21*2^n-1; seq(A171389(n), n=0..40); # Wesley Ivan Hurt, Jun 11 2014
-
Mathematica
CoefficientList[Series[(20-19*x)/((1-x)*(1-2*x)),{x,0,40}],x] (* Vincenzo Librandi, Jul 06 2012 *)
Formula
a(n+1) = 2*a(n) + 1.
G.f.: (20-19*x)/((1-x)*(1-2*x)). - Vincenzo Librandi, Jul 06 2012
a(n) = 3*a(n-1) - 2*a(n-2). - Vincenzo Librandi, Jul 06 2012
a(n) + a(n-1)^2 = (a(n-1) + 1)^2. - Vincenzo Librandi, Jun 11 2014
Extensions
Edited by Jon E. Schoenfield, Jun 23 2010
Offset changed to 0 and first formula corrected by Jeremy Gardiner, Oct 23 2011