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 401 results. Next

A008937 a(n) = Sum_{k=0..n} T(k) where T(n) are the tribonacci numbers A000073.

Original entry on oeis.org

0, 1, 2, 4, 8, 15, 28, 52, 96, 177, 326, 600, 1104, 2031, 3736, 6872, 12640, 23249, 42762, 78652, 144664, 266079, 489396, 900140, 1655616, 3045153, 5600910, 10301680, 18947744, 34850335, 64099760, 117897840, 216847936, 398845537, 733591314, 1349284788
Offset: 0

Views

Author

N. J. A. Sloane, Alejandro Teruel (teruel(AT)usb.ve)

Keywords

Comments

a(n+1) is the number of n-bit sequences that avoid 1100. - David Callan, Jul 19 2004 [corrected by Kent E. Morrison, Jan 08 2019]. Also the number of n-bit sequences avoiding one of the patterns 1000, 0011, 1110, ... or any binary string of length 4 without overlap at beginning and end. Strings where it is not true are: 1111, 1010, 1001, ... and their bitwise complements. - Alois P. Heinz, Jan 09 2019
Row sums of Riordan array (1/(1-x), x(1+x+x^2)). - Paul Barry, Feb 16 2005
Diagonal sums of Riordan array (1/(1-x)^2, x(1+x)/(1-x)), A104698.
A shifted version of this sequence can be found in Eqs. (4) and (3) on p. 356 of Dunkel (1925) with r = 3. (Equation (3) follows equation (4) in the paper!) The whole paper is a study of the properties of this and other similar sequences indexed by the parameter r. For r = 2, we get a shifted version of A000071. For r = 4, we get a shifted version of A107066. For r = 5, we get a shifted version of A001949. For r = 6, we get a shifted version of A172316. See also the table in A172119. - Petros Hadjicostas, Jun 14 2019
Officially, to match A000073, this should start with a(0)=a(1)=0, a(2)=1. - N. J. A. Sloane, Sep 12 2020
Numbers with tribonacci representation that is a prefix of 100100100100... . - Jeffrey Shallit, Jul 10 2024

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 28*x^6 + 52*x^7 + 96*x^8 + 177*x^9 + ... [edited by _Petros Hadjicostas_, Jun 12 2019]
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 41.

Crossrefs

Partial sums of A000073. Cf. A000213, A018921, A027084, A077908, A209972.
Row sums of A055216.
Column k = 1 of A140997 and second main diagonal of A140994.

