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 21-30 of 51 results. Next

A350393 Smallest degree of x with the largest coefficient in Product_{k=1..n} (1 + x^k).

Original entry on oeis.org

0, 0, 0, 3, 3, 5, 9, 12, 18, 21, 27, 33, 39, 45, 52, 60, 68, 76, 85, 95, 105, 115, 126, 138, 150, 162, 175, 189, 203, 217, 232, 248, 264, 280, 297, 315, 333, 351, 370, 390, 410, 430, 451, 473, 495, 517, 540, 564, 588, 612, 637, 663, 689, 715, 742, 770, 798, 826, 855, 885, 915, 945, 976
Offset: 0

Views

Author

Max Alekseyev, Dec 28 2021

Keywords

Comments

Apparently, a(n) = A011848(n+1) for n >= 10. - Hugo Pfoertner, Dec 30 2021

Crossrefs

Cf. A025591 (largest coefficient), A350394 (largest degree of x), A350395, A350396.
Cf. A011848.

Programs

  • PARI
    { A350393(n) = my(v,t,x='x); v = Vecrev(prod(k=1,n,1+x^k)); vecmax(v,&t); t-1; }

A350394 Largest degree of x with the largest coefficient in Product_{k=1..n} (1 + x^k).

Original entry on oeis.org

0, 1, 3, 3, 7, 10, 12, 16, 18, 24, 28, 33, 39, 46, 53, 60, 68, 77, 86, 95, 105, 116, 127, 138, 150, 163, 176, 189, 203, 218, 233, 248, 264, 281, 298, 315, 333, 352, 371, 390, 410, 431, 452, 473, 495, 518, 541, 564, 588, 613, 638, 663, 689, 716, 743, 770, 798, 827, 856, 885, 915, 946, 977
Offset: 0

Views

Author

Max Alekseyev, Dec 28 2021

Keywords

Comments

Apparently, a(n) = A054925(n+1) for n >= 10. - Hugo Pfoertner, Dec 30 2021

Crossrefs

Cf. A025591 (largest coefficient), A350393 (smallest degree of x), A350395, A350396.
Cf. A054925.

Programs

  • PARI
    { A350394(n) = my(v,t,x='x); v = Vec(prod(k=1,n,1+x^k)); vecmax(v,&t); #v-t; }

A369709 Maximal coefficient of (1 + x)^3 * (1 + x^2)^3 * (1 + x^3)^3 * ... * (1 + x^n)^3.

Original entry on oeis.org

1, 3, 12, 62, 332, 1974, 12345, 80006, 531524, 3602358, 24836850, 173607568, 1226700784, 8748861828, 62922343566, 455805857978, 3321800235936, 24338840717799, 179217603427200, 1325490660318216, 9841000101286172, 73319407735938570, 548051770664957631, 4108826483323392880
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[(1 + x^k)^3, {k, 1, n}], x]], {n, 0, 23}]
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, (1+x^k)^3))); \\ Michel Marcus, Jan 30 2024
    
  • Python
    from collections import Counter
    def A369709(n):
        c = {0:1}
        for k in range(1,n+1):
            d = Counter(c)
            for j in c:
                a = c[j]
                d[j+k] += 3*a
                d[j+2*k] += 3*a
                d[j+3*k] += a
            c = d
        return max(c.values()) # Chai Wah Wu, Feb 07 2024

A059607 As an upper right triangle, number of distinct partitions of n where the highest part is k (0<=k<=n).

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Jan 30 2001

Keywords

Examples

			Rows are {1,0,0,0,...}, {1,0,0,0,...}, {1,1,0,0,...}, {1,1,1,1,...}, {1,1,1,2,...} etc. T(7,4)=2 since 7 can be written as 4+3 or 4+2+1. T(12,6)=3 since 12 can be written as 6+5+1 or 6+4+2 or 6+3+2+1.
		

Crossrefs

As upper right triangle, row sum is A011782, column sum is A000009, column maximum is A025591 (offset), row maximum is A026839 (offset). Cf. A026836 for this triangle starting at (1, 1) rather than (0, 0).

Programs

Formula

T(n, k) =sum_j[T(n-k, j)] for k>j with T(0, 0)=1

A070936 Square array read by antidiagonals: T(n,k) = number of partitions of n into distinct parts, each no more than k.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 12 2002

Keywords

Examples

			Rows start
1,1,1,1,1,...;
0,1,1,1,1,...;
0,0,1,1,1,...;
0,0,1,2,2,...;
0,0,0,1,2,...; etc.
T(10,5)=3 since 10 can be partitioned 3 ways as 5+4+1=5+3+2=4+3+2+1 with each part less than or equal to 5.
		

