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

A269298 Central nonzero values of A231599.

Original entry on oeis.org

1, 2, 2, 4, 6, 8, 16, 28, 50, 100, 196, 388, 786, 1600, 3280, 6780, 14060, 29280, 61232, 128414, 270084, 569514, 1203564, 2548770, 5407754, 11493312, 24465960, 52157508, 111342192, 237985596, 509275390, 1091017632, 2339687834, 5022312654, 10790564790
Offset: 0

Views

Author

Tilman Piesk, Feb 21 2016

Keywords

Comments

Rows of A231599 whose row number is divisible by four have positive central values. a(n) is the central value of row 4n. They are also the maximal value of that row, so a(n) = A086376(4n).
a(1) = a(2) = 2. Apart from that the sequence is strictly increasing.

Examples

			For n = 5, A231599( 4n, A000217(4n)/2 ) = A231599(20, 105) = 8, so a(5)=8.
For n = 5, A086376(4n) = A086376(20) = 8, so a(5)=8.
		

Crossrefs

Formula

a(n) = A231599( 4n, A000217(4n)/2 ) = A086376(4n).

A053632 Irregular triangle read by rows giving coefficients in expansion of Product_{k=1..n} (1 + x^k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 7, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4
Offset: 0

Views

Author

N. J. A. Sloane, Mar 22 2000

Keywords

Comments

Or, triangle T(n,k) read by rows, giving number of subsets of {1,2,...,n} with sum k. - Roger CUCULIERE (cuculier(AT)imaginet.fr), Nov 19 2000
Row n consists of A000124(n) terms. These are also the successive vectors (their nonzero elements) when one starts with the infinite vector (of zeros) with 1 inserted somewhere and then shifts it one step (right or left) and adds to the original, then shifts the result two steps and adds, three steps and adds, etc. - Antti Karttunen, Feb 13 2002
T(n,k) = number of partitions of k into distinct parts <= n. Triangle of distribution of Wilcoxon's signed rank statistic. - Mitch Harris, Mar 23 2006
T(n,k) = number of binary words of length n in which the sum of the positions of the 0's is k. Example: T(4,5)=2 because we have 0110 (sum of the positions of the 0's is 1+4=5) and 1001 (sum of the positions of the 0's is 2+3=5). - Emeric Deutsch, Jul 23 2006
A fair coin is flipped n times. You receive i dollars for a "success" on the i-th flip, 1<=i<=n. T(n,k)/2^n is the probability that you will receive exactly k dollars. Your expectation is n(n+1)/4 dollars. - Geoffrey Critzer, May 16 2010
From Gus Wiseman, Jan 02 2023: (Start)
With offset 1, also the number of integer compositions of n whose partial sums add up to k for k = n..n(n+1)/2. For example, row n = 6 counts the following compositions:
6 15 24 33 42 51 141 231 321 411 1311 2211 3111 12111 21111 111111
114 123 132 222 312 1131 1221 2121 11121 11211
213 1113 1122 1212 2112 1111
(End)

Examples

			Triangle begins:
  1;
  1, 1;
  1, 1, 1, 1;
  1, 1, 1, 2, 1, 1, 1;
  1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1;
  1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 1, 1, 1;
  1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1;
  ...
Row n = 4 counts the following binary words, where k = sum of positions of zeros:
  1111  0111  1011  0011  0101  0110  0001  0010  0100  1000  0000
                    1101  1110  1001  1010  1100
Row n = 5 counts the following strict partitions of k with all parts <= n (0 is the empty partition):
  0  1  2  3  4  5  42  43  53  54  532  542  543  5431 5432 54321
           21 31 32 51  52  431 432 541  5321 5421
                 41 321 421 521 531 4321
		

References

  • A. V. Yurkin, New binomial and new view on light theory, (book), 2013, 78 pages, no publisher listed.

Crossrefs

Rows reduced modulo 2 and interpreted as binary numbers: A068052, A068053. Rows converge towards A000009.
Row sums give A000079.
Cf. A285101 (multiplicative encoding of each row), A285103 (number of odd terms on row n), A285105 (number of even terms).
Row lengths are A000124.
A reciprocal version is (A033999, A219977, A291983, A291984, A291985, ...).
A negative version is A231599.
A version for partitions is A358194, reversed partitions A264034.

Programs

  • Maple
    with(gfun,seriestolist); map(op,[seq(seriestolist(series(mul(1+(z^i), i=1..n),z,binomial(n+1,2)+1)), n=0..10)]); # Antti Karttunen, Feb 13 2002
    # second Maple program:
    g:= proc(n) g(n):= `if`(n=0, 1, expand(g(n-1)*(1+x^n))) end:
    T:= n-> seq(coeff(g(n), x, k), k=0..degree(g(n))):
    seq(T(n), n=0..10);  # Alois P. Heinz, Nov 19 2012
  • Mathematica
    Table[CoefficientList[ Series[Product[(1 + t^i), {i, 1, n}], {t, 0, 100}], t], {n, 0, 8}] // Grid (* Geoffrey Critzer, May 16 2010 *)

Formula

From Mitch Harris, Mar 23 2006: (Start)
T(n,k) = T(n-1, k) + T(n-1, k-n), T(0,0)=1, T(0,k) = 0, T(n,k) = 0 if k < 0 or k > (n+1 choose 2).
G.f.: (1+x)*(1+x^2)*...*(1+x^n). (End)
Sum_{k>=0} k * T(n,k) = A001788(n). - Alois P. Heinz, Feb 09 2017
max_{k>=0} T(n,k) = A025591(n). - Alois P. Heinz, Jan 20 2023

A026807 Triangular array T read by rows: T(n,k) = number of partitions of n in which every part is >=k, for k=1,2,...,n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 5, 2, 1, 1, 7, 2, 1, 1, 1, 11, 4, 2, 1, 1, 1, 15, 4, 2, 1, 1, 1, 1, 22, 7, 3, 2, 1, 1, 1, 1, 30, 8, 4, 2, 1, 1, 1, 1, 1, 42, 12, 5, 3, 2, 1, 1, 1, 1, 1, 56, 14, 6, 3, 2, 1, 1, 1, 1, 1, 1, 77, 21, 9, 5, 3, 2, 1, 1, 1, 1, 1, 1, 101, 24, 10, 5, 3, 2, 1, 1, 1, 1, 1, 1, 1, 135, 34, 13
Offset: 1

Views

Author

Keywords

Comments

T(n,g) is also the number of not necessarily connected 2-regular graphs with girth at least g: the part i corresponds to the i-cycle; addition of integers corresponds to disconnected union of cycles. - Jason Kimberley, Feb 05 2012

Examples

			Sum_{k>=1} y^k*(-1+1/Product_{i>=0} (1-x^(k+i))) = y*x+(2*y+y^2)*x^2+(3*y+y^2+y^3)*x^3+(5*y+2*y^2+y^3+y^4)*x^4+(7*y+2*y^2+y^3+y^4+y^5)*x^5+...
Triangle starts:  - _Jason Kimberley_, Feb 05 2012
1;
2, 1;
3, 1, 1;
5, 2, 1, 1;
7, 2, 1, 1, 1;
11, 4, 2, 1, 1, 1;
15, 4, 2, 1, 1, 1, 1;
22, 7, 3, 2, 1, 1, 1, 1;
30, 8, 4, 2, 1, 1, 1, 1, 1;
42, 12, 5, 3, 2, 1, 1, 1, 1, 1;
56, 14, 6, 3, 2, 1, 1, 1, 1, 1, 1;
77, 21, 9, 5, 3, 2, 1, 1, 1, 1, 1, 1;
101, 24, 10, 5, 3, 2, 1, 1, 1, 1, 1, 1, 1;
From _Tilman Piesk_, Feb 20 2016: (Start)
n = 12, k = 4, t = A000217(k-1) = 6
vp = A000041(n..n-t) = A000041(12..6) = (77, 56, 42, 30, 22, 15, 11)
vc = A231599(k-1, 0..t) = A231599(3, 0..6) = (1,-1,-1, 0, 1, 1,-1)
T(12, 4) = vp * transpose(vc) = 77-56-42+22+15-11 = 5
(End)
		

Crossrefs

Row sums give A046746.
Cf. A026835.
Cf. A026794.
Cf. A231599.
Not necessarily connected 2-regular graphs with girth at least g [partitions into parts >= g]: this sequence (triangle); columns of this sequence: A000041 (g=1 -- multigraphs with loops allowed), A002865 (g=2 -- multigraphs with loops forbidden), A008483 (g=3), A008484 (g=4), A185325(g=5), A185326 (g=6), A185327 (g=7), A185328 (g=8), A185329 (g=9). For g >= 3, girth at least g implies no loops or parallel edges. - Jason Kimberley, Feb 05 2012
Not necessarily connected 2-regular simple graphs with girth exactly g [partitions with smallest part g]: A026794 (triangle); chosen g: A002865 (g=2), A026796 (g=3), A026797 (g=4), A026798 (g=5), A026799 (g=6), A026800(g=7), A026801 (g=8), A026802 (g=9), A026803 (g=10). - Jason Kimberley, Feb 05 2012
Cf. A002260.

Programs

  • Haskell
    import Data.List (tails)
    a026807 n k = a026807_tabl !! (n-1) !! (k-1)
    a026807_row n = a026807_tabl !! (n-1)
    a026807_tabl = map
       (\row -> map (p $ last row) $ init $ tails row) a002260_tabl
       where p 0  _ = 1
             p _ [] = 0
             p m ks'@(k:ks) = if m < k then 0 else p (m - k) ks' + p m ks
    -- Reinhard Zumkeller, Dec 01 2012
    
  • Maple
    T:= proc(n, k) option remember;
          `if`(k<1 or k>n, 0, `if`(n=k, 1, T(n, k+1) +T(n-k, k)))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Mar 28 2012
  • Mathematica
    T[n_, k_] := T[n, k] = If[ k<1 || k>n, 0, If[n == k, 1, T[n, k+1] + T[n-k, k]]]; Table [Table[ T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Jan 28 2015, after Alois P. Heinz *)
  • Python
    from see_there import a231599_row  # A231599
    from sympy.ntheory import npartitions  # A000041
    def a026807(n, k):
        if k > n:
            return 0
        elif k > n/2:
            return 1
        else:
            vc = a231599_row(k-1)
            t = len(vc)
            vp_range = range(n-t, n+1)
            vp_range = vp_range[::-1]  # reverse
            r = 0
            for i in range(0, t):
                r += vc[i] * npartitions(vp_range[i])
            return r
    # Tilman Piesk, Feb 21 2016

Formula

T(n,1)=A000041(n), T(n,2)=A002865(n) for n>1, T(n,3)=A008483(n) for n>2, T(n,4)=A008484(n) for n>3.
G.f.: Sum_{k>=1} y^k*(-1+1/Product_{i>=0} (1-x^(k+i))). - Vladeta Jovovic, Jun 22 2003
T(n, k) = T(n, k+1) + T(n-k, k), T(n, k) = 1 if n/2 < k <= n. - Franklin T. Adams-Watters, Jan 24 2005; Tilman Piesk, Feb 20 2016
T(n, k) = A000041(n..n-t) * transpose(A231599(k-1, 0..t)) with t = A000217(k-1). - Tilman Piesk, Feb 20 2016
Equals A026794 * A000012 as infinite lower triangular matrices. - Gary W. Adamson, Jan 31 2008

A282634 Recursive 2-parameter sequence allowing the Ramanujan's sum calculation.

Original entry on oeis.org

1, 1, -1, 2, -1, -1, 2, 0, -2, 0, 4, -1, -1, -1, -1, 2, 1, -1, -2, -1, 1, 6, -1, -1, -1, -1, -1, -1, 4, 0, 0, 0, -4, 0, 0, 0, 6, 0, 0, -3, 0, 0, -3, 0, 0, 4, 1, -1, 1, -1, -4, -1, 1, -1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 0, 2, 0, -2, 0, -4, 0
Offset: 1

Views

Author

Gevorg Hmayakyan, Feb 20 2017

Keywords

Comments

a(n,0) = phi(n), where phi(n) is Euler's totient function A000010(n).
a(n,1) = mu(n), where mu(n) is the Möbius function A008683(n).

Examples

			The few first rows follow:            c_n(t)
  t   0   1   2   3   4   5   6     |  t   1   2   3   4   5   6   7
n                                   |n
1     1;                            |1     1;
2     1, -1;                        |2    -1,  1;
3     2, -1, -1;                    |3    -1, -1,  2;
4     2,  0, -2,  0;                |4     0, -2,  0,  2;
5     4, -1, -1, -1, -1;            |5    -1, -1, -1, -1,  4;
6     2,  1, -1, -2, -1,  1;        |6     1, -1, -2, -1,  1,  2;
7     6, -1, -1, -1, -1, -1, -1;    |7    -1, -1, -1, -1, -1, -1,  6;
      ...                           |     ...
[Edited by _Seiichi Manyama_, Mar 05 2018]
		

Crossrefs

Cf. A000010 (phi(n)), A008683 (mu(n)), A054532, A054533, A054534, A054535, A231599.

Programs

  • Mathematica
    b[n_, m_] := b[n, m] = If[n > 1, b[n - 1, m] - b[n - 1, m - n + 1], 0]
    b[1, m_] := b[1, m] = If[m == 0, 1, 0]
    nt[n_, t_] := Round[(n - 1)/2 - t/n]
    a[n_, t_] := Sum[b[n, k*n + t], {k, 0, nt[n, t]}]
    Flatten[Table[Table[a[n, m], {m, 0, n - 1}], {n, 1, 20}]]

Formula

a(n,t) = Sum(b(n, k*n + t), k=0..N(n, t)), where b(n,k) = A231599(n-1,k) and N(n,t) = [(n - 1)/2 - t/n].
a(n,t) = c_n(t) for t >= 1, where c_n(t) is a Ramanujan's sum A054533.
a(n,t) = a(n,-t)
From Seiichi Manyama, Mar 05 2018: (Start)
a(n,t) = c_n(n-t) = Sum_{d | gcd(n,n-t)} d*mu(n/d) for 0 <= t <= n-1.
So a(n,t) = Sum_{d | gcd(n,t)} d*mu(n/d) for 1 <= t <= n-1. (End)

A303992 Triangular array T(n,k) giving coefficients in expansion of Product_{j=1..n} (1-x^j)^3.

Original entry on oeis.org

1, 1, -3, 3, -1, 1, -3, 0, 8, -6, -6, 8, 0, -3, 1, 1, -3, 0, 5, 3, -6, -13, 9, 15, 0, -15, -9, 13, 6, -3, -5, 0, 3, -1, 1, -3, 0, 5, 0, 3, -13, -6, 9, 9, 24, -21, -24, -9, 3, 44, 3, -9, -24, -21, 24, 9, 9, -6, -13, 3, 0, 5, 0, -3, 1
Offset: 0

Views

Author

Seiichi Manyama, May 04 2018

Keywords

Examples

			Irregular triangle starts:
n\k| 0   1  2   3   4   5    6  7   8  9   10  11  12 13  14  15 16 17  18
---+-----------------------------------------------------------------------
0  | 1;
1  | 1, -3, 3, -1;
2  | 1, -3, 0,  8, -6, -6,   8, 0, -3, 1;
3  | 1, -3, 0,  5,  3, -6, -13, 9, 15, 0, -15, -9, 13, 6, -3, -5, 0, 3, -1;
		

Crossrefs

Programs

  • PARI
    T(n, k) = polcoef(prod(j=1, n, (1-x^j)^3), k);
    tabf(nn) = for(n=0, nn, for(k=0, 3*n*(n+1)/2, print1(T(n, k), ", ")); print)

A304080 Triangular array T(n,k) giving coefficients in expansion of Product_{j=1..n} (1-x^j)^2.

Original entry on oeis.org

1, 1, -2, 1, 1, -2, -1, 4, -1, -2, 1, 1, -2, -1, 2, 3, 0, -6, 0, 3, 2, -1, -2, 1, 1, -2, -1, 2, 1, 4, -4, -4, -2, 0, 10, 0, -2, -4, -4, 4, 1, 2, -1, -2, 1, 1, -2, -1, 2, 1, 2, 0, -2, -6, -2, 3, 6, 5, 2, -3, -12, -3, 2, 5, 6, 3, -2, -6, -2, 0, 2, 1, 2, -1, -2, 1
Offset: 0

Views

Author

Seiichi Manyama, May 06 2018

Keywords

Examples

			Irregular triangle starts:
n\k| 0   1   2  3   4   5   6   7   8  9  10  11  12  13  14 15 16 17  18  19 20
---+-----------------------------------------------------------------------------
0  | 1;
1  | 1, -2,  1;
2  | 1, -2, -1, 4, -1, -2,  1;
3  | 1, -2, -1, 2,  3,  0, -6,  0,  3, 2, -1, -2,  1;
4  | 1, -2, -1, 2,  1,  4, -4, -4, -2, 0, 10,  0, -2, -4, -4, 4, 1, 2, -1, -2, 1;
		

Crossrefs

Programs

  • PARI
    T(n, k) = polcoef(prod(j=1, n, (1-x^j)^2), k);
    tabf(nn) = for(n=0, nn, for(k=0, n*(n+1), print1(T(n, k), ", ")); print)

A333290 Irregular triangle read by rows: coefficients b_{r,j} (r>=1, j>=0) arising from an expansion of the partition function.

Original entry on oeis.org

1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, 0, 0, 2, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 2, 0, -1, -1, -1, -1, 0, 2, 0, 1, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 0, 1, 1, 0, -1, -1, -2, 0, 0, 0, 2, 1, 1, 0, -1, -1, 0, -1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 1, 0, 1, 0, -1, -2, -1, 0, -1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2020

Keywords

Comments

Is this (apart from offset) the same as A231599? - R. J. Mathar, Mar 21 2020

Examples

			Triangle begins:
1,
1,-1,
1,-1,-1,1,
1,-1,-1,0,1,1,-1,
1,-1,-1,0,0,2,0,0,-1,-1,1,
1,-1,-1,0,0,1,1,1,-1,-1,-1,0,0,1,1,-1,
...
		

Crossrefs

Cf. A333289.

Programs

  • Maple
    A333290 := proc(r,j)
        if r < 1 then
            0 ;
        elif r = 1 then
            if j= 0 then
                1;
            else
                0 ;
            end if;
        elif j < r-1 then
            procname(r-1,j) ;
        else
            procname(r-1,j) -procname(r-1,j-r+1) ;;
        end if;
    end proc: # R. J. Mathar, Mar 21 2020
  • Mathematica
    b[r_, j_] := b[r, j] = Which[r < 1, 0, r == 1, If[j == 0, 1, 0], j < r-1, b[r-1, j], True, b[r-1, j] - b[r-1, j-r+1]];
    Table[b[r, j], {r, 1, 9}, {j, 0, r(r-1)/2}] // Flatten (* Jean-François Alcover, Apr 29 2023, after R. J. Mathar *)

A061553 Sum of absolute values of coefficients of expansion of (1-x)(1-x^2)(1-x^3)...(1-x^n).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 20, 28, 36, 44, 54, 72, 92, 104, 138, 176, 212, 268, 332, 416, 508, 628, 776, 968, 1192, 1480, 1836, 2288, 2812, 3472, 4292, 5312, 6572, 8120, 10028, 12388, 15300, 18860, 23276, 28740, 35468, 43732, 53954, 66540, 82016, 101044
Offset: 0

Views

Author

Steffen Eckmann (steffen.eckmann(AT)eon.com), May 17 2001

Keywords

Comments

a(n) >= A160089(n) with equality only for n=0. - Michel Marcus, Jun 12 2013

Examples

			a(1) = 1+1 = 2; a(4) = Length(P(4,x)) = Length(1 - x - x^2 + 2x^5 - x^8 - x^9 + x^10) = 1+1+1+2+1+1+1 = 8
		

Crossrefs

Programs

  • PARI
    a(n) = {pol = prod(i=1, n, 1-x^i); return (sum(i=0, poldegree(pol), abs(polcoeff(pol, i))));} \\ Michel Marcus, Jun 12 2013

Formula

a(n) := |c(n, 0)| + |c(n, 1)| + ... + |c(n, n(n+1)/2)| where c(n, j) are the coefficients of the polynomial P(n, x) := (1-x)(1-x^2)(1-x^3)...(1-x^n)

Extensions

a(0)=1 prepended by Seiichi Manyama, May 03 2018

A282283 Recursive 2-parameter sequence allowing calculation of the Euler Totient function.

Original entry on oeis.org

0, 1, -1, 1, 2, -4, 2, -4, 10, -6, -2, 2, 6, -16, 10, 4, -6, 8, -10, 4, -10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2, 12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6, -18, 52, -34, -16, 18, -18, 34, -36, 20, 10, -6, -2, 4, -28, 18, 8
Offset: 0

Views

Author

Gevorg Hmayakyan, Feb 11 2017

Keywords

Comments

The a(n,m) forms a table where each row has (n*(n-3)+4)/2 = A152947(n) elements.
The index of the first row is n=1 and the index of the first column is m=0.
The right diagonal a(n, A152947(n)) = A000010(n), Euler Totient function.

Examples

			The first few rows are:
0, 1;
-1, 1;
2, -4, 2;
-4, 10, -6, -2, 2;
6, -16, 10, 4, -6, 8, -10, 4;
-10, 28, -18, -8, 10, -10, 10, -2, 8, -10, 0, 2;
12, -34, 22, 10, -12, 12, -22, 30, -30, 6, 10, -10, 8, 0, 6, -14, 6;
		

Crossrefs

Programs

  • Mathematica
    U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, n*(n - 1)/2 - m]*(-1)^n - U[n - 1, m], 0]
    U[1, m_] := U[1, m] = If[m == 0, 1, 0]
    Q[n_, m_] := U[n, m - 2] - 2*U[n, m - 1] + U[n, m]
    nu[n_]:=(n-1)*n/2+2-n
    a[n_, m_] := a[n, m] = If[(m < 0) || (nu[n] < m), 0, a[n - 1, m - n + 1] - a[n - 1, m] - a[n - 1, nu[n - 1]]*Q[n - 1, m]]
    a[1, m_] := a[1, m] = If[m == 1, 1, 0]
    Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 20}]
    Table[a[n, nu[n]], {n, 1, 50}]