Programs

  • GAP
    a:=[0,1,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Sep 13 2019
  • Haskell
    a008937 n = a008937_list !! n
    a008937_list = tail $ scanl1 (+) a000073_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else n eq 3 select 2 else n eq 4 select 4 else 2*Self(n-1)-Self(n-4): n in [1..40] ]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A008937 := proc(n) option remember; if n <= 3 then 2^n else 2*procname(n-1)-procname(n-4) fi; end;
    a:= n-> (Matrix([[1,1,0,0], [1,0,1,0], [1,0,0,0], [1,0,0,1]])^n)[4,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
  • Mathematica
    CoefficientList[Series[x/(1-2x+x^4), {x, 0, 40}], x]
    Accumulate[LinearRecurrence[{1,1,1},{0,1,1},40]] (* Harvey P. Dale, Dec 04 2017 *)
    LinearRecurrence[{2, 0, 0, -1},{0, 1, 2, 4},40] (* Ray Chandler, Mar 01 2024 *)
  • PARI
    {a(n) = if( n<0, polcoeff( - x^3 / (1 - 2*x^3 + x^4) + x * O(x^-n), -n), polcoeff( x / (1 - 2*x + x^4) + x * O(x^n), n))}; /* Michael Somos, Aug 23 2014 */
    
  • PARI
    a(n) = sum(j=0, n\2, sum(k=0, j, binomial(n-2*j,k+1)*binomial(j,k)*2^k)); \\ Michel Marcus, Sep 08 2017
    
  • SageMath
    def A008937_list(prec):
        P = PowerSeriesRing(ZZ, 'x', prec)
        x = P.gen().O(prec)
        return (x/(1-2*x+x^4)).list()
    A008937_list(40) # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = A018921(n-2) = A027084(n+1) + 1.
a(n) = (A000073(n+2) + A000073(n+4) - 1)/2.
From Mario Catalani (mario.catalani(AT)unito.it), Aug 09 2002: (Start)
G.f.: x/((1-x)*(1-x-x^2-x^3)).
a(n) = 2*a(n-1) - a(n-4), a(0) = 0, a(1) = 1, a(2) = 2, a(3) = 4. (End)
a(n) = 1 + a(n-1) + a(n-2) + a(n-3). E.g., a(11) = 1 + 600 + 326 + 177 = 1104. - Philippe LALLOUET (philip.lallouet(AT)orange.fr), Oct 29 2007
a(n) = term (4,1) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,0; 1,0,0,1]^n. - Alois P. Heinz, Jul 24 2008
a(n) = -A077908(-n-3). - Alois P. Heinz, Jul 24 2008
a(n) = (A000213(n+2) - 1) / 2. - Reinhard Zumkeller, Apr 07 2012
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} binomial(n-2j,k+1) *binomial(j,k)*2^k. - Tony Foster III, Sep 08 2017
a(n) = Sum_{k=0..floor(n/2)} (n-2*k)*hypergeom([-k,-n+2*k+1], [2], 2). - Peter Luschny, Nov 09 2017
a(n) = 2^(n-1)*hypergeom([1-n/4, 1/4-n/4, 3/4-n/4, 1/2-n/4], [1-n/3, 1/3-n/3, 2/3-n/3], 16/27) for n > 0. - Peter Luschny, Aug 20 2020
a(n-1) = T(n) + T(n-3) + T(n-6) + ... + T(2+((n-2) mod 3)), for n >= 4, where T is A000073(n+1). - Jeffrey Shallit, Dec 24 2020

A046738 Period of Fibonacci 3-step sequence A000073 mod n.

Original entry on oeis.org

1, 4, 13, 8, 31, 52, 48, 16, 39, 124, 110, 104, 168, 48, 403, 32, 96, 156, 360, 248, 624, 220, 553, 208, 155, 168, 117, 48, 140, 1612, 331, 64, 1430, 96, 1488, 312, 469, 360, 2184, 496, 560, 624, 308, 440, 1209, 2212, 46, 416, 336, 620, 1248, 168
Offset: 1

Views

Author

Keywords

Comments

Could also be called the tribonacci Pisano periods. [Carl R. White, Oct 05 2009]
Klaska notes that n=208919=59*3541 satisfies a(n) = a(n^2). - Michel Marcus, Mar 03 2016
39, 78, 273, 546 also satisfy a(n) = a(n^2). - Michel Marcus, Mar 07 2016

Crossrefs

Cf. A106302.
Cf. A001175.

Programs

  • Maple
    a:= proc(n) local f, k, l; l:= ifactors(n)[2];
          if nops(l)<>1 then ilcm(seq(a(i[1]^i[2]), i=l))
        else f:= [0, 0, 1];
             for k do f:=[f[2], f[3], f[1]+f[2]+f[3] mod n];
                      if f=[0, 0, 1] then break fi
             od; k
          fi
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 27 2023
  • Mathematica
    Table[a = {0, 1, 1}; a = a0 = Mod[a, n]; k = 0; While[k++; s = a[[3]] + a[[2]] + a[[1]]; a = RotateLeft[a]; a[[-1]] = Mod[s, n]; a != a0]; k, {n, 100}] (* T. D. Noe, Aug 28 2012 *)
  • Python
    from itertools import count
    def A046738(n):
        a = b = (0,0,1%n)
        for m in count(1):
            b = b[1:] + (sum(b) % n,)
            if a == b:
                return m # Chai Wah Wu, Feb 27 2022

Formula

a(3^k) = 13*3^(k-1) for k > 0. If a(p) != a(p^2) for p prime, then a(p^k) = p^(k-1)*a(p) for k > 0 [Waddill, 1978]. - Chai Wah Wu, Feb 25 2022
Let the prime factorization of n be p1^e1*...*pk^ek. Then a(n) = lcm(a(p1^e1), ..., a(pk^ek)) [Waddill, 1978]. - Avery Diep, Aug 26 2025