Crossrefs

Cf. A008284, A060016. With some imagination, this is the transpose of A026836 and A053632. Column sums are 2^k=A000079(k). Column maximum is A025591(k), which appears A070936(k) times in the column.

Formula

T(n, k) =T(n-1, k)+T(n-1, k-n) (with T(0, 0)=1) =A053632(k, n) =A026836(n+k+1, k+1) =sum_{0<=j<=k}A026836(n, j). For k>=n, T(n, k)=T(n, n)=A000009(n).

A350404 Number of solutions to +-2 +- 3 +- 5 +- 7 +- ... +- prime(n) = 0 or 1.

Original entry on oeis.org

1, 0, 1, 2, 1, 2, 3, 4, 6, 10, 16, 26, 45, 78, 138, 244, 439, 784, 1417, 2572, 4698, 8682, 16021, 29720, 55146, 102170, 190274, 356804, 671224, 1269022, 2404289, 4521836, 8535117, 16134474, 30635869, 58062404, 110496946, 210500898, 401422210, 767158570, 1467402238
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 29 2021

Keywords

Examples

			a(6) = 3: 2 + 3 + 5 - 7 + 11 - 13 =
         -2 + 3 + 5 - 7 - 11 + 13 =
         -2 + 3 - 5 + 7 + 11 - 13 = 1.
		

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,
          b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))
        end:
    a:=n-> b(0, n)+b(1, n):
    seq(a(n), n=0..45);  # Alois P. Heinz, Jan 16 2022
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
    b[n_, i_] := b[n, i] = If[n > s[i], 0, If[i == 0, 1,
         b[n + Prime[i], i - 1] + b[Abs[n - Prime[i]], i - 1]]];
    a[n_] := b[0, n] + b[1, n];
    Table[a[n], {n, 0, 45}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)
  • Python
    from itertools import product
    from sympy import prime, primerange
    def a(n):
        if n == 0: return 1
        nn = ["0"] + [str(i) for i in primerange(2, prime(n)+1)]
        return sum(eval("".join([*sum(zip(nn, ops+("", )), ())])) in {0, 1} for ops in product("+-", repeat=n))
    print([a(n) for n in range(18)]) # Michael S. Branicky, Jan 16 2022
    
  • Python
    from sympy import sieve, primerange
    from functools import cache
    @cache
    def b(n, i):
        maxsum = 0 if i == 0 else sum(p for p in primerange(2, sieve[i]+1))
        if n > maxsum: return 0
        if i == 0: return 1
        return b(n+sieve[i], i-1) + b(abs(n-sieve[i]), i-1)
    def a(n): return b(0, n) + b(1, n)
    print([a(n) for n in range(43)]) # Michael S. Branicky, Jan 16 2022

Extensions

a(39)-a(40) from Michael S. Branicky, Jan 16 2022

A359320 Maximal coefficient of (1 + x) * (1 + x^16) * (1 + x^81) * ... * (1 + x^(n^4)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 9, 13, 17, 24, 34, 53, 84, 130, 177, 290, 500, 797, 1300, 2066, 3591, 6090, 10298, 17330, 29888, 50811, 88358, 153369, 280208, 481289, 845090, 1474535, 2703811, 4808816, 8329214, 14806743, 27529781, 48859783, 87674040, 156471632
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 25 2022

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local i; max(coeffs(expand(mul(1+x^(i^4), i=1..n)))) end proc:
    map(f, [$1..50]); # Robert Israel, Dec 26 2022
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1+x^(k^4)))); \\ Michel Marcus, Dec 26 2022
    
  • Python
    from collections import Counter
    def A359320(n):
        c = {0:1,1:1}
        for i in range(2,n+1):
            j, d = i**4, Counter(c)
            for k in c:
                d[k+j] += c[k]
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024

Extensions

a(38)-a(50) from Seiichi Manyama, Dec 26 2022

A342804 Number of solutions to 1 +-*/ 2 +-*/ 3 +-*/ ... +-*/ n = 0.

Original entry on oeis.org

0, 0, 1, 1, 1, 5, 8, 18, 39, 91, 185, 460, 1051, 2526, 6280, 15645, 35516, 93765, 225989, 611503
Offset: 1

Views

Author

Scott R. Shannon, Mar 27 2021

Keywords

Comments

Normal operator precedence is followed, so multiplication and division are performed before addition or subtraction, and each operator only acts on the following term, so 2 / 3 * 4 equals (2 / 3) * 4.
Unlike A058377, which uses only addition and subtraction, this sequence has solutions for all values of n >= 3.