Formula

nu(n) = (n*(n-3)+4)/2
Q(n,m) = 2*A231599(n,m-1)-A231599(n,m-2)-A231599(n,m)
a(n, m) = a(n - 1, m - n + 1) - a(n - 1, m) - a(n - 1, nu(n - 1))*Q(n - 1, m) if (m < 0) or (nu(n) < m)
a(1,m)=1 if m=1 and 0 otherwise.
a(n,nu(n))= A000010(n)

A301701 a(n) is the smallest positive integer m, with the property that n appears as a coefficient in the polynomial P_m(x) = (x-1)(x^2-1)...(x^m-1).

Original entry on oeis.org

3, 1, 4, 10, 12, 17, 16, 19, 20, 22, 22, 23, 24, 25, 25, 25, 24, 26, 26, 28, 27, 27, 29, 28, 28, 29, 29, 30, 28, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 32, 33, 33, 33, 32, 33, 32, 33, 32, 33, 33, 36, 35, 33, 33, 36, 34, 34, 37, 35, 34, 37, 35, 34, 34, 35, 35, 35, 35
Offset: 0

Views

Author

Ovidiu Bagdasar, Mar 25 2018

Keywords

Comments

We conjecture that all integers appear as a coefficient of a polynomial P_m(x).
This property is known to hold for the cyclotomic polynomials.
The conjecture holds for the first 10^5 positive integers, with a maximum on those integers of a(99852) = 1921. - David A. Corneth, Apr 08 2018

