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.

User: Joerg Arndt

Joerg Arndt's wiki page.

Joerg Arndt has authored 700 sequences. Here are the ten most recent ones:

A370606 Primes p such that valuation(p-1,2) is a record.

Original entry on oeis.org

2, 3, 5, 17, 97, 193, 257, 7681, 12289, 40961, 65537, 786433, 5767169, 7340033, 23068673, 104857601, 167772161, 469762049, 2013265921, 3221225473, 75161927681, 77309411329, 206158430209, 2061584302081, 2748779069441, 6597069766657, 39582418599937, 79164837199873
Offset: 1

Author

Joerg Arndt, Feb 23 2024

Keywords

Crossrefs

Cf. A084924 (valuation(p+1,2) is a record).
Cf. A370607 (corresponding 2-valuations).

Programs

  • PARI
    r=-1;forprime(p=2,10^12,v=valuation(p-1,2);if(v>r,print1(p,", ");r=v))
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A370606_gen(): # generator of terms
        a = 1
        while True:
            for q in count(a,a):
                if isprime(q+1):
                    yield q+1
                    a = (q&-q)<<1
                    break
    A370606_list = list(islice(A370606_gen(),30)) # Chai Wah Wu, Feb 23 2024

Extensions

a(21)-a(28) from Chai Wah Wu, Feb 23 2024

A370607 2-valuations of terms of A370606.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 16, 18, 19, 20, 21, 22, 25, 26, 27, 30, 31, 33, 36, 37, 39, 41, 42, 43, 44, 45, 46, 47, 48, 50, 52, 55, 56, 57, 59, 60, 63, 66, 67, 68, 69, 70, 71, 75, 77, 78, 81, 82, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 98, 99, 100, 103, 104
Offset: 1

Author

Joerg Arndt, Feb 23 2024

Keywords

Programs

  • PARI
    r=-1;forprime(p=2,10^12,v=valuation(p-1,2);if(v>r,print1(v,", ");r=v));
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A370607_gen(): # generator of terms
        a = 1
        while True:
            for q in count(a,a):
                if isprime(q+1):
                    yield (b:=q&-q).bit_length()-1
                    a = b<<1
                    break
    A370607_list = list(islice(A370607_gen(),30)) # Chai Wah Wu, Feb 23 2024

Extensions

a(21)-a(67) from Chai Wah Wu, Feb 23 2024

A370199 a(n) is the number of odd polyominoes with n cells.

Original entry on oeis.org

0, 1, 3, 11, 35, 108, 380, 1348, 5014, 18223, 67634, 252849, 950346, 3602437, 13697333, 52293534, 200399576, 770410271, 2970369338, 11482572252, 44492417777, 172766286339, 672186167762, 2619985274260, 10228841840226, 39996338183554, 156612016049122
Offset: 1

Author

Joerg Arndt and Hugo Pfoertner, Feb 11 2024

Keywords

Comments

Whether a polyomino is "odd" is determined by the fact that the permutation defined by assigning the positions from row- or column-wise enumeration of its cells on a square grid is an odd permutation. See the description in the 'Ponder This' challenge for the exact definition.
The terms a(1)-a(10) were given in this description, and a(11)-a(20) were in the solution. The larger terms are results of the program that the user "uau" provided in the Mersenne forum.

Crossrefs

Cf. A001168.

Programs

  • C
    See the 'user uau' link.

Formula

a(4*n+2) = A001168(4*n+2)/2.
a(4*n+3) = A001168(4*n+3)/2.

A369770 a(n) is the maximal coefficient in the expansion of Product_{k=1..n} (1+k*x)^k.

Original entry on oeis.org

1, 1, 8, 387, 192832, 1348952000, 142641794707200, 271057611231886800384, 10679112895658933205816311808, 9866210328276596971591655994333069312, 238373589086269734817383263830485997977600000000, 166142193793387680126634957823414405189312889036472320000000
Offset: 0

Author

Joerg Arndt, Jan 31 2024

Keywords

Crossrefs