Examples

			a(3) = 1 as 1 + 2 - 3 = 0 is the only solution.
a(4) = 1 as 1 - 2 - 3 + 4 = 0 is the only solution.
a(5) = 1 as 1 * 2 - 3 - 4 + 5 = 0 is the only solution. This is the first term where a solution exists while no corresponding solution exists in A058377.
a(6) = 5. The solutions, all of which use multiplication or division, are
         1 + 2 * 3 + 4 - 5 - 6 = 0,
         1 - 2 + 3 * 4 - 5 - 6 = 0,
         1 - 2 * 3 + 4 - 5 + 6 = 0,
         1 * 2 + 3 - 4 + 5 - 6 = 0,
         1 - 2 / 3 / 4 - 5 / 6 = 0.
  The last solution is the first that uses division.
a(7) = 8. Six solutions use just addition, division and multiplication. The other two are
         1 + 2 - 3 * 4 * 5 / 6 + 7 = 0,
         1 / 2 * 3 * 4 - 5 + 6 - 7 = 0.
a(15) = 6280. An example solution is
         1 / 2 / 3 / 4 * 5 * 6 - 7 - 8 + 9 / 10 + 11 / 12 * 13 + 14 / 15 = 0
  which includes four fractions that sum to 15, which is balanced by - 7 - 8.
a(20) = 611503. An example solution is
         1 / 2 / 3 / 4 / 5 + 6 / 7 / 8 / 9 / 10 * 11 / 12 - 13 / 14 / 15 / 16
              + 17 / 18 - 19 / 20 = 0
  which sums five fractions that include fourteen divisions.
		

Crossrefs

Cf. A342602 (using +-*), A342995 (using +-/), A058377 (using +-), A063865, A000217, A025591, A161943.

Programs

  • Mathematica
    Table[Length@Select[Tuples[{"+","-","*","/"},k-1],ToExpression[""<>Riffle[ToString/@Range@k,#]]==0&],{k,9}] (* Giorgos Kalogeropoulos, Apr 02 2021 *)
  • Python
    from itertools import product
    from fractions import Fraction
    def a(n):
      nn = ["Fraction("+str(i)+", 1)" for i in range(1, n+1)]
      return sum(eval("".join([*sum(zip(nn, ops+("",)), ())])) == 0 for ops in product("+-*/", repeat=n-1))
    print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Apr 02 2021

A350395 Numbers m such that a term with the largest coefficient in Product_{k=1..m} (1 + x^k) is unique.

Original entry on oeis.org

0, 3, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28, 31, 32, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 108, 111, 112, 115, 116, 119, 120, 123, 124, 127, 128, 131, 132, 135, 136, 139, 140, 143, 144, 147, 148, 151, 152, 155, 156, 159, 160, 163, 164, 167, 168, 171, 172, 175, 176, 179, 180, 183, 184, 187, 188, 191, 192, 195, 196
Offset: 1

Views

Author

Max Alekseyev, Dec 28 2021

Keywords

Comments

Numbers m such that A350393(m) = A350394(m).
Apparently, a(n) = A014601(n+1) for n >= 3. - Hugo Pfoertner, Dec 30 2021

Crossrefs

Complement of A350396.
Cf. A025591 (largest coefficient), A350393, A350394.
Cf. A014601.

A350396 Numbers m such that there are two or more terms with the largest coefficient in Product_{k=1..m} (1 + x^k).

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 9, 10, 13, 14, 17, 18, 21, 22, 25, 26, 29, 30, 33, 34, 37, 38, 41, 42, 45, 46, 49, 50, 53, 54, 57, 58, 61, 62, 65, 66, 69, 70, 73, 74, 77, 78, 81, 82, 85, 86, 89, 90, 93, 94, 97, 98, 101, 102, 105, 106, 109, 110, 113, 114, 117, 118, 121, 122, 125, 126, 129, 130, 133, 134, 137, 138, 141, 142, 145, 146, 149, 150, 153, 154, 157, 158, 161, 162, 165, 166, 169, 170, 173, 174, 177, 178
Offset: 1

Views

Author

Max Alekseyev, Dec 28 2021

Keywords

Comments

Numbers m such that A350393(m) < A350394(m).
Apparently, a(n) = A042963(n-2) for n >= 7. - Hugo Pfoertner, Dec 30 2021

Crossrefs

Complement of A350395.
Cf. A025591 (largest coefficient), A350393, A350394.
Cf. A042963.
Previous Showing 21-30 of 51 results. Next