Examples

			We have:
P_1(x) = x-1, hence a(1)=1.
P_2(x) = (x-1)*(x^2-1) = x^3-x^2-x+1;
P_3(x) = (x-1)*(x^2-1)*(x^3-1) = x^6-x^5-x^4+x^2+x-1;
P_4(x) = (x-1)*(x^2-1)*(x^3-1)*(x^4-1) = x^10 - x^9 - x^8+2x^5-x^2-x+1, hence a(2)=4.
n=3 first appears as a coefficient of P_{10}(x).
		

Crossrefs

Cf. A231599: a(n) is the index of the first row m containing number n.

Programs

  • Maple
    T:= proc(n) option remember; [(p-> seq(coeff(p, x, i),
        i=0..degree(p)))(expand(mul(1-x^i, i=1..n)))] end:
    a:= proc(n) local k; for k while not n in T(k) do od: k end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Mar 29 2019
  • Mathematica
    With[{s = Array[CoefficientList[Times @@ Array[x^# - 1 &, #], x] &, 40]}, TakeWhile[Array[FirstPosition[s, #][[1]] &, Max@ Map[Max, s]], IntegerQ]] (* Michael De Vlieger, Apr 05 2018 *)
  • PARI
    a(n) = {my(k=1); while (!vecsearch(vecsort(Vec(prod(j=1, k, x^j-1))), n), k++); k;} \\ Michel Marcus, Apr 08 2018
    
  • PARI
    first(n) = {my(pol = [1], res = vector(n), todo = n+1, t = 0); while(1, t++; for(i = 1, #pol, if(0 < pol[i] && pol[i] <=n, if(res[pol[i]] == 0, res[pol[i]] = t-1; todo--; if(todo == 0, return(concat([3], res))))));  pol = concat(pol, vector(t)) - concat(vector(t), pol))} \\ David A. Corneth, Apr 08 2018

Extensions

Offset changed to 0 by David A. Corneth, Apr 08 2018
Showing 1-10 of 15 results. Next