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-5 of 5 results.

A285104 a(n) = 2^n - A285103(n).

Original entry on oeis.org

0, 0, 0, 2, 10, 20, 52, 112, 234, 484, 992, 2018, 4060, 8140, 16336, 32706, 65474, 131004, 262056, 524184, 1048460, 2097044, 4194176, 8388480, 16777084, 33554264, 67108704, 134217560, 268435256, 536870708, 1073741584, 2147483416, 4294967054, 8589934308, 17179868884, 34359738044, 68719476404, 137438953124, 274877906592, 549755813536
Offset: 0

Views

Author

Antti Karttunen, Apr 15 2017

Keywords

Crossrefs

Programs

Formula

a(n) = 2^n - A285103(n).

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

A068052 Start from 1, shift one left and sum mod 2 (bitwise-XOR) to get 3 (11 in binary), then shift two steps left and XOR to get 15 (1111 in binary), then three steps and XOR to get 119 (1110111 in binary), then four steps and so on.

Original entry on oeis.org

1, 3, 15, 119, 1799, 59367, 3743271, 481693095, 123123509927, 62989418816679, 64491023022979239, 132015402419352060071, 540829047855347718631591, 4430403202865824763042320551, 72583450474242118015031400337575, 2378466805556971511916001231449723047
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2002

Keywords

Comments

a(n) = each row of A053632 reduced mod 2 and interpreted as a binary number.

Crossrefs

Same sequence shown in binary: A068053.

Programs

  • Maple
    with(gfun,seriestolist); [seq(foo(map(`mod`,seriestolist(series(mul(1+(z^i),i=1..n),z,binomial(n+1,2)+1)),2)), n=0..20)];
    foo := proc(a) local i; add(a[i]*2^(i-1),i=1..nops(a)); end;
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1,
          (t-> Bits[Xor](2^n*t, t))(a(n-1)))
        end:
    seq(a(n), n=0..16);  # Alois P. Heinz, Mar 07 2024
  • Mathematica
    FoldList[BitXor[#, #*#2]&, 1, 2^Range[20]] (* Paolo Xausa, Mar 07 2024 *)
  • PARI
    a(n) = if(n<1, 1, bitxor(a(n - 1), 2^n*a(n - 1))); \\ Indranil Ghosh, Apr 15 2017, after formula by Antti Karttunen

Formula

a(0) = 1; for n > 0, a(n) = a(n-1) XOR (2^n)*a(n-1), where XOR is bitwise-XOR (A003987).
a(n) = A248663(A285101(n)) = A048675(A285102(n)).
A000120(a(n)) = A285103(n). [Number of ones in binary representation.]
A080791(a(n)) = A285105(n). [Number of nonleading zeros.]

Extensions

Formulas added by Antti Karttunen, Apr 15 2017

A285102 a(n) = A007913(A285101(n)).

Original entry on oeis.org

2, 6, 210, 72930, 620310, 278995269860970, 12849025509071310, 492608110538467706074890, 1342951001046021018427857601026746070, 37793589449865555275592120894959094883390892772270, 728982633030274864467458719371654181886452163442582606072870, 28339554655955912942523491885490197708224606885407444005070
Offset: 0

Views

Author

Antti Karttunen, Apr 15 2017

Keywords

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A242378(k,n) = { while(k>0,n = A003961(n); k = k-1); n; };
    A285102(n) = { if(0==n,2,lcm(A285102(n-1),A242378(n,A285102(n-1)))/gcd(A285102(n-1),A242378(n,A285102(n-1)))); };
    
  • Python
    # uses [A003961, A242378]
    from sympy import factorint, prime, primepi
    from sympy.ntheory.factor_ import core
    from operator import mul
    def a003961(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**f[i] for i in f])
    def a242378(k, n):
        while k>0:
            n=a003961(n)
            k-=1
        return n
    l=[2]
    for n in range(1, 12):
        x=l[n - 1]
        l.append(x*a242378(n, x))
    print([core(j) for j in l]) # Indranil Ghosh, Jun 27 2017
  • Scheme
    (definec (A285102 n) (if (zero? n) 2 (/ (lcm (A285102 (- n 1)) (A242378bi n (A285102 (- n 1)))) (gcd (A285102 (- n 1)) (A242378bi n (A285102 (- n 1)))))))
    

Formula

a(0) = 2, for n > 0, a(n) = lcm(a(n-1),A242378(n,a(n-1))) / gcd(a(n-1),A242378(n,a(n-1))).
a(n) = A007913(A285101(n)).
Other identities. For all n >= 0:
A001221(a(n)) = A001222(a(n)) = A285103(n).
A048675(a(n)) = A068052(n).

A285105 Number of even terms on row n of A053632.

Original entry on oeis.org

0, 0, 0, 1, 5, 4, 10, 13, 15, 18, 24, 37, 43, 40, 58, 59, 75, 86, 84, 87, 95, 124, 126, 149, 169, 158, 192, 211, 207, 232, 226, 265, 287, 278, 296, 307, 335, 356, 390, 429, 409, 422, 504, 481, 531, 520, 586, 563, 595, 646, 668, 681, 703, 696, 770, 759, 869, 838, 880, 915, 915, 968, 1006, 983, 1073, 1102, 1116, 1125, 1235, 1204, 1282, 1369, 1349
Offset: 0

Views

Author

Antti Karttunen, Apr 15 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A080791(A068052(n)).
A000124(n) = A285103(n) + a(n).
Showing 1-5 of 5 results.