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

A060632 a(n) = 2^wt(floor(n/2)) (i.e., 2^A000120(floor(n/2)), or A001316(floor(n/2))).

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 8, 8, 2, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 16, 2, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 16, 4, 4, 8, 8, 8, 8, 16, 16, 8, 8, 16, 16, 16, 16, 32, 32, 2, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 16, 4, 4, 8, 8, 8, 8, 16, 16, 8, 8, 16, 16, 16, 16, 32
Offset: 0

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Apr 15 2001

Keywords

Comments

Number of conjugacy classes in the symmetric group S_n that have odd number of elements.
Also sequence A001316 doubled.
Number of even numbers whose binary expansion is a child of the binary expansion of n. - Nadia Heninger and N. J. A. Sloane, Jun 06 2008
First differences of A151566. Sequence gives number of toothpicks added at the n-th generation of the leftist toothpick sequence A151566. - N. J. A. Sloane, Oct 20 2010
The Fi1 and Fi1 triangle sums, see A180662 for their definitions, of Sierpiński's triangle A047999 equal this sequence. - Johannes W. Meijer, Jun 05 2011
Also number of odd entries in n-th row of triangle of Stirling numbers of the first kind. - Istvan Mezo, Jul 21 2017

Examples

			a(3) = 2 because in S_3 there are two conjugacy classes with odd number of elements, the trivial conjugacy class and the conjugacy class of transpositions consisting of 3 elements: (12),(13),(23).
From _Omar E. Pol_, Oct 12 2011 (Start):
Written as a triangle:
1,
1,
2,2,
2,2,4,4,
2,2,4,4,4,4,8,8,
2,2,4,4,4,4,8,8,4,4,8,8,8,8,16,16,
2,2,4,4,4,4,8,8,4,4,8,8,8,8,16,16,4,4,8,8,8,8,16,16,8,...
(End)
		

References

  • I. G. MacDonald: Symmetric functions and Hall polynomials Oxford: Clarendon Press, 1979. Page 21.

Crossrefs

Programs

  • Magma
    a000120:=func< n | &+Intseq(n, 2) >; [ 2^a000120(Floor(n/2)): n in [0..100] ]; // Klaus Brockhaus, Oct 15 2010
    
  • Maple
    A060632 := proc(n) local k; add(binomial(n,2*k) mod 2, k=0..floor(n/2)); end: seq(A060632(n),n=0..94); # edited by Johannes W. Meijer, May 28 2011
    A060632 := n -> 2^add(i, i = convert(iquo(n,2), base, 2)); # Peter Luschny, Jun 30 2011
    A060632 := n -> igcd(2^n, n! / iquo(n,2)!^2);  # Peter Luschny, Jun 30 2011
  • Mathematica
    a[n_] := 2^DigitCount[Floor[n/2], 2, 1]; Table[a[n], {n, 0, 94}] (* Jean-François Alcover, Feb 25 2014 *)
  • PARI
    for (n=0, 1000, write("b060632.txt", n, " ", sum(k=0, floor(n/2), binomial(n, 2*k) % 2)) ) \\ Harry J. Smith, Sep 14 2009
    
  • PARI
    a(n)=2^hammingweight(n\2) \\ Charles R Greathouse IV, Feb 06 2017
    
  • Python
    def A060632(n):
        return 2**bin(n/2)[2:].count("1") # Indranil Ghosh, Feb 06 2017

Formula

a(n) = sum{k=0..floor(n/2), C(n, 2k) mod 2} - Paul Barry, Jan 03 2005, Edited by Harry J. Smith, Sep 15 2009
a(n) = gcd(A056040(n), 2^n). - Peter Luschny, Jun 30 2011
G.f.: (1 + x) * Product_{k>=0} (1 + 2*x^(2^(k+1))). - Ilya Gutkovskiy, Jul 19 2019

Extensions

More terms from James Sellers, Apr 16 2001
Edited by N. J. A. Sloane, Jun 06 2008; Oct 11 2010
a(0) = 1 added by N. J. A. Sloane, Sep 14 2009
Formula corrected by Harry J. Smith, Sep 15 2009

