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 41-50 of 55 results. Next

A099559 a(n) = Sum_{k=0..floor(n/5)} C(n-4k,k+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 10, 14, 19, 25, 33, 44, 59, 79, 105, 139, 184, 244, 324, 430, 570, 755, 1000, 1325, 1756, 2327, 3083, 4084, 5410, 7167, 9495, 12579, 16664, 22075, 29243, 38739, 51319, 67984, 90060, 119304, 158044, 209364, 277349, 367410, 486715
Offset: 0

Views

Author

Paul Barry, Oct 22 2004

Keywords

Crossrefs

Cf. A098578.

Programs

  • Mathematica
    LinearRecurrence[{2,-1,0,0,1,-1},{0,1,2,3,4,5},50] (* Harvey P. Dale, Feb 20 2017 *)
  • PARI
    a(n) = sum(k=0,n\5, binomial(n-4*k, k+1)); \\ Michel Marcus, Jul 11 2018

Formula

Partial sums of A003520 (with leading zero).
G.f.: x / ( (x-1)*(x^2-x+1)*(x^3+x^2-1) ).
a(n) = 2a(n-1)-a(n-2)+a(n-5)-a(n-6).
7*a(n) = A117373(n+2) -7 +10*b(n) +15*b(n-1) +9*b(n-2), where b(n) = A182097(n). - R. J. Mathar, Aug 07 2017
a(n) = A003520(n+4) -1. - R. J. Mathar, Aug 07 2017

Extensions

Values from a(5) on corrected by R. J. Mathar, Jul 29 2008

A143283 Number of binary words of length n containing at least one subword 10001 and no subwords 10^{i}1 with i<3.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 10, 16, 24, 35, 51, 75, 110, 160, 231, 332, 476, 681, 972, 1384, 1966, 2787, 3944, 5573, 7864, 11082, 15597, 21926, 30791, 43199, 60553, 84807, 118682, 165966, 231930, 323905, 452083, 630629, 879224, 1225205, 1706532, 2375901
Offset: 0

Views

Author

Alois P. Heinz, Aug 04 2008

Keywords

Examples

			a(9) = 6 because 6 binary words of length 8 have at least one subword 10001 and no subwords 11, 101 or 1001: 000010001, 000100010, 001000100, 010001000, 100010000, 100010001.
		

Crossrefs

Cf. A003269, A003520, 3rd column of A143291.

Programs

  • Maple
    a:= proc(m) local M;
          M:= Matrix (2*m+3, (i, j)-> `if` (i=j-1 and i<>m+1 or j=1 and
                      i in [1, m+1] or j=m+2 and i in [m+2, 2*m+3], 1, 0));
          proc(n) local K; K:= M^(n+m+1); K[m+1, 1] -K[m+2, m+2] end
        end(3):
    seq (a(n), n=0..55);

Formula

G.f.: x^5/((x^4+x-1)*(x^5+x-1)).
a(n) = A003269(n+4) - A003520(n+4).

A143284 Number of binary words of length n containing at least one subword 100001 and no subwords 10^{i}1 with i<4.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 7, 11, 17, 25, 35, 48, 66, 92, 129, 180, 249, 342, 468, 640, 875, 1195, 1629, 2216, 3009, 4080, 5526, 7477, 10107, 13649, 18415, 24823, 33433, 44995, 60513, 81330, 109241, 146644, 196742, 263813, 353570, 473640, 634201
Offset: 0

Views

Author

Alois P. Heinz, Aug 04 2008

Keywords

Examples

			a(7)=2 because 2 binary words of length 7 have at least one subword 100001 and no subwords 10^{i}1 with i<4: 0100001, 1000010.
		

Crossrefs

Cf. A003520, A005708, 4th column of A143291.

Programs

  • Magma
    [n le 6 select 0 else n le 11 select n-6 else 2*Self(n-1)-Self(n-2) +Self(n-5)-Self(n-7)-Self(n-11): n in [1..60]]; // Vincenzo Librandi, Jun 05 2013
  • Maple
    a:= n-> coeff(series(x^6/((x^5+x-1)*(x^6+x-1)), x, n+1), x, n):
    seq(a(n), n=0..60);
  • Mathematica
    CoefficientList[Series[x^6 / ((x^5 + x - 1) (x^6 + x - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 04 2013 *)

Formula

G.f.: x^6/((x^5+x-1)*(x^6+x-1)).
a(n) = A003520(n+4) - A005708(n+5).
a(n) = 2*a(n-1)-a(n-2)+a(n-5)-a(n-7)-a(n-11). - Vincenzo Librandi, Jun 05 2013

A329146 Triangle read by rows: T(n,k) is the number of subsets of {1,...,n} such that the difference between any two elements is k or greater, 1 <= k <= n.

Original entry on oeis.org

2, 4, 3, 8, 5, 4, 16, 8, 6, 5, 32, 13, 9, 7, 6, 64, 21, 13, 10, 8, 7, 128, 34, 19, 14, 11, 9, 8, 256, 55, 28, 19, 15, 12, 10, 9, 512, 89, 41, 26, 20, 16, 13, 11, 10, 1024, 144, 60, 36, 26, 21, 17, 14, 12, 11, 2048, 233, 88, 50, 34, 27, 22, 18, 15, 13, 12, 4096, 377, 129
Offset: 1

Views

Author

Gerhard Kirchner, Nov 06 2019

Keywords

Comments

The restriction "the difference between any two elements is k or greater" does not apply to subsets with fewer than two elements.
Therefore T(n,k) = n+1 is valid not only for n=k, but also for n < k. These terms do not occur in the triangular matrix, but they help to simplify formula(3).
T(n,k) is, for 1 <= k <= 16, a subsequence of another sequence:
T(n,1) = A000079(n)
T(n,2) = A000045(n+2)
T(n,3) = A000930(n+2)
T(n,4) = A003269(n+4)
T(n,5) = A003520(n+4)
T(n,6) = A005708(n+5)
T(n,7) = A005709(n+6)
T(n,8) = A005710(n+7)
T(n,9) = A005711(n+7)
T(n,10) = A017904(n+19)
T(n,11) = A017905(n+21)
T(n,12) = A017906(n+23)
T(n,13) = A017907(n+25)
T(n,14) = A017908(n+27)
T(n,15) = A017909(n+29)
T(n,16) = A291149(n+16)
Note the recurrence formula(3) below: T(n,k) = T(n-1,k) + T(n-k,k), n >= 2*k.
As to the corresponding recurrence A..(n) = A..(n-1) + A..(n-k), see definition (1 <= k <= 9) or formula (k=13) or b-files in the remaining cases.

Examples

			a(1) = T(1,1) = |{}, {1}| = 2
a(2) = T(2,1) = |{}, {1}, {2}, {1,2}| = 4
a(3) = T(2,2) = |{}, {1}, {2}| = 3
a(4) = T(3,1) = |{}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}| = 8
a(5) = T(3,2) = |{}, {1}, {2}, {3}, {1,3}| = 5
etc.
The triangle begins:
   2;
   4,  3;
   8,  5,  4;
  16,  8,  6,  5;
  32, 13,  9,  7,  6;
  ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = sum(j=0, ceil(n/k), binomial(n-(k-1)*(j-1), j)); \\ Andrew Howroyd, Nov 06 2019

Formula

Let g(n,k,j) be the number of subsets of {1,...,n} with j elements such that the difference between any two elements is k or greater. Then
(1) T(n,k) = Sum_{j = 0..n} g(n,k,j)
(2) g(n,k,j) = binomial(n-(k-1)*(j-1),j) with the convention binomial(m,j)=0 for j > m
(3) T(n,k) = T(n-1,k) + T(n-k,k), n >= 2*k
or: T(n,k) = n+1 for n <= k and T(n,k) = T(n-1,k) + T(n-k,k) for n > k (see comments).
Formula(1) is evident.
Proof of formula(2):
Let C(n,k,j) be the class of subsets of {1,...,n} with j elements such that the difference between any two elements is k or greater. Let S be one of these subsets and let us write it as a j-tuple (c(1),..,c(j)) with c(i+1)-c(i)>=k, 1<=i
In particular, the number of subsets of C(m,1,j) is binomial(m,j), the basic tuple is (1,...,j) and the generating tuple is (d(1),...,d(j)) with 0 <= d(1) <= ... <= d(j) <= m-j.
With m-j = n-(j-1)*k-1, i.e., m = n-(j-1)*(k-1), the numbers of subsets in C(n,k,j) and C(m,1,j) are equal: g(n,k,j) = binomial(n-(k-1)*(j-1),j) qed
Proof of formula(3):
Using the binomial recurrence binomial(m,j) = binomial(m-1,j) + binomial(m-1,j-1) for m = n-(j-1)*(k-1), we find:
T(n,k) = Sum_{j = 0..n} binomial(n-(k-1)*(j-1),j)
= Sum_{j = 0..n-1} binomial(n-1-(k-1)*(j-1),j)
+ Sum_{j = 1..n} binomial(n-1-(k-1)*(j-1),j-1)
= T(n-1,k) + Sum_{j = 0..n-1} binomial(n-1-(k-1)*j,j)
= T(n-1,k) + Sum_{j = 0..n-k} binomial(n-k-(k-1)*(j-1),j)
= T(n-1,k) + T(n-k,k) qed
T(n-k,k) must be known in this recurrence, therefore n >= 2*k.
For k <= n < 2*k, formula(1) must be applied.

A372221 Number of tilings of a 5 X n rectangle using n pentominoes of shapes T, W, I, X.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 6, 9, 12, 16, 21, 41, 66, 106, 156, 219, 364, 558, 930, 1444, 2191, 3515, 5361, 8737, 13661, 21478, 34397, 53528, 86137, 135294, 215432, 345081, 546705, 879212, 1395476, 2239086, 3596427, 5767656, 9312008, 14949738, 24163742, 39045229
Offset: 0

Author

Alois P. Heinz, Apr 22 2024

Keywords

Examples

			a(7) = 6:
   ._____________.   ._____________.   ._____________.
   | |_________| |   | | | | | | | |   |_________| | |
   | .___| |___. |   | | | | | | | |   |_________| | |
   |_| ._| |_. |_|   | | | | | | | |   |_________| | |
   | ._|_____|_. |   | | | | | | | |   |_________| | |
   |_|_________|_|   |_|_|_|_|_|_|_|   |_________|_|_|
   ._____________.   ._____________.   ._____________.
   | |_________| |   | |_________| |   | | |_________|
   |_. |_. ._| ._|   | |_________| |   | | |_________|
   | |___| |___| |   | |_________| |   | | |_________|
   | .___|_|___. |   | |_________| |   | | |_________|
   |_|_________|_|   |_|_________|_|   |_|_|_________| .
		

Crossrefs

A125104 Triangle read by rows counting compositions (ordered partitions) by minimal part size.

Original entry on oeis.org

1, 1, 1, 1, 0, 3, 1, 0, 1, 6, 1, 0, 0, 2, 13, 1, 0, 0, 1, 3, 27, 1, 0, 0, 0, 2, 5, 56, 1, 0, 0, 0, 1, 2, 9, 115, 1, 0, 0, 0, 0, 2, 3, 15, 235, 1, 0, 0, 0, 0, 1, 2, 5, 25, 478, 1, 0, 0, 0, 0, 0, 2, 2, 8, 42, 969, 1, 0, 0, 0, 0, 0, 1, 2, 3, 12, 70, 1959, 1, 0, 0, 0, 0, 0, 0, 2, 2, 5, 18, 116, 3952, 1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 8, 27, 192, 7959, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 11, 41, 317, 16007
Offset: 0

Author

Alford Arnold, Nov 28 2006, corrected Nov 28 2006

Keywords

Comments

The diagonals of this array can be generated from Table A099238 as follows: A000079 - A000045 = [1, 2, 4, 8, 16, 32, ...] - [0, 1, 1, 2, 3, 5, ...] = [1, 1, 3, 6, 13, 27, ...] = A099036, A000045 - A000930, A000930 - A003269, A003269 - A003520, etc.

Examples

			Row 4 of the array is (1, 0, 1, 6) because there are six compositions with minimum part of size one: 1111, 31, 13, 211, 121, 112; one of size two: 22; none of size three; and 1 of size four: 4.
Triangle (after 45-degree counterclockwise rotation) begins:
1 1 3 6 13 27 56 115 235 478 969 1959 3952 7959
.1 0 1 2 3 5 9 15 25 42 70 116 192
..1 0 0 1 2 2 3 5 8 12 18 27
...1 0 0 0 1 2 2 2 3 5 8
....1 0 0 0 0 1 2 2 2 2
.....1 0 0 0 0 0 1 2 2
......1 0 0 0 0 0 0 1
.......1 0 0 0 0 0 0
........1 0 0 0 0 0
		

Extensions

Edited by N. J. A. Sloane, Dec 21 2006
More terms from Vladeta Jovovic, Jul 10 2007

A193517 T(n,k) = number of ways to place any number of 5X1 tiles of k distinguishable colors into an nX1 grid.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 4, 5, 4, 1, 1, 1, 1, 5, 7, 7, 5, 1, 1, 1, 1, 6, 9, 10, 9, 6, 1, 1, 1, 1, 7, 11, 13, 13, 11, 8, 1, 1, 1, 1, 8, 13, 16, 17, 16, 17, 11, 1, 1, 1, 1, 9, 15, 19, 21, 21, 28, 27, 15, 1, 1, 1, 1, 10, 17, 22, 25, 26, 41, 49, 41, 20, 1, 1, 1
Offset: 1

Author

R. H. Hardin, with proof and formula from Robert Israel in the Sequence Fans Mailing List, Jul 29 2011

Keywords

Comments

Table starts:
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..2..3...4...5...6...7...8....9...10...11...12...13...14...15...16...17...18
..3..5...7...9..11..13..15...17...19...21...23...25...27...29...31...33...35
..4..7..10..13..16..19..22...25...28...31...34...37...40...43...46...49...52
..5..9..13..17..21..25..29...33...37...41...45...49...53...57...61...65...69
..6.11..16..21..26..31..36...41...46...51...56...61...66...71...76...81...86
..8.17..28..41..56..73..92..113..136..161..188..217..248..281..316..353..392
.11.27..49..77.111.151.197..249..307..371..441..517..599..687..781..881..987
.15.41..79.129.191.265.351..449..559..681..815..961.1119.1289.1471.1665.1871
.20.59.118.197.296.415.554..713..892.1091.1310.1549.1808.2087.2386.2705.3044
.26.81.166.281.426.601.806.1041.1306.1601.1926.2281.2666.3081.3526.4001.4506

Examples

			Some solutions for n=11 k=3; colors=1, 2, 3; empty=0
..0....2....2....0....0....1....0....3....3....0....0....0....0....3....1....0
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....1....0....2....1....0....3....3....0....3....2....3....1....0....0....1
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....0....3....0....1....1....2....0....2....0....0....3....0....3....0....2
		

Crossrefs

Column 1 is A003520,
Column 2 is A143447(n-4),
Column 3 is A143455(n-4),
Row 10 is A028884.

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(n<0, 0,
          `if`(n<5 or k=0, 1, k*T(n-5, k) +T(n-1, k)))
        end:
    seq(seq(T(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Jul 29 2011
  • Mathematica
    T[n_, k_] := T[n, k] = If[n<0, 0, If[n < 5 || k == 0, 1, k*T[n-5, k]+T[n-1, k]]]; Table[Table[T[n, d+1-n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)

Formula

With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. So T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n=0,1,...,z-1. The solution is T(n,k) = sum_r r^(-n-1)/(1 + z k r^(z-1)) where the sum is over the roots of the polynomial k x^z + x - 1.
T(n,k) = sum {s=0..[n/5]} (binomial(n-4*s,s)*k^s).
For z X 1 tiles, T(n,k,z) = sum{s=0..[n/z]} (binomial(n-(z-1)*s,s)*k^s). - R. H. Hardin, Jul 31 2011

A242763 a(n) = 1 for n <= 7; a(n) = a(n-5) + a(n-7) for n>7.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 7, 7, 8, 9, 9, 12, 12, 15, 16, 17, 21, 21, 27, 28, 32, 37, 38, 48, 49, 59, 65, 70, 85, 87, 107, 114, 129, 150, 157, 192, 201, 236, 264, 286, 342, 358, 428, 465, 522, 606, 644, 770, 823, 950, 1071, 1166, 1376
Offset: 1

Author

Keywords

Comments

Generalized Fibonacci growth sequence using i = 2 as maturity period, j = 5 as conception period, and k = 2 as growth factor.
Maturity period is the number of periods that a Fibonacci tree node needs for being able to start developing branches. Conception period is the number of periods in a Fibonacci tree node needed to develop new branches since its maturity. Growth factor is the number of additional branches developed by a Fibonacci tree node, plus 1, and equals the base of the exponential series related to the given tree if maturity factor would be zero. Standard Fibonacci would use 1 as maturity period, 1 as conception period, and 2 as growth factor as the series becomes equal to 2^n with a maturity period of 0. Related to Lucas sequences.

Examples

			For n = 13 the a(13) = a(8) + a(6) = 2 + 1 = 3.
		

Crossrefs

Cf. A000079 (i = 0, j = 1, k = 2), A000244 (i = 0, j = 1, k = 3), A000302 (i = 0, j = 1, k = 4), A000351 (i = 0, j = 1, k = 5), A000400 (i = 0, j = 1, k = 6), A000420 (i = 0, j = 1, k = 7), A001018 (i = 0, j = 1, k = 8), A001019 (i = 0, j = 1, k = 9), A011557 (i = 0, j = 1, k = 10), A001020 (i = 0, j = 1, k = 11), A001021 (i = 0, j = 1, k = 12), A016116 (i = 0, j = 2, k = 2), A108411 (i = 0, j = 2, k = 3), A213173 (i = 0, j = 2, k = 4), A074872 (i = 0, j = 2, k = 5), A173862 (i = 0, j = 3, k = 2), A127975 (i = 0, j = 3, k = 3), A200675 (i = 0, j = 4, k = 2), A111575 (i = 0, j = 4, k = 3), A000045 (i = 1, j = 1, k = 2), A001045 (i = 1, j = 1, k = 3), A006130 (i = 1, j = 1, k = 4), A006131 (i = 1, j = 1, k = 5), A015440 (i = 1, j = 1, k = 6), A015441 (i = 1, j = 1, k = 7), A015442 (i = 1, j = 1, k = 8), A015443 (i = 1, j = 1, k = 9), A015445 (i = 1, j = 1, k = 10), A015446 (i = 1, j = 1, k = 11), A015447 (i = 1, j = 1, k = 12), A000931 (i = 1, j = 2, k = 2), A159284 (i = 1, j = 2, k = 3), A238389 (i = 1, j = 2, k = 4), A097041 (i = 1, j = 2, k = 10), A079398 (i = 1, j = 3, k = 2), A103372 (i = 1, j = 4, k = 2), A103373 (i = 1, j = 5, k = 2), A103374 (i = 1, j = 6, k = 2), A000930 (i = 2, j = 1, k = 2), A077949 (i = 2, j = 1, k = 3), A084386 (i = 2, j = 1, k = 4), A089977 (i = 2, j = 1, k = 5), A178205 (i = 2, j = 1, k = 11), A103609 (i = 2, j = 2, k = 2), A077953 (i = 2, j = 2, k = 3), A226503 (i = 2, j = 3, k = 2), A122521 (i = 2, j = 6, k = 2), A003269 (i = 3, j = 1, k = 2), A052942 (i = 3, j = 1, k = 3), A005686 (i = 3, j = 2, k = 2), A237714 (i = 3, j = 2, k = 3), A238391 (i = 3, j = 2, k = 4), A247049 (i = 3, j = 3, k = 2), A077886 (i = 3, j = 3, k = 3), A003520 (i = 4, j = 1, k = 2), A108104 (i = 4, j = 2, k = 2), A005708 (i = 5, j = 1, k = 2), A237716 (i = 5, j = 2, k = 3), A005709 (i = 6, j = 1, k = 2), A122522 (i = 6, j = 2, k = 2), A005710 (i = 7, j = 1, k = 2), A237718 (i = 7, j = 2, k = 3), A017903 (i = 8, j = 1, k = 2).

Programs

  • Magma
    [n le 7 select 1 else Self(n-5)+Self(n-7): n in [1..70]]; // Vincenzo Librandi, Nov 30 2016
    
  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 1, 0, 1}, {1, 1, 1, 1, 1, 1, 1}, 70] (*  or *)
    CoefficientList[ Series[(1+x+x^2+x^3+x^4)/(1-x^5-x^7), {x, 0, 70}], x] (* Robert G. Wilson v, Nov 25 2016 *)
    nxt[{a_,b_,c_,d_,e_,f_,g_}]:={b,c,d,e,f,g,a+c}; NestList[nxt,{1,1,1,1,1,1,1},70][[;;,1]] (* Harvey P. Dale, Oct 22 2024 *)
  • PARI
    Vec(x*(1+x+x^2+x^3+x^4)/((1-x+x^2)*(1+x-x^3-x^4-x^5)) + O(x^100)) \\ Colin Barker, Oct 27 2016
    
  • SageMath
    @CachedFunction # a = A242763
    def a(n): return 1 if n<8 else a(n-5) +a(n-7)
    [a(n) for n in range(1,76)] # G. C. Greubel, Oct 23 2024

Formula

Generic a(n) = 1 for n <= i+j; a(n) = a(n-j) + (k-1)*a(n-(i+j)) for n>i+j where i = maturity period, j = conception period, k = growth factor.
G.f.: x*(1+x+x^2+x^3+x^4) / ((1-x+x^2)*(1+x-x^3-x^4-x^5)). - Colin Barker, Oct 09 2016
Generic g.f.: x*(Sum_{l=0..j-1} x^l) / (1-x^j-(k-1)*x^(i+j)), with i > 0, j > 0 and k > 1.

A247489 Square array read by antidiagonals: A(k, n) = hypergeometric(P, Q, -k^k/(k-1)^(k-1)) rounded to the nearest integer, P = [(j-n)/k, j=0..k-1] and Q = [(j-n)/(k-1), j=0..k-2], k>=1, n>=0.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 1, 2, 8, 0, 1, 1, 3, 16, 0, 1, 1, 2, 5, 32, 0, 1, 1, 1, 3, 8, 64, 0, 0, 1, 1, 2, 4, 13, 128, 0, 0, 1, 1, 1, 3, 6, 21, 256, 0, 0, 1, 1, 1, 2, 4, 9, 34, 512, 0, 0, 1, 1, 1, 1, 3, 5, 13, 55, 1024, 0, 0, 1, 1, 1, 1, 2, 4, 7, 19, 89, 2048
Offset: 0

Author

Peter Luschny, Sep 19 2014

Keywords

Comments

Conjecture: hypergeometric(P, Q, -k^k/(k-1)^(k-1)) = sum_{j=0.. floor(n/k)} binomial(n-(k-1)*j, j) for n>=(k-1)^2, P and Q as above. (This means for n>=(k-1)^2 the representation is exact without rounding.)

Examples

			First few rows of the square array:
[k\n]                                             if conjecture true
[1], 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ...     A000079  n>=0
[2], 0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...     'A000045' n>=1
[3], 0, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, ...    A000930  n>=4
[4], 0, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, ...     A003269  n>=9
[5], 0, 1, 1, 1, 1, 2, 3, 4, 5, 6, 9, 11, 15, ...   A003520  n>=16
[6], 0, 1, 1, 1, 1, 1, 2, 3, 3, 4, 6, 7, 10, ...    A005708  n>=25
[7], 0, 0, 1, 1, 1, 1, 1, 2, 3, 3, 4, 5, 7, 8, ...  A005709  n>=36
[8], 0, 0, 1, 1, 1, 1, 2, 1, 2, 3, 3, 4, 5, 6, ...  A005710  n>=49
'A000045' means that the Fibonacci numbers as referenced here start 1, 1, 2, 3, ... for n>=0.
		

Programs

  • Maple
    A247489 := proc(k, n)
    seq((j-n)/k, j=0..k-1); seq((j-n)/(k-1), j=0..k-2);
    hypergeom([%%], [%], -k^k/(k-1)^(k-1));
    round(evalf(%,100)) end: # Adjust precision if necessary!
    for k from 1 to 9 do print(seq(A247489(k, n), n=0..16)) od;
  • Sage
    def A247489(k, n):
        P = [(j-n)/k for j in range(k)]
        Q = [(j-n)/(k-1) for j in range(k-1)]
        H = hypergeometric(P, Q, -k^k/(k-1)^(k-1))
        return round(H.n(100)) # Adjust precision if necessary!

A247919 Expansion of 1 / (1 + x^4 - x^5) in powers of x.

Original entry on oeis.org

1, 0, 0, 0, -1, 1, 0, 0, 1, -2, 1, 0, -1, 3, -3, 1, 1, -4, 6, -4, 0, 5, -10, 10, -4, -5, 15, -20, 14, 1, -20, 35, -34, 13, 21, -55, 69, -47, -8, 76, -124, 116, -39, -84, 200, -240, 155, 45, -284, 440, -395, 110, 329, -724, 835, -505, -219, 1053, -1559, 1340
Offset: 0

Author

Michael Somos, Sep 26 2014

Keywords

Examples

			G.f. = 1 - x^4 + x^5 + x^8 - 2*x^9 + x^10 - x^12 + 3*x^13 - 3*x^14 + x^15 + ...
		

Crossrefs

Programs

  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1 + x^4 - x^5)));  // G. C. Greubel, Aug 04 2018
  • Mathematica
    CoefficientList[Series[1/(1 + x^4 - x^5), {x, 0, 100}], x] (* Vincenzo Librandi, Sep 27 2014 *)
    LinearRecurrence[{0,0,0,-1,1},{1,0,0,0,-1},60] (* Harvey P. Dale, Sep 11 2024 *)
  • PARI
    {a(n) = if( n<0, n=-5-n; polcoeff( 1 / (1 - x - x^5) + x * O(x^n), n), polcoeff( 1 / (1 + x^4 - x^5) + x * O(x^n), n))};
    

Formula

G.f.: 1 / ((1 - x + x^2) * (1 + x - x^3)).
Convolution of A010892 and A247917.
a(-5-n) = A003520(n) for all n in Z.
0 = a(n) - a(n+1) - a(n+5) for all n in Z.
Previous Showing 41-50 of 55 results. Next