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 10 results.

A006138 a(n) = a(n-1) + 3*a(n-2).

Original entry on oeis.org

1, 2, 5, 11, 26, 59, 137, 314, 725, 1667, 3842, 8843, 20369, 46898, 108005, 248699, 572714, 1318811, 3036953, 6993386, 16104245, 37084403, 85397138, 196650347, 452841761, 1042792802, 2401318085, 5529696491, 12733650746, 29322740219, 67523692457, 155491913114
Offset: 0

Views

Author

Keywords

Comments

The binomial transform of a(n) is b(n) = A006190(n+1), which satisfies b(n) = 3*b(n-1) + b(n-2). - Paul Barry, May 21 2006
Partial sums of A105476. - Paul Barry, Feb 02 2007
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 69, 261, 321 and 324, lead to this sequence. For the central square these vectors lead to the companion sequence A105476 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010
Equals the INVERTi transform of A063782: (1, 3, 10, 32, 104, ...). - Gary W. Adamson, Aug 14 2010
Pisano period lengths: 1, 3, 1, 6, 24, 3, 24, 6, 3, 24, 120, 6, 156, 24, 24, 12, 16, 3, 90, 24, ... - R. J. Mathar, Aug 10 2012
The sequence is the INVERT transform of A016116: (1, 1, 2, 2, 4, 4, 8, 8, ...). - Gary W. Adamson, Jul 17 2015

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    a:=[1,2];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Nov 19 2019
  • Magma
    [n le 2 select n else Self(n-1)+3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Sep 15 2016
    
  • Maple
    A006138:=-(1+z)/(-1+z+3*z**2); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[Series[(1+z)/(1-z-3*z^2), {z,0,40}], z] (* Vladimir Joseph Stephan Orlovsky, Jun 11 2011 *)
    Table[(I*Sqrt[3])^(n-1)*(I*Sqrt[3]*ChebyshevU[n, 1/(2*I*Sqrt[3])] + ChebyshevU[n-1, 1/(2*I*Sqrt[3])]), {n, 0, 40}]//Simplify (* G. C. Greubel, Nov 19 2019 *)
    LinearRecurrence[{1,3},{1,2},40] (* Harvey P. Dale, May 29 2025 *)
  • PARI
    main(size)={my(v=vector(size),i);v[1]=1;v[2]=2;for(i=3,size,v[i]=v[i-1]+3*v[i-2]);return(v);} /* Anders Hellström, Jul 17 2015 */
    
  • Sage
    def A006138_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x)/(1-x-3*x^2)).list()
    A006138_list(40) # G. C. Greubel, Nov 19 2019
    

Formula

a(n) = Sum_{k=0..n+1} A122950(n+1,k)*2^(n+1-k). - Philippe Deléham, Jan 04 2008
G.f.: (1+x)/(1-x-3*x^2). - Paul Barry, May 21 2006
a(n) = Sum_{k=0..n} C(floor((2n-k)/2),n-k)*3^floor(k/2). - Paul Barry, Feb 02 2007
a(n) = A006130(n) + A006130(n-1). - R. J. Mathar, Jun 22 2011
a(n) = (i*sqrt(3))^(n-1)*(i*sqrt(3)*ChebyshevU(n, 1/(2*i*sqrt(3))) + ChebyshevU(n-1, 1/(2*i*sqrt(3)))), where i=sqrt(-1). - G. C. Greubel, Nov 19 2019

Extensions

Typo in formula corrected by Johannes W. Meijer, Aug 15 2010

A215244 a(n) is the number of ways of writing the binary expansion of n as a product (or concatenation) of palindromes.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 4, 4, 3, 3, 3, 4, 3, 4, 8, 8, 5, 4, 5, 5, 5, 4, 6, 8, 5, 5, 6, 8, 6, 8, 16, 16, 9, 7, 9, 8, 6, 6, 10, 10, 6, 8, 8, 7, 7, 7, 12, 16, 9, 7, 10, 8, 8, 8, 11, 16, 10, 10, 11, 16, 12, 16, 32, 32, 17, 13, 17, 13, 11, 11, 18, 15, 11, 10, 10, 12, 9, 11, 20, 20, 11, 10, 11, 13, 13, 10, 16, 14, 9, 10, 12, 13, 11, 13, 24, 32, 17, 13, 18, 14, 11, 12, 19, 16, 10, 13
Offset: 0