Cf. A065048 (maximal coefficient in Product_{k=1..n} (1+k*x) ).

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, expand(b(n-1)*(1+n*x)^n)) end:
    a:= n-> max(coeffs(b(n))):
    seq(a(n), n=0..11);  # Alois P. Heinz, Jan 31 2024
  • PARI
    a(n)=vecmax(Vec(prod(k=1,n,(1+k*x)^k)));
    vector(20,n,a(n-1))
    
  • Python
    from collections import Counter
    from math import comb
    def A369770(n):
        c = {0:1}
        for k in range(1,n+1):
            d = Counter(c)
            for j in c:
                a = c[j]
                for i in range(1,k+1):
                    d[j+i] += comb(k,i)*k**i*a
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024

A369425 Expansion of Sum_{n>=1} x^(n*(n+1)/2)*((1+x)/(1-x))^n.

Original entry on oeis.org

1, 2, 3, 6, 10, 15, 24, 40, 64, 97, 144, 216, 328, 496, 737, 1074, 1546, 2218, 3186, 4578, 6555, 9318, 13130, 18358, 25530, 35398, 49002, 67735, 93416, 128392, 175704, 239352, 324680, 438888, 591672, 795993, 1068984, 1433032, 1917128, 2558648, 3405784, 4520872, 5984872, 7903256, 10413561
Offset: 1

Author

Joerg Arndt, Jan 23 2024

Keywords

Crossrefs

Cf. A369424.

Programs

  • PARI
    my(N=66,x='x+O('x^N)); Vec(sum(n=1,N,x^(n*(n+1)/2)*((1+x)/(1-x))^n))

A369424 Expansion of Sum_{n>=1} x^(n^2)*((1+x)/(1-x))^n.

Original entry on oeis.org

1, 2, 2, 3, 6, 10, 14, 18, 23, 32, 48, 72, 104, 144, 192, 249, 320, 416, 552, 744, 1008, 1360, 1816, 2392, 3105, 3978, 5050, 6386, 8082, 10266, 13098, 16770, 21506, 27562, 35226, 44819, 56702, 71298, 89134, 110898, 137502, 170146, 210382, 260178, 321982, 398786, 494190, 612466, 758623, 938480, 1158768
Offset: 1

Author

Joerg Arndt, Jan 23 2024

Keywords

Crossrefs

Cf. A369425.

Programs

  • PARI
    my(N=66,x='x+O('x^N)); Vec(sum(n=1,N,x^(n^2)*((1+x)/(1-x))^n))

A369377 a(n) is the number of elements p(j) < j (left displacements) in the n-th permutation in lexicographic order.

Original entry on oeis.org

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

Author

Joerg Arndt, Jan 22 2024

Keywords

Examples

			In the following dots are used for zeros in the permutations and their inverses.
   n:    permutation    inv. perm.   a(n)
   0:    [ . 1 2 3 ]    [ . 1 2 3 ]   0
   1:    [ . 1 3 2 ]    [ . 1 3 2 ]   1
   2:    [ . 2 1 3 ]    [ . 2 1 3 ]   1
   3:    [ . 2 3 1 ]    [ . 3 1 2 ]   1
   4:    [ . 3 1 2 ]    [ . 2 3 1 ]   2
   5:    [ . 3 2 1 ]    [ . 3 2 1 ]   1
   6:    [ 1 . 2 3 ]    [ 1 . 2 3 ]   1
   7:    [ 1 . 3 2 ]    [ 1 . 3 2 ]   2
   8:    [ 1 2 . 3 ]    [ 2 . 1 3 ]   1
   9:    [ 1 2 3 . ]    [ 3 . 1 2 ]   1
  10:    [ 1 3 . 2 ]    [ 2 . 3 1 ]   2
  11:    [ 1 3 2 . ]    [ 3 . 2 1 ]   1
  12:    [ 2 . 1 3 ]    [ 1 2 . 3 ]   2
  13:    [ 2 . 3 1 ]    [ 1 3 . 2 ]   2
  14:    [ 2 1 . 3 ]    [ 2 1 . 3 ]   1
  15:    [ 2 1 3 . ]    [ 3 1 . 2 ]   1
  16:    [ 2 3 . 1 ]    [ 2 3 . 1 ]   2
  17:    [ 2 3 1 . ]    [ 3 2 . 1 ]   2
  18:    [ 3 . 1 2 ]    [ 1 2 3 . ]   3
  19:    [ 3 . 2 1 ]    [ 1 3 2 . ]   2
  20:    [ 3 1 . 2 ]    [ 2 1 3 . ]   2
  21:    [ 3 1 2 . ]    [ 3 1 2 . ]   1
  22:    [ 3 2 . 1 ]    [ 2 3 1 . ]   2
  23:    [ 3 2 1 . ]    [ 3 2 1 . ]   2
		

