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.

Showing 1-10 of 13 results. Next

A052539 a(n) = 4^n + 1.

Original entry on oeis.org

2, 5, 17, 65, 257, 1025, 4097, 16385, 65537, 262145, 1048577, 4194305, 16777217, 67108865, 268435457, 1073741825, 4294967297, 17179869185, 68719476737, 274877906945, 1099511627777, 4398046511105, 17592186044417
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

The sequence is a Lucas sequence V(P,Q) with P = 5 and Q = 4, so if n is a prime number, then V_n(5,4) - 5 is divisible by n. The smallest pseudoprime q which divides V_q(5,4) - 5 is 15.
Also the edge cover number of the (n+1)-Sierpinski tetrahedron graph. - Eric W. Weisstein, Sep 20 2017
First bisection of A000051, A049332, A052531 and A014551. - Klaus Purath, Sep 23 2020

Crossrefs

Programs

  • GAP
    List([0..30], n-> 4^n+1); # G. C. Greubel, May 09 2019
  • Magma
    [4^n+1: n in [0..30] ]; // Vincenzo Librandi, Apr 30 2011
    
  • Maple
    spec := [S,{S=Union(Sequence(Union(Z,Z,Z,Z)),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..30);
    A052539:=n->4^n + 1; seq(A052539(n), n=0..30); # Wesley Ivan Hurt, Jun 12 2014
  • Mathematica
    Table[4^n + 1, {n, 0, 30}]
    (* From Eric W. Weisstein, Sep 20 2017 *)
    4^Range[0, 30] + 1
    LinearRecurrence[{5, -4}, {2, 5}, 30]
    CoefficientList[Series[(2-5x)/(1-5x+4x^2), {x, 0, 30}], x] (* End *)
  • PARI
    a(n)=4^n+1 \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    [4^n+1 for n in (0..30)] # G. C. Greubel, May 09 2019
    

Formula

a(n) = 4^n + 1.
a(n) = 4*a(n-1) - 3 = 5*a(n-1) - 4*a(n-2).
G.f.: (2 - 5*x)/((1 - 4*x)*(1 - x)).
E.g.f.: exp(x) + exp(4*x). - Mohammad K. Azarian, Jan 02 2009
From Klaus Purath, Sep 23 2020: (Start)
a(n) = 3*4^(n-1) + a(n-1).
a(n) = (a(n-1)^2 + 9*4^(n-2))/a(n-2).
a(n) = A178675(n) - 3. (End)

A024036 a(n) = 4^n - 1.

Original entry on oeis.org

0, 3, 15, 63, 255, 1023, 4095, 16383, 65535, 262143, 1048575, 4194303, 16777215, 67108863, 268435455, 1073741823, 4294967295, 17179869183, 68719476735, 274877906943, 1099511627775, 4398046511103, 17592186044415, 70368744177663, 281474976710655
Offset: 0

Views

Author

Keywords

Comments

This sequence is the normalized length per iteration of the space-filling Peano-Hilbert curve. The curve remains in a square, but its length increases without bound. The length of the curve, after n iterations in a unit square, is a(n)*2^(-n) where a(n) = 4*a(n-1)+3. This is the sequence of a(n) values. a(n)*(2^(-n)*2^(-n)) tends to 1, the area of the square where the curve is generated, as n increases. The ratio between the number of segments of the curve at the n-th iteration (A015521) and a(n) tends to 4/5 as n increases. - Giorgio Balzarotti, Mar 16 2006
Numbers whose base-4 representation is 333....3. - Zerinvary Lajos, Feb 03 2007
From Eric Desbiaux, Jun 28 2009: (Start)
It appears that for a given area, a square n^2 can be divided into n^2+1 other squares.
It's a rotation and zoom out of a Cartesian plan, which creates squares with side
= sqrt( (n^2) / (n^2+1) ) --> A010503|A010532|A010541... --> limit 1,
and diagonal sqrt(2*sqrt((n^2)/(n^2+1))) --> A010767|... --> limit A002193.
(End)
Also the total number of line segments after the n-th stage in the H tree, if 4^(n-1) H's are added at the n-th stage to the structure in which every "H" is formed by 3 line segments. A164346 (the first differences of this sequence) gives the number of line segments added at the n-th stage. - Omar E. Pol, Feb 16 2013
a(n) is the cumulative number of segment deletions in a Koch snowflake after (n+1) iterations. - Ivan N. Ianakiev, Nov 22 2013
Inverse binomial transform of A005057. - Wesley Ivan Hurt, Apr 04 2014
For n > 0, a(n) is one-third the partial sums of A002063(n-1). - J. M. Bergot, May 23 2014
Also the cyclomatic number of the n-Sierpinski tetrahedron graph. - Eric W. Weisstein, Sep 18 2017

Examples

			G.f. = 3*x + 15*x^2 + 63*x^3 + 255*x^4 + 1023*x^5 + 4095*x^6 + ...
		

References

  • Graham Everest, Alf van der Poorten, Igor Shparlinski, and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.

Crossrefs

Programs

  • Haskell
    a024036 = (subtract 1) . a000302
    a024036_list = iterate ((+ 3) . (* 4)) 0
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Maple
    A024036:=n->4^n-1; seq(A024036(n), n=0..30); # Wesley Ivan Hurt, Apr 04 2014
  • Mathematica
    Array[4^# - 1 &, 50, 0] (* Vladimir Joseph Stephan Orlovsky, Nov 03 2009 *)
    (* Start from Eric W. Weisstein, Sep 19 2017 *)
    Table[4^n - 1, {n, 0, 20}]
    4^Range[0, 20] - 1
    LinearRecurrence[{5, -4}, {0, 3}, 20]
    CoefficientList[Series[3 x/(1 - 5 x + 4 x^2), {x, 0, 20}], x]
    (* End *)
  • PARI
    for(n=0, 100, print1(4^n-1, ", ")) \\ Felix Fröhlich, Jul 04 2014
  • Sage
    [gaussian_binomial(2*n,1, 2) for n in range(21)] # Zerinvary Lajos, May 28 2009
    
  • Sage
    [stirling_number2(2*n+1, 2) for n in range(21)] # Zerinvary Lajos, Nov 26 2009
    

Formula

a(n) = 3*A002450(n). - N. J. A. Sloane, Feb 19 2004
G.f.: 3*x/((-1+x)*(-1+4*x)) = 1/(-1+x) - 1/(-1+4*x). - R. J. Mathar, Nov 23 2007
E.g.f.: exp(4*x) - exp(x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A000051(n)*A000225(n). - Reinhard Zumkeller, Feb 14 2009
A079978(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2009
a(n) = A179857(A000225(n)), for n > 0; a(n) > A179857(m), for m < A000225(n). - Reinhard Zumkeller, Jul 31 2010
a(n) = 4*a(n-1) + 3, with a(0) = 0. - Vincenzo Librandi, Aug 01 2010
A000120(a(n)) = 2*n. - Reinhard Zumkeller, Feb 07 2011
a(n) = (3/2)*A020988(n). - Omar E. Pol, Mar 15 2012
a(n) = (Sum_{i=0..n} A002001(i)) - 1 = A178789(n+1) - 3. - Ivan N. Ianakiev, Nov 22 2013
a(n) = n*E(2*n-1,1)/B(2*n,1), for n > 0, where E(n,x) denotes the Euler polynomials and B(n,x) the Bernoulli polynomials. - Peter Luschny, Apr 04 2014
a(n) = A000302(n) - 1. - Sean A. Irvine, Jun 18 2019
Sum_{n>=1} 1/a(n) = A248721. - Amiram Eldar, Nov 13 2020
a(n) = A080674(n) - A002450(n). - Elmo R. Oliveira, Dec 02 2023

Extensions

More terms Wesley Ivan Hurt, Apr 04 2014

A084221 a(n+2) = 4*a(n), with a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 4, 12, 16, 48, 64, 192, 256, 768, 1024, 3072, 4096, 12288, 16384, 49152, 65536, 196608, 262144, 786432, 1048576, 3145728, 4194304, 12582912, 16777216, 50331648, 67108864, 201326592, 268435456, 805306368, 1073741824, 3221225472, 4294967296, 12884901888
Offset: 0

Views

Author

Paul Barry, May 21 2003

Keywords

Comments

Binomial transform is A060925. Binomial transform of A084222.
Sequences with similar recurrence rules: A016116 (multiplier 2), A038754 (multiplier 3), A133632 (multiplier 5). See A133632 for general formulas. - Hieronymus Fischer, Sep 19 2007
Equals A133080 * A000079. A122756 is a companion sequence. - Gary W. Adamson, Sep 19 2007

Examples

			Binary...............Decimal
1..........................1
11.........................3
100........................4
1100......................12
10000.....................16
110000....................48
1000000...................64
11000000.................192
100000000................256
1100000000...............768
10000000000.............1024
110000000000............3072, etc. - _Philippe Deléham_, Mar 21 2014
		

Crossrefs

For partial sums see A133628. Partial sums for other multipliers p: A027383(p=2), A087503(p=3), A133629(p=5).
Other related sequences: A132666, A132667, A132668, A132669.

Programs

Formula

a(n) = (5*2^n-(-2)^n)/4.
G.f.: (1+3*x)/((1-2*x)(1+2*x)).
E.g.f.: (5*exp(2*x) - exp(-2*x))/4.
a(n) = A133628(n) - A133628(n-1) for n>1. - Hieronymus Fischer, Sep 19 2007
Equals A133080 * [1, 2, 4, 8, ...]. Row sums of triangle A133087. - Gary W. Adamson, Sep 08 2007
a(n+1)-2a(n) = A000079 signed. a(n)+a(n+2)=5*a(n). First differences give A135520. - Paul Curtz, Apr 22 2008
a(n) = A074323(n+1)*A016116(n). - R. J. Mathar, Jul 08 2009
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = Sum_{k=0..n+1} A181650(n+1,k)*2^k. - Philippe Deléham, Nov 19 2011
a(2*n) = A000302(n); a(2*n+1) = A164346(n). - Philippe Deléham, Mar 21 2014

Extensions

Edited by N. J. A. Sloane, Dec 14 2007

A169634 a(n) = 3*7^n.

Original entry on oeis.org

3, 21, 147, 1029, 7203, 50421, 352947, 2470629, 17294403, 121060821, 847425747, 5931980229, 41523861603, 290667031221, 2034669218547, 14242684529829, 99698791708803, 697891541961621, 4885240793731347, 34196685556119429, 239376798892836003, 1675637592249852021
Offset: 0

Views

Author

Klaus Brockhaus, Apr 04 2010

Keywords

Comments

Essentially first differences of A120741.
Binomial transform of A169604.
Second binomial transform of A005053 without initial term 1.
Inverse binomial transform of A103333 without initial term 1.
Second inverse binomial transform of A013708.
Except for first term 3, these are the integers that satisfy phi(n) = 4*n/7. - Michel Marcus, Jul 14 2015
Number of distinct quadratic residues (QR) over Z_7^n such that gcd(QR, 7^n) = 1 where n >= 1. - Param Mayurkumar Parekh, Feb 11 2023

Crossrefs

Cf. A120741, A169604 (3*6^n), A005053 (expand (1-2x)/(1-5x)), A103333 (expand (1-5x)/(1-8x)), A013708 (3^(2*n+1)), A007283 (3*2^n), A164346 (3*4^n).

Programs

  • Magma
    [ 3*7^n: n in [0..19] ];
  • Mathematica
    3*7^Range[0, 25] (* Paolo Xausa, Jan 17 2025 *)

Formula

a(n) = 7*a(n-1) for n > 0; a(0) = 3.
G.f.: 3/(1-7*x).

A169604 a(n) = 3*6^n.

Original entry on oeis.org

3, 18, 108, 648, 3888, 23328, 139968, 839808, 5038848, 30233088, 181398528, 1088391168, 6530347008, 39182082048, 235092492288, 1410554953728, 8463329722368, 50779978334208, 304679870005248, 1828079220031488, 10968475320188928, 65810851921133568, 394865111526801408
Offset: 0

Views

Author

Klaus Brockhaus, Apr 04 2010

Keywords

Comments

a(n) = A081341(n+1).
Essentially first differences of A125682.
Binomial transform of A005053 without initial term 1.
Second binomial transform of A164346.
Inverse binomial transform of A169634.
Second inverse binomial transform of A103333 without initial term 1.
Contribution from Reinhard Zumkeller, May 02 2010: (Start)
a(n) = 3*A000400(n) = A000400(n+1)/2;
subsequence of A003586; a(n)=A003586(A014105(n)) for n<6. (End)

Crossrefs

Cf. A081341, A125682 ((6^n-1)*3/5), A005053 (expand (1-2x)/(1-5x)), A164346 (3*4^n), A169634 (3*7^n), A103333 (expand (1-5x)/(1-8x)).

Programs

Formula

a(n) = 6*a(n-1) for n > 0; a(0) = 3.
G.f.: 3/(1-6*x).

A178789 a(n) = 4^(n-1) + 2: Number of acute angles after n iterations of the Koch snowflake construction.

Original entry on oeis.org

3, 6, 18, 66, 258, 1026, 4098, 16386, 65538, 262146, 1048578, 4194306, 16777218, 67108866, 268435458, 1073741826, 4294967298, 17179869186, 68719476738, 274877906946, 1099511627778, 4398046511106, 17592186044418, 70368744177666
Offset: 1

Views

Author

Keywords

Comments

Starting from an equilateral triangle, at each step each straight segment is replaced by a "/\" shape of four segments of equal length, with the acute angle in the middle pointing to the exterior. The sequence counts the angles which are (i.e., already were) at both extremities, plus the one newly created acute angle in the middle of each former segment. At step n, there are 3*4^(n-1) straight segments, therefore a(n+1) = a(n) + 3*4^(n-1). - M. F. Hasler, Dec 17 2013

Crossrefs

Programs

  • Magma
    [2^(2*(n-1)) + 2: n in [1..30]]; // Vincenzo Librandi, Feb 02 2013
    
  • Maple
    A178789:=n->2+4^(n-1); seq(A178789(n), n=1..30); # Wesley Ivan Hurt, Dec 17 2013
  • Mathematica
    a=b=3;lst={a};Do[a=a+b;b*=4;AppendTo[lst,a],{n,40}];lst
    Flatten[Table[2^(2*(n-1)) + 2, {n, 1, 50}]](* or *)   CoefficientList[Series[(3 - 9*x)/(1 - 5*x + 4*x^2),{x, 0, 100}], x] (* Vincenzo Librandi, Feb 02 2013 *)
  • PARI
    A178789=n->4^(n-1)+2  \\ - M. F. Hasler, Dec 17 2013

Formula

G.f.: 3*x*(1 - 3*x)/(1 - 5*x + 4*x^2).
a(n) = 3 * A047849(n-1).
a(n) = 2^(2*(n-1)) + 2. - Vincenzo Librandi, Feb 02 2013
a(n+1) = a(n) + 3*4^(n-1) = a(n) + A002001(n) for n > 0. - M. F. Hasler, Dec 17 2013
a(n) = 2 + A000302(n-1). - Omar E. Pol, Dec 18 2013

A279125 Lexicographically earliest sequence such that, for any distinct i and j, a(i)=a(j) implies (i AND j)=0 (where AND stands for the bitwise AND operator).

Original entry on oeis.org

0, 0, 1, 0, 2, 3, 4, 0, 3, 2, 5, 1, 6, 7, 8, 0, 7, 6, 9, 5, 10, 11, 12, 4, 13, 14, 15, 16, 17, 18, 19, 0, 11, 10, 16, 9, 14, 13, 20, 12, 21, 22, 23, 24, 25, 26, 27, 1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 18, 17, 24, 15, 22, 21, 35, 9
Offset: 1

Views

Author

Rémy Sigrist, Dec 06 2016

Keywords

Comments

This sequence is similar to A279119 in the sense that here we check for common ones in binary representation and there we check for common prime factors.
By analogy with A275152, this sequence can be seen as a way to tile the first quadrant with fixed disconnected 2-dimensional polyominoes: the (vertical) polyomino corresponding to n is shifted to the right as little as possible so as not to overlap a previous polyomino, and a(n) gives the corresponding number of steps to the right (see illustration in Links section).

Crossrefs

Programs

  • Maple
    with(Bits):
    n:= 100:
    l:= []:
    g:=[seq(0, i = 0..n-1)]:
    for i from 1 to n by 1
    do
    a:= 0;
    while (And(g[a + 1], i)) > 0
    do
    a++;
    end do:
    g[a + 1] += i;
    l:= [op(l), a];
    end do:
    print(l); # Reza K Ghazi, Dec 29 2021
  • Mathematica
    n = 100;
    l = {};
    g = ConstantArray[0, n];
    For[i = 0, i < n, i++; a = 0; While[BitAnd[g[[a + 1]], i] > 0, a++];
      g[[a + 1]] += i;
      l = Append[l, a]];
    l (* Reza K Ghazi, Dec 29 2021 *)
  • PARI
    g = vector(72); for (n=1, #g, a = 0; while (bitand(g[a+1],n)>0, a++); g[a+1] += n; print1 (a", "))
    
  • Python
    n = 100
    g = n * [0]
    for i in range(1, n + 1):
        a = 0
        while g[a] & i:
            a += 1
        g[a] += i
        print(a, end=', ') # Reza K Ghazi, Dec 29 2021

Formula

a(n)=0 iff n belongs to A000079.
a(n)=1 iff n belongs to A164346.

A340666 A(n,k) is derived from n by replacing each 0 in its binary representation with a string of k 0's; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 8, 3, 4, 3, 0, 1, 16, 3, 16, 5, 3, 0, 1, 32, 3, 64, 9, 6, 7, 0, 1, 64, 3, 256, 17, 12, 7, 1, 0, 1, 128, 3, 1024, 33, 24, 7, 8, 3, 0, 1, 256, 3, 4096, 65, 48, 7, 64, 9, 3, 0, 1, 512, 3, 16384, 129, 96, 7, 512, 33, 10, 7
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2021

Keywords

Examples

			Square array A(n,k) begins:
  0, 0,  0,   0,    0,     0,      0,       0,        0, ...
  1, 1,  1,   1,    1,     1,      1,       1,        1, ...
  1, 2,  4,   8,   16,    32,     64,     128,      256, ...
  3, 3,  3,   3,    3,     3,      3,       3,        3, ...
  1, 4, 16,  64,  256,  1024,   4096,   16384,    65536, ...
  3, 5,  9,  17,   33,    65,    129,     257,      513, ...
  3, 6, 12,  24,   48,    96,    192,     384,      768, ...
  7, 7,  7,   7,    7,     7,      7,       7,        7, ...
  1, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, ...
  ...
		

Crossrefs

Columns k=0-2, 4 give: A038573, A001477, A084471, A084473.
Rows n=0..17, 19 give: A000004, A000012, A000079, A010701, A000302, A000051(k+1), A007283, A010727, A001018, A087289, A007582(k+1), A062709(k+2), A164346, A181565(k+1), A005009, A181404(k+3), A001025, A199493, A253208(k+1).
Main diagonal gives A340667.

Programs

  • Maple
    A:= (n, k)-> Bits[Join](subs(0=[0$k][], Bits[Split](n))):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n<2, n,
         `if`(irem(n, 2, 'r')=1, A(r, k)*2+1, A(r, k)*2^k))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence @@ Table[0, {k}], 2];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 02 2021 *)

Formula

A000120(A(n,k)) = A000120(n) = log_2(A(n,0)+1).
A023416(A(n,k)) = k * A023416(n) for n >= 1.

A178872 Partial sums of round(4^n/7).

Original entry on oeis.org

0, 1, 3, 12, 49, 195, 780, 3121, 12483, 49932, 199729, 798915, 3195660, 12782641, 51130563, 204522252, 818089009, 3272356035, 13089424140, 52357696561, 209430786243, 837723144972, 3350892579889, 13403570319555, 53614281278220, 214457125112881
Offset: 0

Views

Author

Mircea Merca, Dec 28 2010

Keywords

Comments

a(n) (prefixed with a 0) and its higher order differences define the following infinite array:
0, 0, 1, 3, 12, 49,..
0, 1, 2, 9, 37, 146,...
1, 1, 7, 28, 109, 439... - Paul Curtz, Jun 08 2011

Examples

			a(3)=0+1+2+9=12.
		

Crossrefs

Programs

  • Magma
    [Floor((4*4^n+5)/21): n in [0..30]]; // Vincenzo Librandi, May 01 2011
    
  • Maple
    A178872 := proc(n) add( round(4^i/7),i=0..n) ; end proc:
  • Mathematica
    Join[{a = b = 0}, Table[c = 4^n - a - b; a = b; b = c, {n, 0, 100}]] (* Vladimir Joseph Stephan Orlovsky, Jun 28 2011 *)
    Accumulate[Round[4^Range[0,30]/7]] (* or *) LinearRecurrence[{3,3,4},{0,1,3},30] (* Harvey P. Dale, Feb 18 2023 *)
  • PARI
    a(n) = (4^(n+1)+5)\21; \\ Altug Alkan, Oct 05 2017

Formula

a(n) = round((8*4^n+1)/42) = round((4*4^n-4)/21).
a(n) = floor((4*4^n+5)/21).
a(n) = ceiling((4*4^n-4)/21).
a(n) = a(n-3) + 3*4^(n-2) = a(n-3) + A164346(n-2) for n > 2.
a(n) = 3*a(n-1) + 3*a(n-2) + 4*a(n-3) for n > 2.
G.f.: -x/((4*x-1)*(x^2+x+1)).
a(n+1) - 4*a(n) = A049347(n). - Paul Curtz, Jun 08 2011

A280345 a(0) = 3, a(n+1) = 2*a(n) + periodic sequence of length 2: repeat [1, -2].

Original entry on oeis.org

3, 7, 12, 25, 48, 97, 192, 385, 768, 1537, 3072, 6145, 12288, 24577, 49152, 98305, 196608, 393217, 786432, 1572865, 3145728, 6291457, 12582912, 25165825, 50331648, 100663297, 201326592, 402653185, 805306368, 1610612737, 3221225472, 6442450945, 12884901888
Offset: 0

Views

Author

Paul Curtz, Jan 01 2017

Keywords

Comments

a(n) mod 9 is a periodic sequence of length 2: repeat [3, 7].
From 7, the last digit is of period 4: repeat [7, 2, 5, 8].
(Main sequence for the signature (2,1,-2): 0, 0, 1, 2, 5, 10, 21, 42, ... = 0 followed by A000975(n) = b(n), which first differences are A001045(n) (Paul Barry, Oct 08 2005). Then, 0 followed by b(n) is an autosequence of the first kind. The corresponding autosequence of the second kind is 0, 0, 2, 3, 8, 15, 32, 63, ... . See A277078(n).)
Difference table of a(n):
3, 7, 12, 25, 48, 97, 192, ...
4, 5, 13, 23, 49, 95, 193, ... = -(-1)^n* A140683(n)
1, 8, 10, 26, 46, 98, 190, ... = A259713(n)
7, 2, 16, 20, 52, 92, 196, ...
-5, 14, 4, 32, 40, 104, 184, ...
... .

Examples

			a(0) = 3, a(1) = 2*3 + 1 = 7, a(2) = 2*7 - 2 = 12, a(3) = 2*12 + 1 = 25.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 3; a[n_] := a[n] = 2 a[n - 1] + 1 + (-3) Boole[EvenQ@ n]; Table[a@ n, {n, 0, 32}] (* or *)
    CoefficientList[Series[(3 + x - 5 x^2)/((1 - x) (1 + x) (1 - 2 x)), {x, 0, 32}], x] (* Michael De Vlieger, Jan 01 2017 *)
  • PARI
    Vec((3 + x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Jan 01 2017

Formula

a(2n) = 3*4^n, a(2n+1) = 6*4^n + 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n>2.
a(n+2) = a(n) + 9*2^n.
a(n) = 2^(n+2) - A051049(n).
From Colin Barker, Jan 01 2017: (Start)
a(n) = 3*2^n for n even.
a(n) = 3*2^n + 1 for n odd.
G.f.: (3 + x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)).
(End)
Binomial transform of 3, followed by (-1)^n* A140657(n).

Extensions

More terms from Colin Barker, Jan 01 2017
Showing 1-10 of 13 results. Next