Views

Author

N. J. A. Sloane, Aug 07 2012

Keywords

Comments

"Product" is used here is the usual sense of combinatorics on words.
The sequence may be arranged into a triangle in which row k contains the 2^k terms [a(2^k), ..., a(2^(k+1)-1)]: (1), (1), (1,2), (2,2,2,4), ... The row sums of this triangle appear to be A063782. - R. J. Mathar, Aug 09 2012. I have a proof that A063782 does indeed give the row sums. - N. J. A. Sloane, Aug 10 2012
a(A220654(n)) = n and a(m) < n for m < A220654(n). - Reinhard Zumkeller, Dec 17 2012

Examples

			a(4)=2 since 4 = 100, and 100 can be written as either 1.0.0 or 1.00.
a(5)=2 from 1.0.1, 101.
a(10)=3 from 1.0.1.0, 1.010, 101.1
Written as a triangle, the sequence is:
1,
1,
1, 2,
2, 2, 2, 4,
4, 3, 3, 3, 4, 3, 4, 8,
8, 5, 4, 5, 5, 5, 4, 6, 8, 5, 5, 6, 8, 6, 8, 16,
16, 9, 7, 9, 8, 6, 6, 10, 10, 6, 8, 8, 7, 7, 7, 12, 16, 9, 7, 10, 8, 8, 8, 11, 16, 10, 10, 11, 16, 12, 16, 32,
...
		

Crossrefs