Crossrefs

Formula

a(n) + A369376(n) = A055093(n).

A369376 a(n) is the number of elements p(j) > j (right displacements) in the n-th permutation in lexicographic order.

Original entry on oeis.org

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

Author

Joerg Arndt, Jan 22 2024

Keywords

Examples

			In the following dots are used for zeros in the permutations and their inverses.
   n:    permutation    inv. perm.   a(n)
   0:    [ . 1 2 3 ]    [ . 1 2 3 ]   0
   1:    [ . 1 3 2 ]    [ . 1 3 2 ]   1
   2:    [ . 2 1 3 ]    [ . 2 1 3 ]   1
   3:    [ . 2 3 1 ]    [ . 3 1 2 ]   2
   4:    [ . 3 1 2 ]    [ . 2 3 1 ]   1
   5:    [ . 3 2 1 ]    [ . 3 2 1 ]   1
   6:    [ 1 . 2 3 ]    [ 1 . 2 3 ]   1
   7:    [ 1 . 3 2 ]    [ 1 . 3 2 ]   2
   8:    [ 1 2 . 3 ]    [ 2 . 1 3 ]   2
   9:    [ 1 2 3 . ]    [ 3 . 1 2 ]   3
  10:    [ 1 3 . 2 ]    [ 2 . 3 1 ]   2
  11:    [ 1 3 2 . ]    [ 3 . 2 1 ]   2
  12:    [ 2 . 1 3 ]    [ 1 2 . 3 ]   1
  13:    [ 2 . 3 1 ]    [ 1 3 . 2 ]   2
  14:    [ 2 1 . 3 ]    [ 2 1 . 3 ]   1
  15:    [ 2 1 3 . ]    [ 3 1 . 2 ]   2
  16:    [ 2 3 . 1 ]    [ 2 3 . 1 ]   2
  17:    [ 2 3 1 . ]    [ 3 2 . 1 ]   2
  18:    [ 3 . 1 2 ]    [ 1 2 3 . ]   1
  19:    [ 3 . 2 1 ]    [ 1 3 2 . ]   1
  20:    [ 3 1 . 2 ]    [ 2 1 3 . ]   1
  21:    [ 3 1 2 . ]    [ 3 1 2 . ]   1
  22:    [ 3 2 . 1 ]    [ 2 3 1 . ]   2
  23:    [ 3 2 1 . ]    [ 3 2 1 . ]   2
		

Crossrefs

Formula

a(n) + A369377(n) = A055093(n).

A369322 a(n) is the number of weak ascent sequences (of any length) with n weak ascents.

Original entry on oeis.org

1, 1, 3, 20, 285, 8498, 521549, 65149296, 16446593964, 8354292354562, 8517018874559019, 17400156347544892896, 71175200852044807325678, 582639858848549658827324726, 9542182685892187892079287210803, 312611431819035281373960038697247872
Offset: 0

Author

Joerg Arndt, Jan 20 2024

Keywords

Comments

Column sums of A369321.
A weak ascent sequence is a sequence [d(1), d(2), ..., d(n)] where d(1)=0, d(k)>=0, and d(k) <= 1 + asc([d(1), d(2), ..., d(k-1)]) and asc(.) counts the weak ascents d(j) >= d(j-1) of its argument.

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember;
         `if`(k<0, 0,  `if`(n=0, `if`(k=0, 1, 0), add((d->
            b(n-1, j, t+d, k-d))(`if`(j>=i, 1, 0)), j=0..t+1)))
        end:
    a:= n-> add(b(j, -1$2, n), j=n..n*(n+1)/2):
    seq(a(n), n=0..15);  # Alois P. Heinz, Jan 25 2024
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[k < 0, 0, If[n == 0, If[k == 0, 1, 0], Sum[Function[d, b[n-1, j, t+d, k-d]][If[j >= i, 1, 0]], {j, 0, t+1}]]];
    a[n_] := Sum[b[j, -1, -1, n], {j, n, n*(n+1)/2}];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 07 2025, after Alois P. Heinz *)