A295989 Irregular triangle T(n, k), read by rows, n >= 0 and 0 <= k < A001316(n): T(n, k) is the (k+1)-th nonnegative number m such that n AND m = m (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 1, 2, 3, 0, 4, 0, 1, 4, 5, 0, 2, 4, 6, 0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 0, 1, 8, 9, 0, 2, 8, 10, 0, 1, 2, 3, 8, 9, 10, 11, 0, 4, 8, 12, 0, 1, 4, 5, 8, 9, 12, 13, 0, 2, 4, 6, 8, 10, 12, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0
Offset: 0

Views

Author

Rémy Sigrist, Dec 02 2017

Keywords

Comments

The (n+1)-th row has A001316(n) terms and sums to n * A001316(n) / 2.
For any n >= 0 and k such that 0 <= k < A001316(n):
- if A000120(n) > 0 then T(n, 1) = A006519(n),
- if A000120(n) > 1 then T(n, 2) = 2^A285099(n),
- if A000120(n) > 0 then T(n, A001316(n)/2 - 1) = A053645(n),
- if A000120(n) > 0 then T(n, A001316(n)/2) = 2^A000523(n),
- if A000120(n) > 0 then T(n, A001316(n) - 2) = A129760(n),
- T(n, A001316(n) - 1) = n,
- the six previous relations correspond respectively (when applicable) to the second term, the third term, the pair of central terms, the penultimate term and the last term of a row,
- T(n, k) AND T(n, A001316(n) - k - 1) = 0,
- T(n, k) + T(n, A001316(n) - k - 1) = n,
- T(n, k) = k for any k < A006519(n+1),
- A000120(T(n, k)) = A000120(k).
If we plot (n, T(n,k)) then we obtain a skewed Sierpinski triangle (see Links section).
If interpreted as a flat sequence a(n) for n >= 0:
- a(n) = 0 iff n = A006046(k) for some k >= 0,
- a(n) = 1 iff n = A006046(2*k + 1) + 1 for some k >= 0,
- a(A006046(k) - 1) = k - 1 for any k > 0.

Examples

			Triangle begins:
  0:   [0]
  1:   [0, 1]
  2:   [0, 2]
  3:   [0, 1, 2, 3]
  4:   [0, 4]
  5:   [0, 1, 4, 5]
  6:   [0, 2, 4, 6]
  7:   [0, 1, 2, 3, 4, 5, 6, 7]
  8:   [0, 8]
  9:   [0, 1, 8, 9]
  10:  [0, 2, 8, 10]
  11:  [0, 1, 2, 3, 8, 9, 10, 11]
  12:  [0, 4, 8, 12]
  13:  [0, 1, 4, 5, 8, 9, 12, 13]
  14:  [0, 2, 4, 6, 8, 10, 12, 14]
  15:  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
		

Crossrefs

First column of array in A352909.

Programs

  • Mathematica
    A295989row[n_] := Select[Range[0, n], BitAnd[#, n-#] == 0 &];
    Array[A295989row, 25, 0] (* Paolo Xausa, Feb 24 2024 *)
  • PARI
    T(n,k) = if (k==0, 0, n%2==0, 2*T(n\2,k), k%2==0, 2*T(n\2, k\2), 2*T(n\2, k\2)+1)

Formula

For any n >= 0 and k such that 0 <= k < A001316(n):
- T(n, 0) = 0,
- T(2*n, k) = 2*T(n, k),
- T(2*n+1, 2*k) = 2*T(n, k),
- T(2*n+1, 2*k+1) = 2*T(n, k) + 1.

A105321 Convolution of binomial(1,n) and Gould's sequence A001316.

Original entry on oeis.org

1, 3, 4, 6, 6, 6, 8, 12, 10, 6, 8, 12, 12, 12, 16, 24, 18, 6, 8, 12, 12, 12, 16, 24, 20, 12, 16, 24, 24, 24, 32, 48, 34, 6, 8, 12, 12, 12, 16, 24, 20, 12, 16, 24, 24, 24, 32, 48, 36, 12, 16, 24, 24, 24, 32, 48, 40, 24, 32, 48, 48, 48, 64, 96, 66, 6, 8, 12, 12, 12, 16, 24, 20, 12, 16
Offset: 0

Views

Author

Paul Barry, Apr 01 2005

Keywords

Comments

A universal function related to the spherical growth of repeated truncations of maps.
a(n) = (number of ones in row n of triangle A249133) = (number of odd terms in row n of triangle A249095) = A000120(A249184(n)). - Reinhard Zumkeller, Nov 14 2014

Examples

			From _Omar E. Pol_, May 29 2010: (Start)
If written as a triangle:
  1;
  3;
  4;
  6,6;
  6,8,12,10;
  6,8,12,12,12,16,24,18;
  6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,34;
  6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,36,12,16,24,24,24,32,48,40,24,32,48,48,48,64,96,66; (End)
		

Crossrefs

Programs

  • Haskell
    a105321 n = if n == 0 then 1 else a001316 n + a001316 (n - 1)
    -- Reinhard Zumkeller, Nov 14 2014
    
  • Maple
    nmax := 74: A001316 := n -> if n <= -1 then 0 else 2^add(i, i=convert(n, base, 2)) fi: for p from 0 to ceil(log[2](nmax)) do for n from 1 to nmax/(p+2)+1 do a((2*n-1)*2^p) := (2^p+2)  * A001316(n-1) od: od: a(0) :=1: seq(a(n), n=0..nmax); # Johannes W. Meijer, Jan 28 2013
  • Mathematica
    f[n_] := Sum[Binomial[1, n - k]Mod[Binomial[k, j], 2], {k, 0, n}, {j, 0, k}]; Array[f, 75, 0] (* Robert G. Wilson v, Jun 28 2010 *)
  • PARI
    a(n) = sum(k=0, n, binomial(1, n-k)*sum(j=0, k, binomial(k, j) % 2)); \\ Michel Marcus, Apr 29 2018
    
  • Python
    def A105321(n): return (1<Chai Wah Wu, Jul 30 2025
    
  • Python
    # (fast way for big vectors)
    import numpy # (version >= 2.0.0)
    n_up_to = 2**22
    A000079 = 1 << numpy.arange(n_up_to.bit_length())
    A001316 = A000079[(numpy.bitwise_count(numpy.arange(n_up_to)))]
    A105321 = A001316
    A105321[1:] += A001316[0:-1]
    print(A105321[0:100]) # Karl-Heinz Hofmann, Aug 01 2025

Formula

G.f. (1+x)*Product{k>=0, 1+2x^(2^k)};
a(n) = Sum_{k=0..n, binomial(1, n-k)*Sum_{j=0..k, binomial(k, j) mod 2}}.
a(n) = 2*A048460(n) for n>=2. - Omar E. Pol, Jan 02 2011
a((2*n-1)*2^p) = (2^p+2)*A001316(n-1), p >= 0 and n >= 1, with a(0) = 1. - Johannes W. Meijer, Jan 28 2013
a(n) = A001316(n) + A001316(n-1) for n > 0. - Reinhard Zumkeller, Nov 14 2014

A064405 Number of even entries (A048967) minus the number of odd entries (A001316) in row n of Pascal's triangle (A007318).

Original entry on oeis.org

-1, -2, -1, -4, 1, -2, -1, -8, 5, 2, 3, -4, 5, -2, -1, -16, 13, 10, 11, 4, 13, 6, 7, -8, 17, 10, 11, -4, 13, -2, -1, -32, 29, 26, 27, 20, 29, 22, 23, 8, 33, 26, 27, 12, 29, 14, 15, -16, 41, 34, 35, 20, 37, 22, 23, -8, 41, 26, 27, -4, 29, -2, -1, -64, 61, 58, 59, 52, 61, 54, 55, 40, 65, 58, 59, 44, 61, 46, 47, 16, 73, 66, 67, 52, 69, 54
Offset: 0

Views

Author

Robert G. Wilson v, Sep 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[ n + 1 - 2Sum[ Mod[ Binomial[ n, k ], 2 ], {k, 0, n} ], {n, 0, 100} ]
  • PARI
    a(n)=sum(i=0,n,(-1)^binomial(n,i))
    
  • PARI
    a(n)=if(n<1,-1,if(n%2==0,a(n/2)+n/2,2*a((n-1)/2)))

Formula

a(n) = Sum_{k=0..n} (-1)^binomial(n, k); a(2^n) = 2^n-3; a(2^n+1)=2^n-6; more generally there's a sequence z(k) such that for any k>=0 and for 2^n >k, a(2^n+k) = 2^n+z(k); for k=0, 1, 2, 3, 4, 5, 6, 7, 8... z(k) = -3, -6, -5, -12, -3, -10, -9, -24, 1, ... - Benoit Cloitre, Oct 18 2002
a(2n) = a(n) + n, a(2n+1) = 2a(n). - Ralf Stephan, Mar 05 2004
a(n) = -Sum_{k=0..n} moebius(binomial(n, k) mod 2). - Paul Barry, Apr 29 2005
a(2^n-1) = -2^n. - Seiichi Manyama, Aug 24 2022

A286575 Run-length transform of A001316.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 2, 4, 2, 4, 4, 4, 2, 4, 4, 2, 2, 4, 4, 4, 4, 8, 4, 8, 2, 4, 4, 4, 4, 8, 2, 4, 2, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 4, 8, 8, 4, 2, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 2, 4, 4, 4, 2, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 8, 16, 4, 8, 8, 8, 8, 16, 4, 8, 2, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 4
Offset: 0

Views

Author

Antti Karttunen, May 28 2017

Keywords

Examples

			For n = 0, there are no 1-runs, and thus a(0) = 1 as an empty product.
For n = 29, "11101" in binary, there are two 1-runs, of lengths 1 and 3, thus a(29) = A001316(1) * A001316(3) = 2*4 = 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Map[Sum[Mod[#, 2] &@ Binomial[#, k], {k, 0, #}] &@ Length@ # &, DeleteCases[Split@ IntegerDigits[n, 2], ?(First@ # == 0 &)]], {n, 0, 108}] (* _Michael De Vlieger, May 29 2017 *)
  • Python
    from sympy import factorint, prime, log
    import math
    def wt(n): return bin(n).count("1")
    def a037445(n):
        f=factorint(n)
        return 2**sum([wt(f[i]) for i in f])
    def A(n): return n - 2**int(math.floor(log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a(n): return a037445(b(n)) # Indranil Ghosh, May 30 2017
    
  • Python
    # use RLT function from A278159
    def A286575(n): return RLT(n,lambda m: 2**(bin(m).count('1'))) # Chai Wah Wu, Feb 04 2022
  • Scheme
    (define (A286575 n) (fold-left (lambda (a r) (* a (A001316 r))) 1 (bisect (reverse (binexp->runcount1list n)) (- 1 (modulo n 2)))))
    (define (bisect lista parity) (let loop ((lista lista) (i 0) (z (list))) (cond ((null? lista) (reverse! z)) ((eq? i parity) (loop (cdr lista) (modulo (1+ i) 2) (cons (car lista) z))) (else (loop (cdr lista) (modulo (1+ i) 2) z)))))
    (define (binexp->runcount1list n) (if (zero? n) (list) (let loop ((n n) (rc (list)) (count 0) (prev-bit (modulo n 2))) (if (zero? n) (cons count rc) (if (eq? (modulo n 2) prev-bit) (loop (floor->exact (/ n 2)) rc (1+ count) (modulo n 2)) (loop (floor->exact (/ n 2)) (cons count rc) 1 (modulo n 2)))))))
    (define (A001316 n) (let loop ((n n) (z 1)) (cond ((zero? n) z) ((even? n) (loop (/ n 2) z)) (else (loop (/ (- n 1) 2) (* z 2))))))
    

Formula

a(n) = A037445(A005940(1+n)).
a(n) = A000079(A286574(n)).

A191488 A companion to Gould’s sequence A001316.

Original entry on oeis.org

4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32, 34, 8, 12, 16, 20, 16, 24, 32, 36, 16, 24, 32, 40, 32, 48, 64, 66, 8, 12, 16, 20, 16, 24, 32, 36, 16, 24, 32, 40, 32, 48, 64, 68, 16, 24, 32, 40, 32, 48, 64, 72, 32, 48, 64, 80, 64, 96, 128
Offset: 0

Views

Author

Johannes W. Meijer, Jun 05 2011

Keywords

Comments

The row sums of the Sierpinski-Stern triangle A191372 are given by sequence A191487.
The differences diff1(n) = A191487(2*n+3) - A191487(2*n+1) lead to a peculiar number triangle, see the examples. The leading terms of the rows of the diff1(n) triangle clearly stand out from the rest of the terms and are given by A001550(p+1), p>=1; for p=0 this term is 7.
If we ignore the first term of the diff1(n) rows and reverse the order of the remaining terms we get sequence A191488, see the examples; more terms require a higher row number.
Both the diff1(n) and the diff2(n) sequences are related to Gould’s sequence A001316. We ignore the first term and reverse the order of the rest of the terms. The diff2(n) sequence leads directly to A001316, see A191487, while the diff1(n) sequence leads to A001316 in a slightly more complex way. We observe that for Gould’s sequence equation A001316((2*n+1)*2^p-1) = C(p)*A001316(n) with C(p) = 2^p holds, while for its companion A191488 equation A191488((2*n+1)*2^p-1) = C(p)*A001316(n) with C(p) = 2^(p+1)+2 holds; see the Maple program. Furthermore for both sequences a(2^p - 1) = C(p).

Examples

			The first few rows of diff1(n) as a triangle, row lengths A000079(p) with p>=0, are:
[7]
[14, 4]
[36, 8, 6, 4]
[98, 16, 12, 8, 10, 8, 6, 4]
[276, 32, 24, 16, 20, 16, 12, 8, 18, 16, 12, 8, 10, 8, 6, 4]
[794, 64, 48, 32, 40, 32, 24, 16, 36, 32, 24, 16, 20, 16, 12, 8, 34, 32, 24, 16, 20, 16, 12, 8, 18, 16, 12, 8, 10, 8, 6, 4]
The first few rows of diff1(n) reversed minus the first term are:
[4]
[4, 6, 8]
[4, 6, 8, 10, 8, 12, 16]
[4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32]
[4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32, 34, 8, 12, 16, 20, 16, 24, 32, 36, 16, 24, 32, 40, 32, 48, 64]
		

Crossrefs

Programs

  • Maple
    nmax:=2^6; pmax:=ceil(log(nmax)/log(2)); A001316 := n -> if n<=-1 then 0 else 2^add(i, i=convert(n, base, 2)) fi: C := proc(p): C(p) := 2^(p+1)+2 end: for p from 0 to pmax do for n from 0 to nmax do a((2*n+1)*2^p-1):= C(p)*A001316(n) od: od: seq(a(n), n=0..nmax-2);

Formula

a((2*n+1)*2^p - 1) = C(p) * A001316(n) with C(p) = (2^(p+1)+2), p>=0.
a(2^p - 1) = 2^(p+1)+2 = A052548(p+1), p>=0.

A368229 Irregular table of nonnegative integers T(n, k), n >= 0, k = 1..A001316(n), read by rows: the 1's in the binary expansion of n exactly match the nonzero digits in the ternary expansions of the terms in the n-th row.

Original entry on oeis.org

0, 1, 2, 3, 6, 4, 5, 7, 8, 9, 18, 10, 11, 19, 20, 12, 15, 21, 24, 13, 14, 16, 17, 22, 23, 25, 26, 27, 54, 28, 29, 55, 56, 30, 33, 57, 60, 31, 32, 34, 35, 58, 59, 61, 62, 36, 45, 63, 72, 37, 38, 46, 47, 64, 65, 73, 74, 39, 42, 48, 51, 66, 69, 75, 78
Offset: 0

Views

Author

Rémy Sigrist, Dec 18 2023

Keywords

Comments

As a flat sequence, this is a permutation of the nonnegative integers (with inverse A368230).

Examples

			Table T(n, k) begins:
    0;
    1, 2;
    3, 6;
    4, 5, 7, 8;
    9, 18;
    10, 11, 19, 20;
    12, 15, 21, 24;
    13, 14, 16, 17, 22, 23, 25, 26;
    27, 54;
    28, 29, 55, 56;
    30, 33, 57, 60;
    31, 32, 34, 35, 58, 59, 61, 62;
    36, 45, 63, 72;
    37, 38, 46, 47, 64, 65, 73, 74;
    39, 42, 48, 51, 66, 69, 75, 78;
    40, 41, 43, 44, 49, 50, 52, 53, 67, 68, 70, 71, 76, 77, 79, 80;
    81, 162;
    ...
		

Crossrefs

See A368225 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], b = binary(n)); for (k = 1, #b, r = [3*v+b[k]|v<-r]; if (b[k], r = concat(r, [v+1|v<-r]););); Set(r); }

Formula

T(n, 1) = A005836(n + 1).
T(n, A001316(n)) = A005823(n + 1).
A289831(T(n, k)) = n.

A268128 a(n) = (A000123(n) - A001316)/2.

Original entry on oeis.org

0, 0, 1, 1, 4, 5, 8, 9, 17, 21, 28, 33, 45, 53, 66, 75, 100, 117, 140, 161, 193, 221, 258, 291, 344, 389, 446, 499, 573, 639, 722, 797, 913, 1013, 1132, 1249, 1393, 1533, 1698, 1859, 2060, 2253, 2478, 2699, 2965, 3223, 3522, 3813, 4173, 4517, 4910, 5299, 5753
Offset: 0

Views

Author

Tom Edgar, Jan 26 2016

Keywords

Crossrefs

Programs

  • Mathematica
    b[0] = 1; b[n_] := b[n] = b[Floor[n/2]] + b[n - 1];
    c[n_] := Sum[Mod[Binomial[n, k], 2], {k, 0, n}];
    a[n_] := (b[n] - c[n])/2;
    Table[a[n], {n, 0, 52}] (* Jean-François Alcover, Dec 12 2018 *)
  • Sage
    def b(n):
        A=[1]
        for i in [1..n]:
            A.append(A[i-1] + A[floor(i/2)])
        return A[n]
    [(b(n)-prod(x+1 for x in n.digits(2)))/2 for n in [0..60]]

Formula

Let b(0) = 1 and b(n) = b(n-1) + b(floor(n/2)) and let c(n) = Product_{i=0..k}(n_i+1) where n = Sum_{i=0..k}n_i*2^i is the binary representation of n. Then a(n) = (1/2)*(b(n) - c(n)).

A085814 Even entries (A048967) minus the odd entries (A001316) in row n of Pascal's triangle (A007318).

Original entry on oeis.org

-1, -2, 0, -8, 12, 8, 0, -128, 252, 472, 840, 1120, 2112, 128, 0, -32768, 65532, 131000, 261528, 519648, 1029192, 1991728, 3865664, 6825984, 13835328, 21056128, 39611520, 20680192, 134234112, 32768, 0, -2147483648, 4294967292, 8589934456, 17179866936, 34359709664, 68719241112, 137436945552
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jul 25 2003

Keywords

Crossrefs

Cf. A064405.

Formula

a(n) = sum((-1)^binomial(n, i)*binomial(n, i), i=0..n)
For n>1, a(2^n-2)=0. - Benoit Cloitre, Jun 13 2004

A128806 a(n) = A001316(n) + A046092(n).

Original entry on oeis.org

1, 6, 14, 28, 42, 64, 88, 120, 146, 184, 224, 272, 316, 372, 428, 496, 546, 616, 688, 768, 844, 932, 1020, 1120, 1204, 1308, 1412, 1528, 1632, 1756, 1876, 2016, 2114, 2248, 2384, 2528, 2668, 2820, 2972, 3136, 3284, 3452, 3620, 3800, 3968, 4156, 4340
Offset: 0

Views

Author

Philippe Deléham, Apr 08 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Mod[Binomial[n,k],2],{k,0,n}]+2n(n+1),{n,0,46}] (* James C. McMahon, Jan 11 2025 *)
    A128806[n_] := 2^DigitSum[n, 2] + 2*n*(n+1); Array[A128806, 100, 0] (* Paolo Xausa, Jul 31 2025 *)
  • Python
    def A128806(n): return (1<Chai Wah Wu, Jul 29 2025

Extensions

a(32)-a(34) corrected by Georg Fischer, Jul 01 2020
Showing 1-10 of 226 results. Next