A232570 Numbers k that divide tribonacci(k) (A000073(k)).

Original entry on oeis.org

1, 8, 16, 19, 32, 47, 53, 64, 103, 112, 128, 144, 155, 163, 192, 199, 208, 221, 224, 256, 257, 269, 272, 299, 311, 368, 397, 401, 419, 421, 448, 499, 512, 587, 599, 617, 640, 683, 757, 768, 773, 784, 863, 883, 896, 907, 911, 929, 936, 991, 1021, 1024
Offset: 1

Views

Author

Seiichi Manyama, Jun 17 2016

Keywords

Comments

Inspired by A023172 (numbers k such that k divides Fibonacci(k)).
Includes all primes p such that x^3-x^2-x-1 has 3 distinct roots in the field GF(p) (A106279). - Robert Israel, Feb 07 2018
Includes 2^k for k >= 3. - Robert Israel, Jul 26 2024

Crossrefs

Programs

  • Maple
    with(LinearAlgebra[Modular]):
    T:= (n, m)-> MatrixPower(m, Mod(m, <<0|1|0>,
        <0|0|1>, <1|1|1>>, float[8]), n)[1, 3]:
    a:= proc(n) option remember; local k; if n=1
          then 1 else for k from 1+a(n-1)
          while T(k$2)>0 do od; k fi
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Feb 05 2018
  • Mathematica
    trib = LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 2000]; Reap[Do[If[Divisible[ trib[[n+1]], n], Print[n]; Sow[n]], {n, 1, Length[trib]-1}]][[2, 1]] (* Jean-François Alcover, Mar 22 2019 *)
  • Ruby
    require 'matrix'
    def power(a, n, mod)
      return Matrix.I(a.row_size) if n == 0
      m = power(a, n >> 1, mod)
      m = (m * m).map{|i| i % mod}
      return m if n & 1 == 0
      (m * a).map{|i| i % mod}
    end
    def f(m, n)
      ary0 = Array.new(m, 0)
      ary0[0] = 1
      v = Vector.elements(ary0)
      ary1 = [Array.new(m, 1)]
      (0..m - 2).each{|i|
        ary2 = Array.new(m, 0)
        ary2[i] = 1
        ary1 << ary2
      }
      a = Matrix[*ary1]
      mod = n
      (power(a, n, mod) * v)[m - 1]
    end
    def a(n)
      (1..n).select{|i| f(3, i) == 0}
    end

A085697 a(n) = T(n)^2, where T(n) = A000073(n) is the n-th tribonacci number.

Original entry on oeis.org

0, 0, 1, 1, 4, 16, 49, 169, 576, 1936, 6561, 22201, 75076, 254016, 859329, 2907025, 9834496, 33269824, 112550881, 380757169, 1288092100, 4357584144, 14741602225, 49870482489, 168710633536, 570743986576, 1930813074369, 6531893843049
Offset: 0

Views

Author

Emanuele Munarini, Jul 18 2003

Keywords

Comments

In general, squaring the terms of a third-order linear recurrence with signature (x,y,z) will result in a sixth-order recurrence with signature (x^2 + y, x^2*y + z*x + y^2, x^3*z + 4*x*y*z - y^3 + 2*z^2, x^2*z^2 - x*y^2*z - z^2*y, z^2*y^2 - z^3*x, -z^4). - Gary Detlefs, Jan 10 2023