Programs

  • Haskell
    import Data.Map (Map, singleton, (!), insert)
    import Data.List (inits, tails)
    newtype Bin = Bin [Int] deriving (Eq, Show, Read)
    instance Ord Bin where
       Bin us <= Bin vs | length us == length vs = us <= vs
                        | otherwise              = length us <= length vs
    a215244 n = a215244_list !! n
    a215244_list = 1 : f [1] (singleton (Bin [0]) 1) where
       f bs m | last bs == 1 = y : f (succ bs) (insert (Bin bs) y m)
              | otherwise    = f (succ bs) (insert (Bin bs) y m) where
         y = fromEnum (pal bs) +
             sum (zipWith (\us vs -> if pal us then m ! Bin vs else 0)
                          (init $ drop 1 $ inits bs) (drop 1 $ tails bs))
         pal ds = reverse ds == ds
         succ [] = [0]; succ (0:ds) = 1 : ds; succ (1:ds) = 0 : succ ds
    -- Reinhard Zumkeller, Dec 17 2012
  • Maple
    isPal := proc(L)
        local d ;
        for d from 1 to nops(L)/2 do
            if op(d,L) <> op(-d,L) then
                return false;
            end if;
        end do:
        return true;
    end proc:
    A215244L := proc(L)
        local a,c;
        a := 0 ;
        if isPal(L) then
            a := 1;
        end if;
        for c from 1 to nops(L)-1 do
            if isPal( [op(1..c,L)] ) then
                a := a+procname([op(c+1..nops(L),L)]) ;
            end if;
        end do:
        return a;
    end proc:
    A215244 := proc(n)
        if n = 1 then
            1;
        else
            convert(n,base,2) ;
            A215244L(%) ;
        end if;
    end proc: # R. J. Mathar, Aug 07 2012
    # Caution: the last procedure applies A215244L to the reverse of the binary expansion of n, which is perfectly OK but might cause a problem if the procedure was used in a different problem. - N. J. A. Sloane, Aug 11 2012
  • Mathematica
    palQ[L_] := SameQ[L, Reverse[L]];
    b[L_] := b[L] = Module[{a = palQ[L] // Boole, c}, For[c = 1, c < Length[L], c++, If[palQ[L[[;;c]]], a = a + b[L[[c+1;;]]]]]; a];
    a[n_] := If[n == 1, 1, b[IntegerDigits[n, 2]]];
    a /@ Range[0, 106] (* Jean-François Alcover, Oct 27 2019 *)

A179606 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + x)/(1 - 3*x - 5*x^2).

Original entry on oeis.org

1, 4, 17, 71, 298, 1249, 5237, 21956, 92053, 385939, 1618082, 6783941, 28442233, 119246404, 499950377, 2096083151, 8788001338, 36844419769, 154473265997, 647641896836, 2715292020493, 11384085545659, 47728716739442
Offset: 0

Views

Author

Johannes W. Meijer, Jul 28 2010

Keywords

Comments

a(n) represents the number of n-move routes of a fairy chess piece starting in the central square (m = 5) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
The sequence above corresponds to 24 red king vectors, i.e., A[5] vectors, with decimal values 27, 30, 51, 54, 57, 60, 90, 114, 120, 147, 150, 153, 156, 177, 180, 210, 216, 240, 282, 306, 312, 402, 408 and 432. These vectors lead for the corner squares to A015523 and for the side squares to A152187.
This sequence belongs to a family of sequences with g.f. (1 + (k-4)*x)/(1 - 3*x - k*x^2). Red king sequences that are members of this family are A007483 (k= 2), A015521 (k=4), A179606 (k=5; this sequence), A154964 (k=6), A179603 (k=7) and A179599 (k=8). We observe that there is no red king sequence for k=3. Other members of this family are A006190 (k=1), A133494 (k=0) and A168616 (k=-2).
Inverse binomial transform of A052918.
The sequence b(n+1) = 6*a(n), n >= 0 with b(0)=1, is a berserker sequence, see A180147. The b(n) sequence corresponds to 16 A[5] vectors with decimal values between 111 and 492. These vectors lead for the corner squares to sequence c(n+1)=4*A179606(n), n >= 0 with c(0)=1, and for the side squares to A180140. - Johannes W. Meijer, Aug 14 2010
Equals the INVERT transform of A063782: (1, 3, 10, 32, 104, ...). Example: a(3) = 71 = (1, 1, 4, 7) dot (32, 10, 3, 1) = (32 + 10 + 12 + 17). - Gary W. Adamson, Aug 14 2010

Crossrefs

Cf. A179597 (central square).

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; m:=5; A[1]:= [0,1,0,1,1,0,0,0,0]: A[2]:= [1,0,1,1,1,1,0,0,0]: A[3]:= [0,1,0,0,1,1,0,0,0]: A[4]:= [1,1,0,0,1,0,1,1,0]: A[5]:= [0,0,0,1,1,1,0,0,1]: A[6]:= [0,1,1,0,1,0,0,1,1]: A[7]:= [0,0,0,1,1,0,0,1,0]: A[8]:= [0,0,0,1,1,1,1,0,1]: A[9]:= [0,0,0,0,1,1,0,1,0]: A:=Matrix([A[1],A[2],A[3],A[4],A[5],A[6],A[7],A[8],A[9]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    CoefficientList[Series[(1+x)/(1-3*x-5*x^2), {x, 0, 22}],x] (* or *) LinearRecurrence[{3,5,0},{1,4},23] (* Indranil Ghosh, Mar 05 2017 *)
  • PARI
    print(Vec((1 + x)/(1- 3*x - 5*x^2) + O(x^23))); \\ Indranil Ghosh, Mar 05 2017

Formula

G.f.: (1+x)/(1 - 3*x - 5*x^2).
a(n) = A015523(n) + A015523(n+1).
a(n) = 3*a(n-1) + 5*a(n-2) with a(0) = 1 and a(1) = 4.
a(n) = ((29 + 7*sqrt(29))*A^(-n-1) + (29-7*sqrt(29))*B^(-n-1))/290 with A = (-3+sqrt(29))/10 and B = (-3-sqrt(29))/10
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n+1)*A000351(n)*A130196(n)/(A015523(n)*sqrt(29) - A072263(n)) for n >= 1.

A360571 Triangle read by rows: T(n,k) is the k-th Lie-Betti number of the path graph on n-vertices, n >= 1, 0 <= k <= 2*n - 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 3, 6, 6, 3, 1, 1, 4, 11, 16, 16, 11, 4, 1, 1, 5, 17, 33, 48, 48, 33, 17, 5, 1, 1, 6, 24, 58, 107, 140, 140, 107, 58, 24, 6, 1, 1, 7, 32, 92, 203, 329, 424, 424, 329, 203, 92, 32, 7, 1, 1, 8, 41, 136, 347, 668, 1039, 1280, 1280, 1039, 668, 347, 136, 41, 8, 1
Offset: 1

Views

Author

Samuel J. Bevins, Feb 12 2023

Keywords

Examples

			Triangle begins:
      k=0  1  2   3   4    5    6    7     8     9   10   11   12  13 14 15
  n=1:  1  1
  n=2:  1  2  2   1
  n=3:  1  3  6   6   3    1
  n=4:  1  4 11  16  16   11    4    1
  n=5:  1  5 17  33  48   48   33   17     5     1
  n=6:  1  6 24  58 107  140  140  107    58    24    6    1
  n=7:  1  7 32  92 203  329  424  424   329   203   92   32    7   1
  n=8:  1  8 41 136 347  668 1039 1280  1280  1039  668  347  136  41  8  1
		

Crossrefs

Cf. A360572 (cycle graph), A088459 (star graph), A360625 (complete graph), A360938 (ladder graph), A360937 (wheel graph).
Cf. A063782 appears to be half the row sum.

Programs

  • SageMath
    from sage.algebras.lie_algebras.lie_algebra import LieAlgebra
    def LieAlgebraFromGraph(G, Module = QQ):
        ''' Takes a graph and a module (optional) as an input.'''
        d = {}
        for edge in G.edges(): # this defines the relations among the generators of the Lie algebra
            key = ("x" + str(edge[0]), "x" + str(edge[1])) #[x_i, x_j]
            value = {"x_" + str(edge[0]) + "" + str(edge[1]): 1} #x{i,j}
            d[key] = value #appending to the dictionary d
        C = LieAlgebras(Module).WithBasis().Graded() #defines the category that we need to work with.
        C = C.FiniteDimensional().Stratified().Nilpotent() #specifies that the algebras we want should be finite, stratified, and nilpotent
        L = LieAlgebra(Module, d, nilpotent=True, category=C)
        def sort_generators_by_grading(lie_algebra, grading_operator): #this sorts the generators by their grading. In this case, V1 are vertices and V2
            generators = lie_algebra.gens()
            grading = [grading_operator(g) for g in generators] #using the grading operator to split the elements into their respective vector spaces
            sorted_generators = [g for _, g in sorted(zip(grading, generators))]
            grouped_generators = {}
            for g in sorted_generators:
                if grading_operator(g) in grouped_generators:
                    grouped_generators[grading_operator(g)].append(g)
                else:
                    grouped_generators[grading_operator(g)] = [g]
            return grouped_generators
        grading_operator = lambda g: g.degree() #defining the grading operator
        grouped_generators = sort_generators_by_grading(L, grading_operator) #evaluating the function to pull the generators apart
        V1 = grouped_generators[1] #elements from vertices
        V2 = grouped_generators[2] #elements from edges
        return L #, V1, V2 #returns the Lie algebra and the two vector spaces
    def betti_numbers(lie_algebra): #this function will calculate the Lie theoretic Betti numbers and return them as a list
        dims = []
        H = lie_algebra.cohomology()
        for n in range(lie_algebra.dimension() + 1):
            dims.append(H[n].dimension())
        return dims
    def A360571_row(n):
        if n == 1: return [1, 1]
        return betti_numbers(LieAlgebraFromGraph(graphs.PathGraph(n)))
    for n in range(1,7): print(A360571_row(n))

A087206 a(n) = 2*a(n-1) + 4*a(n-2); with a(0)=1, a(1)=4.

Original entry on oeis.org

1, 4, 12, 40, 128, 416, 1344, 4352, 14080, 45568, 147456, 477184, 1544192, 4997120, 16171008, 52330496, 169345024, 548012032, 1773404160, 5738856448, 18571329536, 60098084864, 194481487872, 629355315200, 2036636581888
Offset: 0

Views

Author

Paul Barry, Aug 25 2003

Keywords

Comments

Binomial transform of A056487. Unsigned version of A152174.
Number of words of length n over the alphabet {1,2,3,4} such that no odd letter is followed by an odd letter. - Armend Shabani, Feb 18 2017
From Sean A. Irvine, Jun 06 2025: (Start)
Also, the number of walks of length n starting at 0 in the following graph:
1---2
|\ /|
| 0 |
|/ \|
4---3. (End)

Crossrefs

Equals (1/2) * A063727(n-1). Cf. A006483.

Programs

Formula

G.f.: (1+2x)/(1-2x-4x^2).
a(n) = (1-sqrt(5))^n*(1/2-3*sqrt(5)/10)+(1+sqrt(5))^n*(1/2+3*sqrt(5)/10).
a(n) = 2^n*Fibonacci(n+2). - Paul Barry, Mar 22 2004
a(n) = ((1+sqrt(5))^n-(1-sqrt(5))^n)/sqrt(80). Offset 2. a(4)=12. - Al Hakanson (hawkuu(AT)gmail.com), Apr 11 2009
G.f.: 1/(-2x-1/(-2x-1)). - Paul Barry, Mar 24 2010

Extensions

Comment corrected by Philippe Deléham, Nov 27 2008

A209144 Triangle of coefficients of polynomials v(n,x) jointly generated with A209143; see the Formula section.

Original entry on oeis.org

1, 3, 6, 1, 12, 5, 24, 16, 1, 48, 44, 7, 96, 112, 30, 1, 192, 272, 104, 9, 384, 640, 320, 48, 1, 768, 1472, 912, 200, 11, 1536, 3328, 2464, 720, 70, 1, 3072, 7424, 6400, 2352, 340, 13, 6144, 16384, 16128, 7168, 1400, 96, 1, 12288, 35840, 39680, 20736
Offset: 1

Views

Author

Clark Kimberling, Mar 06 2012

Keywords

Comments

Alternating row sums: 1,3,5,7,9,11,13,15,17,...
For a discussion and guide to related arrays, see A208510.
Subtriangle of the triangle given by (3,-1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 07 2012

Examples

			First five rows:
   1;
   3;
   6,  1;
  12,  5;
  24, 16, 1;
First three polynomials v(n,x): 1, 3, 6 + x.
(3,-1, 0, 0, 0, ...) DELTA (0, 1/3, -1/3, 0, 0, ...) begins:
    1;
    3,   0;
    6,   1,   0;
   12,   5,   0, 0;
   24,  16,   1, 0, 0;
   48,  44,   7, 0, 0, 0;
   96, 112,  30, 1, 0, 0, 0;
  192, 272, 104, 9, 0, 0, 0, 0;
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A209143 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A209144 *)

Formula

u(n,x) = u(n-1,x) + (x+1)*v(n-1,x),
v(n,x) = u(n-1,x) + v(n-1,x) + 1,
where u(1,x)=1, v(1,x)=1.
From Philippe Deléham, Mar 07 2012: (Start)
As triangle T(n,k) with 0 <= k <= n:
T(n,k) = 2*T(n-1,k) + T(n-2,k-1), T(0,0) = 1, T(1,0) = 3, T(1,1) = 0 and T(n,k) = 0 if k < 0 or if k > n.
G.f.: (1+x)/(1-2*x-y*x^2).
Sum_{k=0..n} T(n,k)*x^k = A005408(n), A003945(n), A078057(n), A028859(n), A000244(n), A063782(n), A180168(n) for x = -1, 0, 1, 2, 3, 4, 5 respectively. (End)

A207543 Triangle read by rows, expansion of (1+y*x)/(1-2*y*x+y*(y-1)*x^2).

Original entry on oeis.org

1, 0, 3, 0, 1, 5, 0, 0, 5, 7, 0, 0, 1, 14, 9, 0, 0, 0, 7, 30, 11, 0, 0, 0, 1, 27, 55, 13, 0, 0, 0, 0, 9, 77, 91, 15, 0, 0, 0, 0, 1, 44, 182, 140, 17, 0, 0, 0, 0, 0, 11, 156, 378, 204, 19, 0, 0, 0, 0, 0, 1, 65, 450, 714, 285, 21, 0
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2012

Keywords

Comments

Previous name was: "A scaled version of triangle A082985."
Triangle, read by rows, given by (0, 1/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, -4/3, 1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Examples

			Triangle begins :
1
0, 3
0, 1, 5
0, 0, 5, 7
0, 0, 1, 14, 9
0, 0, 0, 7, 30, 11
0, 0, 0, 1, 27, 55, 13
0, 0, 0, 0, 9, 77, 91, 15
0, 0, 0, 0, 1, 44, 182, 140, 17
0, 0, 0, 0, 0, 11, 156, 378, 204, 19
0, 0, 0, 0, 0, 1, 65, 450, 714, 285, 21
0, 0, 0, 0, 0, 0, 13, 275, 1122, 1254, 385, 23
		

Crossrefs

Cf. A082985 which is another version of this triangle.
Cf. Diagonals : A005408, A000330, A005585, A050486, A054333, A057788. Cf. A119900.

Programs

  • Maple
    s := (1+y*x)/(1-2*y*x+y*(y-1)*x^2): t := series(s,x,12):
    seq(print(seq(coeff(coeff(t,x,n),y,m),m=0..n)),n=0..11); # Peter Luschny, Aug 17 2016

Formula

T(n,k) = 2*T(n-1,k-1) + T(n-2,k-1) - T(n-2,k-2), T(0,0) = 1, T(1,0) = 0, T(1,1) = 3.
G.f.: (1+y*x)/(1-2*y*x+y*(y-1)*x^2).
Sum_{i, i>=0} T(n+i,n) = A000204(2*n+1).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A078069(n), A000007(n), A003945(n), A111566(n) for x = -1, 0, 1, 2 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A090131(n), A005408(n), A003945(n), A078057(n), A028859(n), A000244(n), A063782(n), A180168(n) for x = -1, 0, 1, 2, 3, 4, 5, 6 respectively.
From Peter Bala, Aug 17 2016: (Start)
Let S(k,n) = Sum_{i = 1..n} i^k. Calculations in Zielinski 2016 suggest the following identity holds involving the p-th row elements of this triangle:
Sum_{k = 0..p} T(p,k)*S(2*k,n) = 1/2*(2*n + 1)*(n*(n + 1))^p.
For example, for row 6 we find S(6,n) + 27*S(8,n) + 55*S(10,n) + 13*S(12,n) = 1/2*(2*n + 1)*(n*(n + 1))^6.
There appears to be a similar result for the odd power sums S(2*k + 1,n) involving A119900. (End)

Extensions

New name using a formula of the author from Peter Luschny, Aug 17 2016

A319053 a(n) is the exponent of the largest power of 2 that appears in the factorization of the entries in the matrix {{3,1},{1,-1}}^n.

Original entry on oeis.org

0, 1, 5, 3, 4, 8, 6, 7, 12, 9, 10, 15, 12, 13, 18, 15, 16, 20, 18, 19, 25, 21, 22, 28, 24, 25, 31, 27, 28, 32, 30, 31, 36, 33, 34, 39, 36, 37, 42, 39, 40, 44, 42, 43, 50, 45, 46, 53, 48, 49, 56, 51, 52, 56, 54, 55, 60, 57, 58, 63, 60, 61, 66, 63, 64, 68, 66, 67, 73, 69
Offset: 1

Views

Author

Greg Dresden, Sep 09 2018

Keywords

Comments

a(n) appears to equal n-1 for n not a multiple of 3.
The matrix entries of M^n, with n >= 0, are M^n(1, 1) = 2^(n-1)*F(n+3) = A063782(n), M^n(2, 2) = 2^(n-1)*F(n-3) = A319196(n), M^n(1, 2) = M^n(2, 1) = 2^(n-1)*F(n) = A085449(n), where i = sqrt(-1), F = A000045, and F(-1) = 1, F(-2) = -1, F(-3) = 2. Proof by Cayley-Hamilton, with S(n, -i) = (-i)^n*F(n+1), where S(n, x) is given in A049310. - Wolfdieter Lang, Oct 08 2018
The above conjecture is true. From the preceding formulas for the elements of M^n this claims that the Fibonacci numbers F(n-3), F(n) and F(n+3) are always odd for n == 1 or 2 (mod 3). This is true because F(n) is even iff n == 0 (mod 3) (see e.g. Vajda, p.73), and each of the three indices is == 1 or 2 (mod 3) for n == 1 or 2 (mod 3), respectively. - Wolfdieter Lang, Oct 09 2018

Examples

			For n = 3, the matrix {{3,1},{1,-1}}^3 = {{32,8},{8,0}} and the largest power of 2 appearing in the factorization of any entry is 2^5 = 32. Hence, a(3) = 5.
		

References

  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989, p. 73.

Crossrefs

Programs

  • Mathematica
    Join[{0, 1, 5}, Table[Max[ IntegerExponent[Flatten[MatrixPower[{{3, 1}, {1, -1}}, n]], 2]], {n, 4, 40}]]
  • PARI
    a(n) = vecmax(apply(x->if (x, valuation(x, 2), 0), [3,1;1,-1]^n)); \\ Michel Marcus, Sep 09 2018

A223211 3 X 3 X 3 triangular graph coloring a rectangular array: number of n X 1 0..5 arrays where 0..5 label nodes of a graph with edges 0,1 0,2 1,2 1,3 1,4 2,4 3,4 2,5 4,5 and every array movement to a horizontal or vertical neighbor moves along an edge of this graph.

Original entry on oeis.org

6, 18, 60, 192, 624, 2016, 6528, 21120, 68352, 221184, 715776, 2316288, 7495680, 24256512, 78495744, 254017536, 822018048, 2660106240, 8608284672, 27856994304, 90147127296, 291722231808, 944032972800, 3054954872832, 9886041636864
Offset: 1

Views

Author

R. H. Hardin, Mar 18 2013

Keywords

Comments

Column 1 of A223218.

Examples

			Some solutions for n=3:
..4....4....0....2....1....4....2....3....2....2....0....5....1....3....4....5
..2....1....1....5....2....2....1....1....0....1....1....4....3....4....3....2
..0....4....4....2....0....4....2....0....2....0....0....2....1....1....1....1
		

Crossrefs

Cf. A223218.

Formula

Empirical: a(n) = 2*a(n-1) + 4*a(n-2) = 6*A063782(n-1).
Conjectures from Colin Barker, Aug 17 2018: (Start)
G.f.: 6*x*(1 + x) / (1 - 2*x - 4*x^2).
a(n) = (3*((1-sqrt(5))^n*(-3+sqrt(5)) + (1+sqrt(5))^n*(3+sqrt(5)))) / (4*sqrt(5)).
(End)

A319196 a(n) = 2^(n-1)*Fibonacci(n-3), n >= 0.

Original entry on oeis.org

1, -1, 2, 0, 8, 16, 64, 192, 640, 2048, 6656, 21504, 69632, 225280, 729088, 2359296, 7634944, 24707072, 79953920, 258736128, 837287936, 2709520384, 8768192512, 28374466560, 91821703168, 297141272576, 961569357824, 3111703805952, 10069685043200, 32586185310208, 105451110793216
Offset: 0

Views

Author

Wolfdieter Lang, Oct 09 2018

Keywords

Comments

This sequence gives the elements M^n(2, 2) of the matrix M = [[3, 1], [1, -1]].
Motivation to look into these matrix powers came from A319053. M^n[1, 1] = A063782 and M^n(1, 2) = M^n(2, 1) = A085449(n). Proof by Cayley-Hamilton, using S(n, -I) = (-I)^n*F(n+1), and S(n, x) from A049310 and F = A000045.
For a similar signed sequence see A087205.

Crossrefs

Programs

  • Magma
    [2^(n-1)*Fibonacci(n-3): n in [0..30]]; // Vincenzo Librandi, Oct 09 2018
  • Mathematica
    Table[2^(n-1) Fibonacci[n-3], {n, 0, 40}] (* Vincenzo Librandi, Oct 09 2018 *)
    LinearRecurrence[{2,4},{1,-1},40] (* Harvey P. Dale, Mar 29 2020 *)

Formula

a(n) = 2^(n-1)*F(n-3), n >= 0, with F = A000045 with F(-1) = 1, F(-2) = -1 and F(-3) = 1.
G.f.: (1-3*x)/(1-2*x-(2*x)^2).
a(n) = 2*(a(n-1) + 2*a(n-2)), n >= 2, with a(0) = 1 and a(1) = -1.
a(n) = 2^(n-1)*(phi^(n-3) - (1 - phi)^(n-3))/(2*phi - 1) with the golden section phi = A001622.
Showing 1-10 of 10 results.