A369321 T(n,k) is the number of length-n weak ascent sequences (prefixed with a zero) with k weak ascents, triangle read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 5, 0, 0, 0, 9, 14, 0, 0, 0, 5, 59, 42, 0, 0, 0, 1, 92, 342, 132, 0, 0, 0, 0, 75, 1073, 1863, 429, 0, 0, 0, 0, 35, 1882, 10145, 9794, 1430, 0, 0, 0, 0, 9, 2131, 31345, 84977, 50380, 4862, 0, 0, 0, 0, 1, 1661, 64395, 417220, 658423, 255606, 16796
Offset: 0

Author

Joerg Arndt, Jan 20 2024

Keywords

Comments

A weak ascent sequence is a sequence [d(1), d(2), ..., d(n)] where d(1)=0, d(k)>=0, and d(k) <= 1 + asc([d(1), d(2), ..., d(k-1)]) and asc(.) counts the weak ascents d(j) >= d(j-1) of its argument.

Examples

			1,
0, 1,
0, 0, 2,
0, 0, 1, 5,
0, 0, 0, 9, 14,
0, 0, 0, 5, 59,   42,
0, 0, 0, 1, 92,  342,    132,
0, 0, 0, 0, 75, 1073,   1863,     429,
0, 0, 0, 0, 35, 1882,  10145,    9794,     1430,
0, 0, 0, 0,  9, 2131,  31345,   84977,    50380,     4862,
0, 0, 0, 0,  1, 1661,  64395,  417220,   658423,   255606,    16796,
0, 0, 0, 0,  0,  912,  95477, 1370141,  4818426,  4835924,  1285453,   58786,
0, 0, 0, 0,  0,  350, 107002, 3291589, 23507705, 50477693, 34184279, 6428798, 208012,
...
		

Crossrefs

Cf. A000108 (main diagonal), A336070 (row sums), A369322 (column sums).
T(2n,n) gives A373115.
Cf. A137251.

Programs

  • Maple
    b:= proc(n, i, t) option remember; expand(`if`(n=0, 1, add(
          b(n-1, j, t+`if`(j>=i, 1, 0))*`if`(j>=i, x, 1), j=0..t+1)))
        end:
    T:= (n, k)-> coeff(b(n, -1$2), x, k):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Jan 23 2024
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Expand[If[n == 0, 1, Sum[
       b[n - 1, j, t + If[j >= i, 1, 0]]*If[j >= i, x, 1], {j, 0, t + 1}]]];
    T[n_, k_] := Coefficient[b[n, -1, -1], x, k];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, May 24 2024, after Alois P. Heinz *)
  • PARI
    \\ see formula (5) on page 18 of the Benyi/Claesson/Dukes reference
    N=40;
    M=matrix(N, N, r, c, -1);  \\ memoization
    a(n, k)=
    {
        if ( n==0 && k==0, return(1) );
        if ( k==0, return(0) );
        if ( n==0, return(0) );
        if ( M[n, k] != -1 , return( M[n, k] ) );
        my( s );
        s = sum( i=0, n, sum( j=0, k-1,
             (-1)^j * binomial(k-j, i) * binomial(i, j) * a( n-i, k-j-1 )) );
        M[n, k] = s;
        return( s );
    }
    \\ for (n=0, N, print1( sum(k=1, n, a(n, k)), ", "); ); \\ A336070
    for (n=0, N, for(k=0, n, print1(a(n, k), ", "); ); print(); );
    \\ Joerg Arndt, Jan 20 2024

Formula

T(n,n) = A000108(n) (number of length-n weak ascent sequences with maximal number of weak ascents).