References

  • R. Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0,0] cat Coefficients(R!( x^2*(1-x-x^2-x^3)/((1-3*x-x^2-x^3)*(1+x+x^2-x^3)) )); // G. C. Greubel, Nov 20 2021
    
  • Mathematica
    LinearRecurrence[{2,3,6,-1,0,-1},{0,0,1,1,4,16},30] (* Harvey P. Dale, Oct 26 2020 *)
  • Maxima
    t[0]:0$  t[1]:0$  t[2]:1$
    t[n]:=t[n-1]+t[n-2]+t[n-3]$
    makelist(t[n]^2,n,0,40); /* Emanuele Munarini, Mar 01 2011 */
    
  • Sage
    @CachedFunction
    def T(n): # A000073
        if (n<2): return 0
        elif (n==2): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A085697(n): return T(n)^2
    [A085697(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021

Formula

G.f.: x^2*( 1-x-x^2-x^3 )/( (1-3*x-x^2-x^3)*(1+x+x^2-x^3) ).
a(n+6) = 2*a(n+5) + 3*a(n+4) + 6*a(n+3) - a(n+2) - a(n).
a(n) = (-A057597(n-2) + 3*A057597(n-1) + 6*A057597(n) + 5*A113300(n-1) - A099463(n-2))/11. - R. J. Mathar, Aug 19 2008

Extensions

Offset corrected to match A000073 by N. J. A. Sloane, Sep 12 2020
Name corrected to match corrected offset by Michael A. Allen, Jun 10 2021

A107239 Sum of squares of tribonacci numbers (A000073).

Original entry on oeis.org

0, 0, 1, 2, 6, 22, 71, 240, 816, 2752, 9313, 31514, 106590, 360606, 1219935, 4126960, 13961456, 47231280, 159782161, 540539330, 1828631430, 6186215574, 20927817799, 70798300288, 239508933824, 810252920400, 2741065994769, 9272959837818, 31370198430718
Offset: 0

Views

Author

Jonathan Vos Post, May 17 2005

Keywords

Examples

			a(7) = 71 = 0^2 + 0^2 + 1^2 + 1^2 + 2^2 + 4^2 + 7^2
		

References

  • R. Schumacher, Explicit formulas for sums involving the squares of the first n Tribonacci numbers, Fib. Q., 58:3 (2020), 194-202.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0,0] cat Coefficients(R!( x^2*(1-x-x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)*(1-x)) )); // G. C. Greubel, Nov 20 2021
    
  • Maple
    b:= proc(n) option remember; `if`(n<3, [n*(n-1)/2$2],
         (t-> [t, t^2+b(n-1)[2]])(add(b(n-j)[1], j=1..3)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 22 2021
  • Mathematica
    Accumulate[LinearRecurrence[{1,1,1},{0,0,1},30]^2] (* Harvey P. Dale, Sep 11 2011 *)
    LinearRecurrence[{3,1,3,-7,1,-1,1}, {0,0,1,2,6,22,71}, 30] (* Ray Chandler, Aug 02 2015 *)
  • Sage
    @CachedFunction
    def T(n): # A000073
        if (n<2): return 0
        elif (n==2): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A107231(n): return sum(T(j)^2 for j in (0..n))
    [A107239(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021

Formula

a(n) = T(0)^2 + T(1)^2 + ... + T(n)^2 where T(n) = A000073(n).
From R. J. Mathar, Aug 19 2008: (Start)
a(n) = Sum_{i=0..n} A085697(i).
G.f.: x^2*(1-x-x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)*(1-x)). (End)
a(n+1) = A000073(n)*A000073(n+1) + ( (A000073(n+1) - A000073(n-1))^2 - 1 )/4 for n>0 [Jakubczyk]. - R. J. Mathar, Dec 19 2013

A073778 a(n) = Sum_{k=0..n} T(k)*T(n-k), where T is A000073; convolution of A000073 with itself.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 5, 12, 26, 56, 118, 244, 499, 1010, 2027, 4040, 8004, 15776, 30956, 60504, 117845, 228818, 443057, 855732, 1649022, 3171128, 6086626, 11662252, 22309543, 42614178, 81286743, 154856528, 294660040, 560052736, 1063367384, 2017030256
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Aug 10 2002

Keywords

Comments

Number of binary sequences of length n+1 that have exactly one subsequence 000. Example: a(4)=5 because we have 00010,00011,01000,10001 and 11000. Column 1 of A118390. - Emeric Deutsch, Apr 27 2006
Let (b(n)) be the p-INVERT of (1,1,1,0,0,0,0,0,0,...) using p(S) = 1 - S^2; then b(n) = a(n+3) for n >= 0. See A292324. - Clark Kimberling, Sep 15 2017

Crossrefs

Programs

  • Maple
    A073778:=proc(n) coeftayl(x^4/(1-x-x^2-x^3)^2, x=0, n); end proc: seq(A073778(n), n=0..40); # Wesley Ivan Hurt, Nov 17 2014
  • Mathematica
    CoefficientList[Series[x^4/(1-x-x^2-x^3)^2, {x, 0, 40}], x]
  • Maxima
    a(n):= sum((k+1)*sum(binomial(j,n-3*k+2*j-4)*binomial(k,j), j,0,k), k,0,n-4);
    makelist(a(n), n, 0, 30); /* Vladimir Kruchinin, Dec 14 2011 */
    
  • PARI
    T(n) = ([0, 1, 0; 0, 0, 1; 1, 1, 1]^n)[1, 3]; \\ A000073
    a(n) = sum(k=0, n, T(k)*T(n-k)); \\ Michel Marcus, Oct 20 2021
  • Sage
    [( x^4/(1-x-x^2-x^3)^2 ).series(x,n+1).list()[n] for n in (0..40)] # Zerinvary Lajos, Jun 02 2009; modified by G. C. Greubel, Dec 15 2021
    

Formula

G.f.: x^4/(1 - x - x^2 - x^3)^2.
a(n) = Sum_{k=0..n-4} (k+1)*Sum_{j=0..k} binomial(j,n-3*k+2*j-4)*binomial(k,j). - Vladimir Kruchinin, Dec 14 2011
(n-2)*a(n) - (n-1)*a(n-1) - n*a(n-2) - (n+1)*a(n-3) = 0, n > 2. - Michael D. Weiner, Nov 18 2014

Extensions

Two initial zeros inserted by Hans J. H. Tuenter, Oct 20 2021

A117546 Number of representations of n as a sum of distinct tribonacci numbers (A000073).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 3, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 3, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2
Offset: 0

Views

Author

T. D. Noe and Jonathan Vos Post, Mar 28 2006

Keywords

Comments

It can be shown that, like the Fibonacci numbers, the tribonacci numbers are complete; that is, a(n)>0 for all n. There is always a representation, free of three consecutive tribonacci numbers, which is analogous to the Zeckendorf representation of Fibonacci numbers. See A003726.

Examples

			a(14)=2 because 14 is both 13+1 and 7+4+2+1.
		

Crossrefs

Cf. A000119 (number of representations of n as a sum of distinct Fibonacci numbers).
Cf. A240844.

Programs

  • Haskell
    a117546 = p $ drop 3 a000073_list where
       p _  0     = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 13 2014
  • Mathematica
    tr={1,2,4,7,13,24,44,81,149}; len=tr[[ -1]]; cnt=Table[0,{len}]; Do[v=IntegerDigits[k,2,Length[tr]]; s=Dot[tr,v]; If[s<=len, cnt[[s]]++ ], {k,2^(Length[tr])-1}]; cnt

Extensions

a(0)=1 added and offset changed by Reinhard Zumkeller, Apr 13 2014

A106302 Period of the Fibonacci 3-step sequence A000073 mod prime(n).

Original entry on oeis.org

4, 13, 31, 48, 110, 168, 96, 360, 553, 140, 331, 469, 560, 308, 46, 52, 3541, 1860, 1519, 5113, 5328, 3120, 287, 8011, 3169, 680, 51, 1272, 990, 12883, 5376, 5720, 18907, 3864, 7400, 2850, 8269, 162, 9296, 2494, 32221, 10981, 36673, 4656, 3234, 198, 5565
Offset: 1

Views

Author

T. D. Noe, May 02 2005, Sep 18 2008

Keywords

Comments

This sequence differs from the corresponding Lucas sequence (A106294) at n=1 and 5 because these correspond to the primes 2 and 11, which are the prime factors of -44, the discriminant of the characteristic polynomial x^3-x^2-x-1. We have a(n) < prime(n) for the primes in A106279.

Crossrefs

Programs

  • Mathematica
    n=3; Table[p=Prime[i]; a=Join[{1},Table[0,{n-1}]]; a=Mod[a,p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i,60}]
  • Python
    from itertools import count
    from sympy import prime
    def A106302(n):
        a = b = (0,)*2+(1 % (p:= prime(n)),)
        for m in count(1):
            b = b[1:] + (sum(b) % p,)
            if a == b:
                return m # Chai Wah Wu, Feb 27 2022

Formula

a(n) = A046738(prime(n)).

A115390 Binomial transform of tribonacci sequence A000073.

Original entry on oeis.org

0, 0, 1, 4, 12, 34, 96, 272, 772, 2192, 6224, 17672, 50176, 142464, 404496, 1148480, 3260864, 9258528, 26287616, 74638080, 211918912, 601698560, 1708394752, 4850622592, 13772308480, 39103533056, 111026143488, 315235058688, 895042726912, 2541282959872
Offset: 0

Views

Author

Jonathan Vos Post, Mar 08 2006

Keywords

Comments

See also A117189 Binomial transform of the tribonacci sequence A000073.

Examples

			1*0 = 0.
1*0 + 1*0 = 0.
1*0 + 2*0 + 1*1 = 1.
1*0 + 3*0 + 3*1 + 1* 1 = 4.
1*0 + 4*0 + 6*1 + 4*1 + 1*2 = 12.
		

Crossrefs

Cf. A000073, A117189. Trisection of A103685.

Programs

  • Haskell
    a115390 n = a115390_list !! n
    a115390_list = 0 : 0 : 1 : map (* 2) (zipWith (-) a115390_list
       (tail $ map (* 2) $ zipWith (-) a115390_list (tail a115390_list)))
    -- Reinhard Zumkeller, Oct 21 2011
  • Mathematica
    b[0]=b[1]=0;b[2]=1;b[n_]:=b[n]=b[n-1]+b[n-2]+b[n-3]; a[n_]:=Sum[n!/(k!*(n-k)!)*b[k],{k,0,n}];Table[a[n],{n,0,27}] (* Farideh Firoozbakht, Mar 11 2006 *)
  • Maxima
    sum(sum(binomial(j-1,k-1)*2^(j-k)*binomial(n-j+k-1,2*k-1),j,k,n-k),k,1,n); /* Vladimir Kruchinin, Aug 18 2010 */
    

Formula

a(n) = Sum_{k=0..n} C(n,k)*A000073(k).
O.g.f.: -x^2/(-1+4*x-4*x^2+2*x^3). - R. J. Mathar, Apr 02 2008
a(n) = sum(sum(binomial(j-1,k-1)*2^(j-k)*binomial(n-j+k-1,2*k-1),j,k,n-k),k,1,n). - Vladimir Kruchinin, Aug 18 2010

A240844 Number of partitions of n into tribonacci numbers (cf. A000073).

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 6, 7, 10, 11, 14, 16, 20, 23, 28, 32, 38, 43, 50, 56, 65, 73, 83, 92, 105, 116, 131, 144, 163, 178, 199, 217, 242, 263, 291, 316, 348, 377, 413, 447, 488, 527, 573, 617, 670, 720, 779, 835, 903, 966, 1041, 1112, 1198, 1277, 1371, 1460, 1566
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 13 2014

Keywords

Examples

			a(6) = #{4+2, 4+1+1, 2+2+2, 2+2+1+1, 2+1+1+1+1, 6x1} = 6;
a(7) = #{7, 4+2+1, 4+1+1+1, 2+2+2+1, 2+2+1+1+1, 2+1+1+1+1+1, 7x1} = 7;
a(8) = #{7+1, 4+4, 4+2+2, 4+2+1+1, 4+1+1+1+1, 2+2+2+2, 2+2+2+1+1, 2+2+1+1+1+1, 2+6x1, 8x1} = 10;
a(9) = #{7+2, 7+1+1, 4+4+1, 4+2+2+1, 4+2+1+1+1, 4+5x1, 2+2+2+2+1, 2+2+2+1+1+1, 2+2+5x1, 2+7x1, 9x1} = 11;
a(10) = #{7+2+1, 7+1+1+1, 4+4+2, 4+4+1+1, 4+2+2+2, 4+2+2+1+1, 4+2+1+1+1+1, 4+6x1, 5x2, 2+2+2+2+1+1, 2+2+2+1+1+1+1, 2+2+6x1, 2+8x1, 10x1} = 14.
		

Crossrefs

Cf. A117546.

Programs

  • Haskell
    a240844 = p $ drop 3 a000073_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
Showing 1-10 of 401 results. Next