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.

Previous Showing 11-20 of 52 results. Next

A169985 Round phi^n to the nearest integer.

Original entry on oeis.org

1, 2, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803
Offset: 0

Views

Author

N. J. A. Sloane, Sep 26 2010

Keywords

Comments

Phi = (1+sqrt(5))/2, see A001622.
a(n) is the number of subsets of {1,2,...,n} with no two consecutive elements where n and 1 are considered to be consecutive. - Geoffrey Critzer, Sep 23 2013
Equals the Lucas sequence beginning at 1 (A000204) with 2 inserted between 1 and 3.
The Lucas sequence beginning at 2 (A000032) can be written as L(n) = phi^n + (-1/phi)^n. Since |(-1/phi)^n|<1/2 for n>1, this sequence is {L(n)} (with the first two terms switched). As a consequence, for n>1: a(n) is obtained by rounding phi^n up for even n and down for odd n; a(n) is also the nearest integer to 1/|phi^n - a(n)|. - Danny Rorabaugh, Apr 15 2015

Examples

			a(4) = 7 because we have: {}, {1}, {2}, {3}, {4}, {1,3}, {2,4}. - _Geoffrey Critzer_, Sep 23 2013
		

Crossrefs

Programs

  • GAP
    Concatenation([1,2], List([2..40], n-> Lucas(1,-1,n)[2] )); # G. C. Greubel, Jul 09 2019
    
  • Magma
    [Round(Sqrt(Fibonacci(2*n) + 2*Fibonacci(2*n-1))): n in [0..40]]; // Vincenzo Librandi, Apr 16 2015
    
  • Mathematica
    nn=34; CoefficientList[Series[(1+x-x^3)/(1-x-x^2),{x,0,nn}],x] (* Geoffrey Critzer, Sep 23 2013 *)
    Round[GoldenRatio^Range[0,40]] (* Harvey P. Dale, Jul 13 2014 *)
    Table[If[n<=1, n+1, LucasL[n]], {n, 0, 40}] (* G. C. Greubel, Jul 09 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((1+x-x^3)/(1-x-x^2)) \\ G. C. Greubel, Feb 13 2019
    
  • Python
    from gmpy2 import isqrt, fib2
    def A169985(n): return int((m:=isqrt(k:=(lambda x:(x[1]<<1)+x[0])(fib2(n<<1))))+(k-m*(m+1)>=1)) # Chai Wah Wu, Jun 19 2024
  • Sage
    [round(golden_ratio^n) for n in range(40)] # Danny Rorabaugh, Apr 16 2015
    

Formula

O.g.f.: (1 + x - x^3)/(1 - x - x^2). - Geoffrey Critzer, Sep 23 2013
a(n) = round(sqrt(F(2n) + 2*F(2n-1))), for n >= 0, allowing F(-1) = 1. Also phi^n -> sqrt(F(2n) + 2*F(2n-1)), within < 0.02% by n = 4, therefore converging rapidly. - Richard R. Forberg, Jun 23 2014
For k > 0, a(2k) = A169986(2k) and a(2k+1) = A014217(2k+1). - Danny Rorabaugh, Apr 15 2015
For n > 1, a(n) = A001610(n - 1) + 1. - Gus Wiseman, Feb 12 2019
a(n) = A000032(n) for n>=2. - G. C. Greubel, Jul 09 2019

A001609 a(1) = a(2) = 1, a(3) = 4; thereafter a(n) = a(n-1) + a(n-3).

Original entry on oeis.org

1, 1, 4, 5, 6, 10, 15, 21, 31, 46, 67, 98, 144, 211, 309, 453, 664, 973, 1426, 2090, 3063, 4489, 6579, 9642, 14131, 20710, 30352, 44483, 65193, 95545, 140028, 205221, 300766, 440794, 646015, 946781, 1387575, 2033590, 2980371, 4367946, 6401536, 9381907
Offset: 1

Views

Author

Keywords

Comments

This comment covers a family of sequences which satisfy a recurrence of the form a(n) = a(n-1) + a(n-m), with a(n) = 1 for n = 1...m-1, a(m) = m + 1. The generating function is (x + m*x^m)/(1 - x - x^m). Also a(n) = 1 + n*Sum_{i=1..n/m} binomial(n-1-(m-1)*i, i-1)/i. This gives the number of ways to cover (without overlapping) a ring lattice (or necklace) of n sites with molecules that are m sites wide. Special cases: m=2: A000204, m=3: A001609, m=4: A014097, m=5: A058368, m=6: A058367, m=7: A058366, m=8: A058365, m=9: A058364.
The sequence defined by {a(n) - 1} plays a role for the computation of A065414, A146486, A146487, and A146488 equivalent to the role of A001610 for A005596, A146482, A146483 and A146484, see the variable a_{2,n} in arXiv:0903.2514. - R. J. Mathar, Mar 28 2009
Except for n = 2, a(n) is the number of digits in n-th term of A049064. This can be derived form the T. Sillke link below. - Jianing Song, Apr 28 2019

Examples

			G.f. = x + x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 10*x^6 + 15*x^7 + 21*x^8 + ...
		

References

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

Crossrefs

Programs

  • Magma
    I:=[1,1,4]; [n le 3 select I[n] else Self(n-1)+Self(n-3): n in [1..45]]; // Vincenzo Librandi, Jun 28 2015
  • Maple
    A001609:=-(1+3*z**2)/(-1+z+z**3); # Simon Plouffe in his 1992 dissertation
    f:= gfun:-rectoproc({a(n) = a(n-1) + a(n-3), a(1)=1,a(2)=1,a(3)=4},a(n),remember):
    map(f, [$1..100]); # Robert Israel, Jun 29 2015
  • Mathematica
    Table[Tr[MatrixPower[{{0, 0, 1}, {1, 0, 0}, {0, 1, 1}}, n]], {n, 1, 60}] (* Artur Jasinski, Jan 10 2007 *)
    Table[ HypergeometricPFQ[{1/3 - n/3, 2/3 - n/3, -(n/3)}, {1/2 - n/2, 1 - n/2}, -(27/4)], {n, 20}] (* Alexander R. Povolotsky, Nov 21 2008 *)
    a[1] = a[2] = 1; a[3] = 4; m = 3; a[n_] := 1 + n*Sum [Binomial [n - 1 - (m - 1)*i, i - 1]/i, {i, n/m}] A001609 = Table[a[n], {n, 100}] (* Zak Seidov, Nov 21 2008 *)
    LinearRecurrence[{1, 0, 1}, {1, 1, 4}, 50] (* Vincenzo Librandi, Jun 28 2015 *)
  • PARI
    {a(n) = if( n<1, n=-n; polcoeff( (3 + x^2) / (1 + x^2 - x^3) + x * O(x^n), n), polcoeff( x * (1 + 3*x^2) / (1 - x - x^3) + x * O(x^n), n))}; /* Michael Somos, Aug 15 2016 */
    

Formula

G.f.: x*(1 + 3*x^2)/(1 - x - x^3).
a(n) = trace of successive powers of matrix ({{0,0,1},{1,0,0},{0,1,1}})^n. - Artur Jasinski, Jan 10 2007
a(n) = A000930(n) + 3*A000930(n-2). - R. J. Mathar, Nov 16 2007
Logarithmic derivative of Narayana's cows sequence A000930. - Paul D. Hanna, Oct 28 2012
a(n) = w1^n + w2^n + w3^n, where w1,w2,w3 are the roots of the cubic: (-1 - x^2 + x^3), see A092526. - Gerry Martens, Jun 27 2015

Extensions

Additional comments from Yong Kong (ykong(AT)curagen.com), Dec 16 2000
More terms from Michael Somos, Oct 03 2002
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A124323 Triangle read by rows: T(n,k) is the number of partitions of an n-set having k singleton blocks (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 4, 4, 6, 0, 1, 11, 20, 10, 10, 0, 1, 41, 66, 60, 20, 15, 0, 1, 162, 287, 231, 140, 35, 21, 0, 1, 715, 1296, 1148, 616, 280, 56, 28, 0, 1, 3425, 6435, 5832, 3444, 1386, 504, 84, 36, 0, 1, 17722, 34250, 32175, 19440, 8610, 2772, 840, 120, 45, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Row sums are the Bell numbers (A000110). T(n,0)=A000296(n). T(n,k) = binomial(n,k)*T(n-k,0). Sum(k*T(n,k),k=0..n) = A052889(n) = n*B(n-1), where B(q) are the Bell numbers (A000110).
Exponential Riordan array [exp(exp(x)-1-x),x]. - Paul Barry, Apr 23 2009
Sum_{k=0..n} T(n,k)*2^k = A000110(n+1) is the number of binary relations on an n-set that are both symmetric and transitive. - Geoffrey Critzer, Jul 25 2014
Also the number of set partitions of {1, ..., n} with k cyclical adjacencies (successive elements in the same block, where 1 is a successor of n). Unlike A250104, we count {{1}} as having 1 cyclical adjacency. - Gus Wiseman, Feb 13 2019

Examples

			T(4,2)=6 because we have 12|3|4, 13|2|4, 14|2|3, 1|23|4, 1|24|3 and 1|2|34 (if we take {1,2,3,4} as our 4-set).
Triangle starts:
     1
     0    1
     1    0    1
     1    3    0    1
     4    4    6    0    1
    11   20   10   10    0    1
    41   66   60   20   15    0    1
   162  287  231  140   35   21    0    1
   715 1296 1148  616  280   56   28    0    1
  3425 6435 5832 3444 1386  504   84   36    0    1
From _Gus Wiseman_, Feb 13 2019: (Start)
Row n = 5 counts the following set partitions by number of singletons:
  {{1234}}    {{1}{234}}  {{1}{2}{34}}  {{1}{2}{3}{4}}
  {{12}{34}}  {{123}{4}}  {{1}{23}{4}}
  {{13}{24}}  {{124}{3}}  {{12}{3}{4}}
  {{14}{23}}  {{134}{2}}  {{1}{24}{3}}
                          {{13}{2}{4}}
                          {{14}{2}{3}}
... and the following set partitions by number of cyclical adjacencies:
  {{13}{24}}      {{1}{2}{34}}  {{1}{234}}  {{1234}}
  {{1}{24}{3}}    {{1}{23}{4}}  {{12}{34}}
  {{13}{2}{4}}    {{12}{3}{4}}  {{123}{4}}
  {{1}{2}{3}{4}}  {{14}{2}{3}}  {{124}{3}}
                                {{134}{2}}
                                {{14}{23}}
(End)
From _Paul Barry_, Apr 23 2009: (Start)
Production matrix is
0, 1,
1, 0, 1,
1, 2, 0, 1,
1, 3, 3, 0, 1,
1, 4, 6, 4, 0, 1,
1, 5, 10, 10, 5, 0, 1,
1, 6, 15, 20, 15, 6, 0, 1,
1, 7, 21, 35, 35, 21, 7, 0, 1,
1, 8, 28, 56, 70, 56, 28, 8, 0, 1 (End)
		

Crossrefs

A250104 is an essentially identical triangle, differing only in row 1.
For columns see A000296, A250105, A250106, A250107.

Programs

  • Maple
    G:=exp(exp(z)-1+(t-1)*z): Gser:=simplify(series(G,z=0,14)): for n from 0 to 11 do P[n]:=sort(n!*coeff(Gser,z,n)) od: for n from 0 to 11 do seq(coeff(P[n],t,k),k=0..n) od; # yields sequence in triangular form
    # Program from R. J. Mathar, Jan 22 2015:
    A124323 := proc(n,k)
        binomial(n,k)*A000296(n-k) ;
    end proc:
  • Mathematica
    Flatten[CoefficientList[Range[0,10]! CoefficientList[Series[Exp[x y] Exp[Exp[x] - x - 1], {x, 0,10}], x], y]] (* Geoffrey Critzer, Nov 24 2011 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Count[#,{}]==k&]],{n,0,9},{k,0,n}] (* _Gus Wiseman, Feb 13 2019 *)

Formula

T(n,k) = binomial(n,k)*[(-1)^(n-k)+sum((-1)^(j-1)*B(n-k-j), j=1..n-k)], where B(q) are the Bell numbers (A000110).
E.g.f.: G(t,z) = exp(exp(z)-1+(t-1)*z).
G.f.: 1/(1-xy-x^2/(1-xy-x-2x^2/(1-xy-2x-3x^2/(1-xy-3x-4x^2/(1-... (continued fraction). - Paul Barry, Apr 23 2009

A035612 Horizontal para-Fibonacci sequence: says which column of Wythoff array (starting column count at 1) contains n.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 2, 5, 1, 2, 3, 1, 6, 1, 2, 3, 1, 4, 1, 2, 7, 1, 2, 3, 1, 4, 1, 2, 5, 1, 2, 3, 1, 8, 1, 2, 3, 1, 4, 1, 2, 5, 1, 2, 3, 1, 6, 1, 2, 3, 1, 4, 1, 2, 9, 1, 2, 3, 1, 4, 1, 2, 5, 1, 2, 3, 1, 6, 1, 2, 3, 1, 4, 1, 2, 7, 1, 2, 3, 1, 4, 1, 2, 5, 1, 2, 3, 1, 10, 1, 2, 3, 1, 4, 1, 2, 5, 1, 2
Offset: 1

Views

Author

Keywords

Comments

Ordinal transform of A003603. Removing all 1's from this sequence and decrementing the remaining numbers generates the original sequence. - Franklin T. Adams-Watters, Aug 10 2012
It can be shown that a(n) is the index of the smallest Fibonacci number used in the Zeckendorf representation of n, where f(0)=f(1)=1. - Rachel Chaiser, Aug 18 2017
The asymptotic density of the occurrences of k = 1, 2, ..., is (2-phi)/phi^(k-1), where phi is the golden ratio (A001622). The asymptotic mean of this sequence is 1 + phi (A104457). - Amiram Eldar, Nov 02 2023

Examples

			After the first 6 we see "1 2 3 1 4 1 2" then 7.
		

Crossrefs

Programs

  • Haskell
    a035612 = a007814 . a022340
    -- Reinhard Zumkeller, Jul 20 2015, Mar 10 2013
  • Mathematica
    f[1] = {1}; f[2] = {1, 2}; f[n_] := f[n] = Join[f[n-1], Most[f[n-2]], {n}]; f[11] (* Jean-François Alcover, Feb 22 2012 *)

Formula

The segment between the first M and the first M+1 is given by the segment before the first M-1.
a(A022342(n)) > 1; a(A026274(n) + 1) = 1. - Reinhard Zumkeller, Jul 20 2015
a(n) = v2(A022340(n)), where v2(n) = A007814(n), the dyadic valuation of n. - Ralf Stephan, Jun 20 2004. In other words, a(n) = A007814(A003714(n)) + 1, which is certainly true. - Don Reble, Nov 12 2005
From Rachel Chaiser, Aug 18 2017: (Start)
a(n) = a(p(n))+1 if n = b(p(n)) where p(n) = floor((n+2)/phi)-1 and b(n) = floor((n+1)*phi)-1 where phi=(1+sqrt(5))/2; a(n)=1 otherwise.
a(n) = 3 - n_1 + s_z(n-1) - s_z(n) + s_z(p(n-1)) - s_z(p(n)), where s_z(n) is the Zeckendorf sum of digits of n (A007895), and n_1 is the least significant digit in the Zeckendorf representation of n. (End)

Extensions

Formula corrected by Tom Edgar, Jul 09 2018

A120562 Sum of binomial coefficients binomial(i+j, i) modulo 2 over all pairs (i,j) of positive integers satisfying 3i+j=n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 3, 1, 3, 2, 3, 2, 4, 3, 5, 1, 4, 3, 4, 2, 5, 3, 5, 2, 5, 4, 6, 3, 7, 5, 8, 1, 6, 4, 5, 3, 7, 4, 7, 2, 6, 5, 7, 3, 8, 5, 8, 2, 7, 5, 7, 4, 9, 6, 10, 3, 9, 7, 10, 5, 12, 8, 13, 1
Offset: 0

Views

Author

Sam Northshield (samuel.northshield(AT)plattsburgh.edu), Aug 07 2006

Keywords

Comments

a(n) is the number of 'vectors' (..., e_k, e_{k-1}, ..., e_0) with e_k in {0,1,3} such that Sum_{k} e_k 2^k = n. a(2^n-1) = F(n+1)*a(2^{k+1}+j) + a(j) = a(2^k+j) + a(2^{k-1}+j) if 2^k > 4j. This sequence corresponds to the pair (3,1) as Stern's diatomic sequence [A002487] corresponds to (2,1) and Gould's sequence [A001316] corresponds to (1,1). There are many interesting similarities to A000119, the number of representations of n as a sum of distinct Fibonacci numbers.
A120562 can be generated from triangle A177444. Partial sums of A120562 = A177445. - Gary W. Adamson, May 08 2010
The Ca1 and Ca2 triangle sums, see A180662 for their definitions, of Sierpinski's triangle A047999 equal this sequence. Some A120562(2^n-p) sequences, 0 <= p <= 32, lead to known sequences, see the crossrefs. - Johannes W. Meijer, Jun 05 2011

Examples

			a(2^n)=1 since a(2n)=a(n).
		

Crossrefs

Cf. A001316 (1,1), A002487 (2,1), A120562 (3,1), A112970 (4,1), A191373 (5,1).
Cf. A177444, A177445. - Gary W. Adamson, May 08 2010
Cf. A000012 (p=0), A000045 (p=1, p=2, p=4, p=8, p=16, p=32), A000071 (p=3, p=6, p=12, p=13, p=24, p=26), A001610 (p=5, p=10, p=20), A001595 (p=7, p=14, p=28), A014739 (p=11, p=22, p=29), A111314 (p=15, p=30), A027961 (p=19), A154691 (p=21), A001911 (p=23). - Johannes W. Meijer, Jun 05 2011
Same recurrence for odd n as A000930.

Programs

  • Maple
    p := product((1+x^(2^i)+x^(3*2^i)), i=0..25): s := series(p, x, 1000): for k from 0 to 250 do printf(`%d, `, coeff(s, x, k)) od:
    A120562:=proc(n) option remember; if n <0 then A120562(n):=0 fi: if (n=0 or n=1) then 1 elif n mod 2 = 0 then A120562(n/2) else A120562((n-1)/2) + A120562((n-3)/2); fi; end: seq(A120562(n),n=0..64); # Johannes W. Meijer, Jun 05 2011
  • Mathematica
    a[0] = a[1] = 1; a[n_?EvenQ] := a[n] = a[n/2]; a[n_?OddQ] := a[n] = a[(n-1)/2] + a[(n-1)/2 - 1]; Table[a[n], {n, 0, 64}] (* Jean-François Alcover, Sep 29 2011 *)
    Nest[Append[#1, If[EvenQ@ #2, #1[[#2/2 + 1]], Total@ #1[[#2 ;; #2 + 1]] & @@ {#1, (#2 - 1)/2}]] & @@ {#, Length@ #} &, {1, 1}, 10^4 - 1] (* Michael De Vlieger, Feb 19 2019 *)

Formula

Recurrence; a(0)=a(1)=1, a(2*n)=a(n) and a(2*n+1)=a(n)+a(n-1).
G.f.: A(x) = Product_{i>=0} (1 + x^(2^i) + x^(3*2^i)) = (1 + x + x^3)*A(x^2).
a(n-1) << n^x with x = log_2(phi) = 0.69424... - Charles R Greathouse IV, Dec 27 2011

Extensions

Reference edited and link added by Jason G. Wurtzel, Aug 22 2010

A351717 Numbers whose maximal (or lazy) Lucas representation (A130311) is palindromic.

Original entry on oeis.org

0, 2, 3, 5, 6, 10, 12, 14, 17, 20, 28, 30, 34, 36, 42, 46, 56, 61, 75, 77, 85, 92, 94, 101, 107, 115, 122, 128, 150, 166, 176, 198, 200, 211, 219, 233, 244, 246, 260, 271, 277, 288, 296, 310, 321, 345, 360, 396, 405, 441, 469, 484, 520, 522, 544, 562, 570, 588
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Comments

A001610(n) = Lucas(n+1) - 1 is a term for all n, since A001610(0) = 0 has the representation 0 and the representation of Lucas(n+1) - 1 is n 1's for n > 0.

Examples

			The first 10 terms are:
   n  a(n)  A130311(a(n))
   ----------------------
   1   0               0
   2   2               1
   3   3              11
   4   5             101
   5   6             111
   6  10            1111
   7  12           10101
   8  14           11011
   9  17           11111
  10  20          101101
		

Crossrefs

Programs

  • Mathematica
    lazy = Select[IntegerDigits[Range[6000], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse @ LucasL[Range[0, Length[#] - 1]]] & /@ lazy; s = FromDigits /@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]; Join[{0}, Position[s, _?PalindromeQ] // Flatten]

A324011 Number of set partitions of {1, ..., n} with no singletons or cyclical adjacencies (successive elements in the same block, where 1 is a successor of n).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 5, 14, 66, 307, 1554, 8415, 48530, 296582, 1913561, 12988776, 92467629, 688528288, 5349409512, 43270425827, 363680219762, 3170394634443, 28619600156344, 267129951788160, 2574517930001445, 25587989366964056, 261961602231869825
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

These set partitions are fixed points under Callan's bijection phi on set partitions.

Examples

			The a(4) = 1, a(6) = 5, and a(7) = 14 set partitions:
  {{13}{24}}  {{135}{246}}    {{13}{246}{57}}
              {{13}{25}{46}}  {{13}{257}{46}}
              {{14}{25}{36}}  {{135}{26}{47}}
              {{14}{26}{35}}  {{135}{27}{46}}
              {{15}{24}{36}}  {{136}{24}{57}}
                              {{136}{25}{47}}
                              {{14}{257}{36}}
                              {{14}{26}{357}}
                              {{146}{25}{37}}
                              {{146}{27}{35}}
                              {{15}{246}{37}}
                              {{15}{247}{36}}
                              {{16}{24}{357}}
                              {{16}{247}{35}}
		

Crossrefs

Cf. A000110, A000126, A000296 (singletons allowed, or adjacencies allowed), A001610, A124323, A169985, A261139, A324012, A324014, A324015.

Programs

  • Mathematica
    Table[Select[sps[Range[n]],And[Count[#,{_}]==0,Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]//Length,{n,0,10}]

Extensions

a(11)-a(26) from Alois P. Heinz, Feb 12 2019

A324429 Number T(n,k) of labeled cyclic chord diagrams having n chords and minimal chord length k (or k=0 if n=0); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 11, 3, 1, 0, 74, 24, 6, 1, 0, 652, 225, 57, 10, 1, 0, 7069, 2489, 678, 141, 17, 1, 0, 90946, 32326, 9375, 2107, 352, 28, 1, 0, 1353554, 483968, 146334, 35568, 6722, 832, 46, 1, 0, 22870541, 8211543, 2555228, 661329, 137225, 21510, 1973, 75, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 27 2019

Keywords

Comments

T(n,k) is defined for all n,k >= 0. The triangle contains only the terms with 0 <= k <= n. T(n,k) = 0 for k > n.

Examples

			Triangle T(n,k) begins:
  1;
  0,       1;
  0,       2,      1;
  0,      11,      3,      1;
  0,      74,     24,      6,     1;
  0,     652,    225,     57,    10,    1;
  0,    7069,   2489,    678,   141,   17,   1;
  0,   90946,  32326,   9375,  2107,  352,  28,  1;
  0, 1353554, 483968, 146334, 35568, 6722, 832, 46, 1;
  ...
		

Crossrefs

Row sums give A001147.
Main diagonal gives A000012.
T(n+1,n) gives A001610.

Programs

  • Maple
    b:= proc(n, f, m, l, j) option remember; (k-> `if`(n `if`(n=0 or k<2, doublefactorial(2*n-1),
                  b(2*n-k+1, [1$k-1], 0, [0$k-1], k-1)):
    T:= (n, k)-> `if`(n=k, 1, A(n, k)-A(n, k+1)):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    b[n_, f_List, m_, l_List, j_] := b[n, f, m, l, j] = Function[k, If[n < Total[f] + m +  Total[l], 0, If[n == 0, 1, Sum[If[f[[i]] == 0, 0, b[n - 1, ReplacePart[f, i -> 0], m + l[[1]], Append[ReplacePart[l, 1 -> Nothing], 0], Max[0, j - 1]]], {i, Max[1, j + 1], Min[k, n - 1]}] + If[m == 0, 0, m*b[n - 1, f, m - 1 + l[[1]], Append[ReplacePart[l, 1 -> Nothing], 0], Max[0, j-1]]] + b[n-1, f, m + l[[1]], Append[ReplacePart[ l, 1 -> Nothing], 1], Max[0, j - 1]]]]][Length[l]];
    A[n_, k_] := If[n == 0 || k < 2, 2^(n-1) Pochhammer[3/2, n-1], b[2n-k+1, Table[1, {k - 1}], 0, Table[0, {k - 1}], k - 1]];
    T[n_, k_] := If[n == k, 1, A[n, k] - A[n, k + 1]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 27 2020, after Alois P. Heinz *)

Formula

T(n,k) = A324428(n,k) - A324428(n,k+1) for k > 0, T(n,0) = A000007(n).

A014739 Expansion of (1+x^2)/(1-2*x+x^3).

Original entry on oeis.org

1, 2, 5, 9, 16, 27, 45, 74, 121, 197, 320, 519, 841, 1362, 2205, 3569, 5776, 9347, 15125, 24474, 39601, 64077, 103680, 167759, 271441, 439202, 710645, 1149849, 1860496, 3010347, 4870845, 7881194, 12752041, 20633237, 33385280, 54018519, 87403801
Offset: 0

Views

Author

Keywords

Comments

Number of wedged n-spheres in the homotopy type of the Boolean complex of the affine Coxeter group A~ n. - _Bridget Tenner, Jun 04 2008
In an infinite set of sequences such that a(n) = a(n-1) + a(n-2) + k; with a(0) = 1, a(1) = 2, and in A014739, k = 2. Cf. A171516 for a(0) = 1, a(1) = 2, k = 3. - Gary W. Adamson, Dec 10 2009

Examples

			The Boolean complex of the affine Coxeter group \widetilde{A}_3 is homotopy equivalent to the wedge of 5 3-spheres.
		

Crossrefs

Programs

  • GAP
    List([0..40], n-> Lucas(1,-1,n+2)[2] -2); # G. C. Greubel, Jul 22 2019
  • Magma
    [Lucas(n+2)-2: n in [0..40]]; // G. C. Greubel, Jul 22 2019
    
  • Maple
    with(combinat): seq(fibonacci(n)+fibonacci(n+2)-2, n=1..37); # Zerinvary Lajos, Jan 31 2008
    g:=(1+z^2)/(1-z-z^2): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)-2, n=2..38); # Zerinvary Lajos, Jan 09 2009
  • Mathematica
    CoefficientList[Series[(1+x^2)/(1-2*x+x^3), {x,0,40}], x] (* Robert G. Wilson v, Feb 25 2005 *)
    a[0]=1; a[1]=2; a[2]=5; a[n_]:= a[n] = 2a[n-1]-a[n-3]; Array[a, 40, 0]
    LinearRecurrence[{2,0,-1},{1,2,5},40] (* Harvey P. Dale, Jun 26 2011 *)
    LucasL[Range[0,40]+2]-2 (* G. C. Greubel, Jul 22 2019 *)
  • PARI
    Vec((1+x^2)/(1-2*x+x^3)+O(x^40)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3)+f(n+1)-2) \\ G. C. Greubel, Jul 22 2019
    
  • Sage
    [lucas_number2(n+2,1,-1)-2 for n in (0..40)] # G. C. Greubel, Jul 22 2019
    

Formula

Partial sums of Lucas numbers A000032 less 1.
From Paul Barry, Sep 03 2003: (Start)
G.f.: (1+x^2)/((1-x)*(1-x-x^2)).
a(n) = ((3+sqrt(5))((1+sqrt(5))/2)^n+(3-sqrt(5))((1-sqrt(5))/2)^n)/2-2. (End)
From Zerinvary Lajos, Jan 31 2008: (Start)
a(n) = A001610(n+1)-1.
a(n) = F(n+1) + F(n+3) - 2 = A000071(n+1) + A000071(n+3), where F(n) is the n-th Fibonacci number. [corrected by R. J. Mathar, Mar 14 2011] (End)
a(n) = A000032(n+2) - 2. - Matthew Vandermast, Nov 05 2009
a(n) = 2*a(n-1) - a(n-3). - Vincenzo Librandi, Dec 31 2010

Extensions

More terms from Robert G. Wilson v, Feb 25 2005

A100223 G.f. A(x) satisfies: 2^n - 1 = Sum_{k=0..n} [x^k]A(x)^n and also satisfies: (2+z)^n - (1+z)^n + z^n = Sum_{k=0..n} [x^k](A(x)+z*x)^n for all z, where [x^k]A(x)^n denotes the coefficient of x^k in A(x)^n.

Original entry on oeis.org

1, 0, 1, 1, 0, -2, -3, 1, 11, 15, -13, -77, -86, 144, 595, 495, -1520, -4810, -2485, 15675, 39560, 6290, -159105, -324805, 87075, 1592843, 2616757, -2136539, -15726114, -20247800, 32296693, 152909577, 145139491, -417959049, -1460704685, -885536173, 4997618808, 13658704994, 3223741399
Offset: 0

Views

Author

Paul D. Hanna, Nov 28 2004

Keywords

Comments

The current sequence and A007440, A214649, A343773 form a cluster. The base of the cluster is A343773. We get the current sequence if we shift all the terms in A343773 to the right by 2 and take a(0) = 1. - Gennady Eremin, May 15 2021

Examples

			G.f. = 1 + x^2 + x^3 - 2*x^5 - 3*x^6 + x^7 + 11*x^8 + 15*x^9 - 13*x^10 - 77*x^11 - 86*x^12 + 144*x^13 + ...
From the table of powers of A(x) (A100224), we see that
2^n-1 = Sum of coefficients [x^0] through [x^n] in A(x)^n:
A^1=[1,0],1,1,0,-2,-3,1,11,...
A^2=[1,0,2],2,1,-2,-5,-2,12,...
A^3=[1,0,3,3],3,0,-5,-6,6,...
A^4=[1,0,4,4,6],4,-2,-8,-3,...
A^5=[1,0,5,5,10,10],5,-5,-10,...
A^6=[1,0,6,6,15,18,17],6,-9,...
A^7=[1,0,7,7,21,28,35,28],7,...
A^8=[1,0,8,8,28,40,60,64,46],...
the main diagonal of which is A001610 = [0,2,3,6,10,17,...],
where Sum_{n>=1} A001610(n-1)/n*x^n = log((1-x)/(1-x-x^2)).
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x+Sqrt[1-2*x+5*x^2])/2, {x, 0, 30}], x] (* Vaclav Kotesovec, Feb 11 2015 *)
  • PARI
    {a(n) = if( n<=0, n==0, (2^n - 1 - sum( k=0, n, polcoeff( sum( j=0, min(k, n-1), a(j) * x^j)^n + x * O(x^k), k))) / n)}
    
  • PARI
    {a(n) = if( n<=0, n==0, if( n==1, 0, if( n==2, 1, ((2*n-3) * a(n-1) - 5 * (n-3) * a(n-2)) / n)))}
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff((1 + x + sqrt(1 - 2*x + 5*x^2 + x * O(x^n))) / 2, n))}
    
  • Python
    A100223 = [1, 0, 1]
    for n in range(3, 801):
        A100223.append( ((2*n-3)*A100223[-1]
          - 5*(n-3)*A100223[-2])//n )  # Gennady Eremin, Apr 24 2021

Formula

G.f.: A(x) = (1+x+sqrt(1-2*x+5*x^2))/2.
G.f.: A(x) = x/(series_reversion[x*(1-x)/(1-x-x^2)]).
D-finite with recurrence a(n) = ((2*n-3)*a(n-1) - 5*(n-3)*a(n-2))/n (for n>2), with a(0)=1, a(1)=0, a(2)=1.
Given g.f. A(x), then B(x) = A(x) - 1 + x series reversion is -B(-x). - Michael Somos, Sep 07 2005
Given g.f. A(x) and C(x) = reversion of x + x^2, then B(x) = A(x) - 1 + x satisfies B(x) = x + C(x * B(x)). - Michael Somos, Sep 07 2005
From Paul Barry, Nov 07 2010: (Start)
a(n+1) has Hankel transform (-1)^n*F(n).
a(n+2) has Hankel transform (-1)^comb(n+1,2).
a(n+3) has Hankel transform (-1)^comb(n+1,2)*F(n+2).
Hankel transform of a(n+4) is sum{k=0..n, (-1)^(n-k+1)*(n-k+1)(F(2k+2)-C(1,k)-C(0,k))}. (End)
G.f.: A(x) = x + G(0) = 1 + x^2/G(0) where G(k) = 1 - x + x^2/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 25 2011
Lim sup n->infinity |a(n)|^(1/n) = sqrt(5).
From Gennady Eremin, May 15 2021: (Start)
a(n+2) = A343773(n), n >= 0.
G.f.: A(x) = 1 + x^2*B(x), where B(x) is the g.f. of A343773.
Lim_{n->infinity} a(n)/A001006(n) = 0. (End)

Extensions

Entry revised by Paul D. Hanna, Mar 19 2013
Previous Showing 11-20 of 52 results. Next