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

A194458 Total number of entries in rows 0,1,...,n of Pascal's triangle not divisible by 5.

Original entry on oeis.org

1, 3, 6, 10, 15, 17, 21, 27, 35, 45, 48, 54, 63, 75, 90, 94, 102, 114, 130, 150, 155, 165, 180, 200, 225, 227, 231, 237, 245, 255, 259, 267, 279, 295, 315, 321, 333, 351, 375, 405, 413, 429, 453, 485, 525, 535, 555, 585, 625, 675, 678, 684, 693, 705, 720, 726
Offset: 0

Views

Author

Paul Weisenhorn, Aug 24 2011

Keywords

Comments

The number of zeros in the first n rows is binomial(n+1,2) - a(n).

Examples

			n = 38: n+1 = 39 = 124_5, thus a(38) = (C(5,2)*15^0*3 + C(3,2)*15^1)*2 + C(2,2)*15^2 = (10*1*3 + 3*15)*2 + 1*225 = 375.
		

Crossrefs

A006046(n+1) = A006046(n) + A001316(n) for p=2.
A006048(n+1) = A006048(n) + A006047(n+1) for p=3.
a(n+1) = a(n) + A194459(n+1) for p=5.

Programs

  • Maple
    a:= proc(n) local l, m, h, j;
          m:= n+1;
          l:= [];
          while m>0 do l:= [l[], irem (m, 5, 'm')+1] od;
          h:= 0;
          for j to nops(l) do h:= h*l[j] +binomial (l[j], 2) *15^(j-1) od:
          h
        end:
    seq(a(n), n=0..100);
  • Mathematica
    a[n_] := Module[{l, m, r, h, j}, m = n+1; l = {}; While[m>0, l = Append[l, {m, r} = QuotientRemainder[m, 5]; r+1]]; h = 0; For[j = 1, j <= Length[l], j++, h = h*l[[j]] + Binomial [l[[j]], 2] *15^(j-1)]; h]; Table [a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 26 2017, translated from Maple *)
  • Python
    from math import prod
    from gmpy2 import digits
    def A194458(n): return sum(prod(int(d)+1 for d in digits(m,5)) for m in range(n+1)) # Chai Wah Wu, Aug 10 2025
    
  • Python
    from math import prod
    from gmpy2 import digits
    def A194458(n):
        d = list(map(lambda x:int(x)+1,digits(n+1,5)[::-1]))
        return sum((b-1)*prod(d[a:])*15**a for a, b in enumerate(d))>>1 # Chai Wah Wu, Aug 13 2025

Formula

a(n) = ((C(d0+1,2)*15^0*(d1+1) + C(d1+1,2)*15^1)*(d1+1) + C(d1+1,2)*15^1)*(d2+1) + C(d2+1,2)*15^2 ..., where d_k...d_1d_0 is the base 5 expansion of n+1 and 15 = binomial(5+1,2). The formula generalizes to other prime bases p.

Extensions

Edited by Alois P. Heinz, Sep 06 2011

A123098 Multiplicative encoding of triangle formed by reading Pascal's triangle mod 2 (A047999).

Original entry on oeis.org

2, 6, 10, 210, 22, 858, 1870, 9699690, 46, 4002, 7130, 160660290, 20746, 1008940218, 2569288370, 32589158477190044730, 118, 21594, 39530, 3595293030, 94754, 17808161514, 44788794490, 7074421030108255253430, 263258, 141108130806, 281595235990, 296987147493893719182390, 944729501606
Offset: 0

Views

Author

Jonathan Vos Post, Nov 05 2006

Keywords

Comments

This is to A047999 "Triangle formed by reading Pascal's triangle mod 2" as A007188 "Multiplicative encoding of Pascal triangle: Product p(i+1)^C(n,i)" is to A007318 "Pascal's triangle read by rows." a(2^n - 1) = primorial(2^n) = A002110(A000079(n)). In row(n) the primes with exponent 1 form row(n) of a Sierpinski sieve, so this sequence is a kind of Gödelization of a Sierpinski sieve.
All terms are divisible by 2 and the n-th term, a(n-1), is also divisible by prime(n). This sequence appears as first column of the square array A255483; its second column A276804 is very similar, with all prime factors shifted to the net larger prime (cf. A003961). - M. F. Hasler, Sep 17 2016
a(n) is the n-th power of 6 in the ring defined in A329329. - Peter Munn, Jan 04 2020

Examples

			a(0) = 2^T(0,0) = 2^1 = 2.
a(1) = 2^T(1,0) * 3^T(1,1) = 2^1 * 3^1 = 6.
a(2) = 2^T(2,0) * 3^T(2,1) * 5^T(2,2) = 2^1 * 3^0 * 5^1 = 10.
a(3) = 2^T(3,0) * 3^T(3,1) * 5^T(3,2) * 7^T(3,3) = 2^1 * 3^1 * 5^1 * 7^1 = 210.
a(4) = 2^1 * 3^0 * 5^0 * 7^0 * 11^1 = 22.
a(5) = 2^1 * 3^1 * 5^0 * 7^0 * 11^1 * 13^1 = 858.
a(6) = 2^1 * 3^0 * 5^1 * 7^0 * 11^1 * 13^0 * 17^1 = 1870.
a(7) = 2^1 * 3^1 * 5^1 * 7^1 * 11^1 * 13^1 * 17^1 * 19^1 = 9699690.
a(8) = 2^1 * 3^0 * 5^0 * 7^0 * 11^0 * 13^0 * 17^0 * 19^0 * 23^1 = 46.
a(9) = 2^1 * 3^1 * 5^0 * 7^0 * 11^0 * 13^0 * 17^0 * 19^0 * 23^1 * 29^1 = 4002.
a(10) = 2^1 * 3^0 * 5^1 * 7^0 * 11^0 * 13^0 * 17^0 * 19^0 * 23^1 * 29^0 * 31^1 = 7130.
a(11) = 2^1 * 3^1 * 5^1 * 7^1 * 11^0 * 13^0 * 17^0 * 19^0 * 23^1 * 29^1 * 31^1 * 37^1 = 160660290.
a(12) = 2^1 * 3^0 * 5^0 * 7^0 * 11^1 * 13^0 * 17^0 * 19^0 * 23^1 * 29^0 * 31^0 * 37^0 * 41^1 = 20746.
From _N. J. A. Sloane_, Feb 28 2015: (Start)
Factorizations of initial terms, from Cobeli-Zaharescu paper:
                     2 = 2
                     6 = 2*3
                    10 = 2*5
                   210 = 2*3*5*7
                    22 = 2*11
                   858 = 2*3*11*13
                  1870 = 2*5*11*17
               9699690 = 2*3*5*7*11*13*17*19
                    46 = 2*23
                  4002 = 2*3*23*29
                  7130 = 2*5*23*31
             160660290 = 2*3*5*7*23*29*31*37
                 20746 = 2*11*23*41
            1008940218 = 2*3*11*13*23*29*41*43
            2569288370 = 2*5*11*17*23*31*41*47
  32589158477190044730 = 2*3*5*7*11*13*17*19*23*29*31*37*41*43*47*53
  ... (End)
From _Jon E. Schoenfield_, Jun 09 2019: (Start)
   n | Factorization of a(n)
  ---+-----------------------------------------------
   0 | 2
   1 | 2* 3
   2 | 2   * 5
   3 | 2* 3* 5* 7
   4 | 2         *11
   5 | 2* 3      *11*13
   6 | 2   * 5   *11   *17
   7 | 2* 3* 5* 7*11*13*17*19
   8 | 2                     *23
   9 | 2* 3                  *23*29
  10 | 2   * 5               *23   *31
  11 | 2* 3* 5* 7            *23*29*31*37
  12 | 2         *11         *23         *41
  13 | 2* 3      *11*13      *23*29      *41*43
  14 | 2   * 5   *11   *17   *23   *31   *41   *47
  15 | 2* 3* 5* 7*11*13*17*19*23*29*31*37*41*43*47*53
  ... (End)
		

Crossrefs

Programs

  • Maple
    f:=n->mul(ithprime(k+1)^(binomial(n,k) mod 2),k=0..n);
    [seq(f(n),n=0..40)];
  • Mathematica
    a[n_] := Product[Prime[k+1]^Mod[Binomial[n, k], 2], {k, 0, n}];
    Table[a[n], {n, 0, 28}] (* Jean-François Alcover, Oct 01 2018, from Maple *)
  • PARI
    a(n) = prod (k=0, n, if (binomial(n,k)%2, prime(k+1), 1)) \\ Rémy Sigrist, Jun 09 2019
  • Python
    from operator import mul
    from functools import reduce
    from sympy import prime
    def A123098(n):
        return reduce(mul,(1 if ~(n-1) & k else prime(k+1) for k in range(n))) # Chai Wah Wu, Feb 08 2016
    
  • Scheme
    (define (A123098 n) (A019565 (A001317 n))) ;; Antti Karttunen, Sep 18 2016
    

Formula

a(n) = Product_{i=0..n} p(i+1)^(C(n,i) mod 2).
a(n) = Product_{i=0..n} p(i+1)^T(n,i), where T(n,i) are as in A047999 and where Sum_{k>=0} T(n, k) = A001316(n) = 2^A000120(n).
From Antti Karttunen, Sep 18 2016: (Start)
a(n) = A007913(A007188(n)). [From the first comment.]
a(n) = A019565(A001317(n)).
(End)
a(0) = 2, and for n > 0, a(n) = A329329(a(n-1), 6). - Peter Munn, Jan 04 2020

Extensions

Further terms from N. J. A. Sloane, Feb 28 2015
Changed offset from 1 to 0, corresponding changes to formulas and examples from Antti Karttunen, Sep 18 2016

A127872 Triangle formed by reading A039599 mod 2.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Apr 05 2007

Keywords

Comments

Also triangle formed by reading triangles A061554, A106180, A110519, A124574, A124576, A126953, A127543 modulo 2.

Examples

			Triangle begins:
1;
1, 1;
0, 1, 1;
1, 1, 1, 1;
0, 0, 0, 1, 1;
0, 0, 1, 1, 1, 1;
0, 1, 1, 0, 0, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1;
0, 0, 0, 0, 0, 0, 0, 1, 1;
0, 0, 0, 0, 0, 0, 1, 1, 1, 1;
0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1;
0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1;
0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1;
0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1;
0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; ...
		

Crossrefs

Programs

  • Mathematica
    T[0, 0] := 1; T[n_, k_] := Binomial[2*n - 1, n - k] - Binomial[2*n - 1, n - k - 2]; Table[Mod[T[n, k], 2], {n,0,10}, {k,0,n}] // Flatten (* G. C. Greubel, Apr 18 2017 *)

Formula

Sum_{k=0..n} T(n,k)*x^k = A000007(n), A036987(n), A001316(n), A062878(n) for x=-1,0,1,2 respectively.
Sum_{k=0..n} T(n,k)*Fibonacci(2*k+1) = A050614(n), see A000045 and A001519. - Philippe Deléham, Aug 30 2007

A226078 Table read by rows: prime power factors of central binomial coefficients, cf. A000984.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 2, 5, 7, 4, 9, 7, 4, 3, 7, 11, 8, 3, 11, 13, 2, 9, 5, 11, 13, 4, 5, 11, 13, 17, 4, 11, 13, 17, 19, 8, 3, 7, 13, 17, 19, 4, 7, 13, 17, 19, 23, 8, 25, 7, 17, 19, 23, 8, 27, 25, 17, 19, 23, 16, 9, 5, 17, 19, 23, 29, 2, 9, 5, 17, 19, 23, 29, 31
Offset: 0

Views

Author

Reinhard Zumkeller, May 25 2013

Keywords

Examples

			.   n        initial rows               A000984(n)   A226047(n)
.  ---+------------------------------+-------------+------------
.   0   [1]                                      1
.   1   [2]                                      2            2
.   2   [2,3]                                    6            3
.   3   [4,5]                                   20            5
.   4   [2,5,7]                                 70            7
.   5   [4,9,7]                                252            9
.   6   [4,3,7,11]                             924           11
.   7   [8,3,11,13]                           3432           13
.   8   [2,9,5,11,13]                        12870           13
.   9   [4,5,11,13,17]                       48620           17
.  10   [4,11,13,17,19]                     184756           19
.  11   [8,3,7,13,17,19]                    705432           19
.  12   [4,7,13,17,19,23]                  2704156           23
.  13   [8,25,7,17,19,23]                 10400600           25
.  14   [8,27,25,17,19,23]                40116600           27
.  15   [16,9,5,17,19,23,29]             155117520           29
.  16   [2,9,5,17,19,23,29,31]           601080390           31
.  17   [4,27,5,11,19,23,29,31]         2333606220           31
.  18   [4,3,25,7,11,19,23,29,31]       9075135300           31
.  19   [8,3,25,7,11,23,29,31,37]      35345263800           37
.  20   [4,9,5,7,11,13,23,29,31,37]   137846528820           37 .
		

Crossrefs

Cf. A067434 (row lengths), A001316 (left edge), A060308 (right edge), A226047 (row maxima), A226083 (row minima), A000984 (row products).
Cf. A267823.

Programs

  • Haskell
    a226078 n k = a226078_tabf !! n !! k
    a226078_row n = a226078_tabf !! n
    a226078_tabf = map a141809_row a000984_list
    
  • Maple
    f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
    b:= proc(n) local p;
          p:= add(f(n+i) -f(i), i=1..n);
          seq(`if`(coeff(p, x, i)>0,
                 i^coeff(p, x, i), NULL), i=1..degree(p))
        end:
    T:= n-> `if`(n=0, 1, b(n)):
    seq(T(n), n=0..30);  # Alois P. Heinz, May 25 2013
  • Mathematica
    Table[Power @@@ FactorInteger[(2n)!/n!^2] , {n, 0, 30}] // Flatten (* Jean-François Alcover, Jul 29 2015 *)
  • PARI
    row(n)= if(n<1, [1], [ e[1]^e[2] |e<-Col(factor(binomial(2*n, n)))]); \\ Ruud H.G. van Tol, Nov 18 2024

Formula

T(n,k) = A141809(A000984(n),k) for k = 0..A067434(n)-1.

A246034 Number of odd terms in f^n, where f = x^4*y^4 + x^4*y^3 + x^3*y^4 + x^4*y^2 + x^2*y^4 + x^4*y + x^3*y^2 + x^2*y^3 + x*y^4 + x^4 + x^2*y^2 + y^4 + x^3 + x^2*y + x*y^2 + y^3 + x^2 + y^2 + x + y + 1.

Original entry on oeis.org

1, 21, 21, 85, 21, 233, 85, 321, 21, 441, 233, 761, 85, 1137, 321, 1545, 21, 441, 441, 1785, 233, 2925, 761, 3589, 85, 1785, 1137, 3977, 321, 4549, 1545, 5909, 21, 441, 441, 1785, 441, 4893, 1785, 6741, 233, 4893, 2925, 9949, 761, 11301, 3589, 13181, 85, 1785, 1785
Offset: 0

Views

Author

N. J. A. Sloane, Aug 20 2014

Keywords

Comments

This is the number of ON cells in a certain 2-D CA in which the neighborhood of a cell is defined by f, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation.

Examples

			Here is the neighborhood:
[X, X, X, X, X]
[X, 0, X, 0, X]
[X, X, X, X, X]
[X, 0, X, 0, X]
[X, X, X, X, X]
which contains a(1) = 21 ON cells.
		

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246035.

Programs

  • Maple
    C:=f->subs({x=1, y=1}, f);
    # Find number of ON cells in CA for generations 0 thru M defined by rule
    # that cell is ON iff number of ON cells in nbd at time n-1 was odd
    # where nbd is defined by a polynomial or Laurent series f(x, y).
    OddCA:=proc(f, M) global C; local n, a, i, f2, p;
    f2:=simplify(expand(f)) mod 2;
    a:=[]; p:=1;
    for n from 0 to M do a:=[op(a), C(p)]; p:=expand(p*f2) mod 2; od:
    lprint([seq(a[i], i=1..nops(a))]);
    end;
    f:=x^4*y^4+x^4*y^3+x^3*y^4+x^4*y^2+x^2*y^4+x^4*y+x^3*y^2+x^2*y^3+x*y^4+x^4+
       x^2*y^2+y^4+x^3+x^2*y+x*y^2+y^3+x^2+y^2+x+y+1;
    OddCA(f, 100);
  • Mathematica
    f = x^4*y^4 + x^4*y^3 + x^3*y^4 + x^4*y^2 + x^2*y^4 + x^4*y + x^3*y^2 + x^2*y^3 + x*y^4 + x^4 + x^2*y^2 + y^4 + x^3 + x^2*y + x*y^2 + y^3 + x^2 + y^2 + x + y + 1;
    a[0] = 1; a[n_] := Count[List @@ Expand[f^n] /. {x -> 1, y -> 1}, _?OddQ];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 11 2017 *)

A100311 Modulo 2 binomial transform of 8^n.

Original entry on oeis.org

1, 9, 65, 585, 4097, 36873, 266305, 2396745, 16777217, 150994953, 1090519105, 9814671945, 68736258049, 618626322441, 4467856773185, 40210710958665, 281474976710657, 2533274790395913, 18295873486192705, 164662861375734345
Offset: 0

Views

Author

Paul Barry, Dec 06 2004

Keywords

Comments

8^n may be retrieved through 8^n = Sum_{k=0..n} (-1)^A010060(n-k) * (binomial(n,k) mod 2) * A100311(k).

Crossrefs

Programs

  • Magma
    [(&+[(Binomial(n,k) mod 2)*8^k: k in [0..n]]): n in [0..40]]; // G. C. Greubel, Jan 25 2023
    
  • Mathematica
    A100311[n_]:= A100311[n]= Sum[Mod[Binomial[n, k], 2]*8^k, {k, 0, n}];
    Table[A100311[n], {n, 0, 30}] (* G. C. Greubel, Jan 25 2023 *)
  • Python
    a=1
    for i in range(33):
        print(a, end=", ")
        a = (a*8) ^ a
    # Alex Ratushnyak, Apr 22 2012
    
  • Python
    def A100311(n): return sum((bool(~n&n-k)^1)<<3*k for k in range(n+1)) # Chai Wah Wu, May 02 2023
    
  • SageMath
    def A100311(n): return sum( (binomial(n, k)%2)*8^k for k in range(n+1))
    [A100311(n) for n in range(41)] # G. C. Greubel, Jan 25 2023

Formula

a(n) = Sum_{k=0..n} (binomial(n, k) mod 2)*8^k.
Conjecture: a(0)=1, a(n+1) = (a(n)*8) XOR a(n), where XOR is the bitwise exclusive-or operator. - Alex Ratushnyak, Apr 22 2012
From Vladimir Shevelev, Dec 26-27 2013: (Start)
Sum_{n>=0} 1/a(n)^r = Product_{k>=0} (1 + 1/(8^(2^k)+1)^r),
Sum_{n>=0} (-1)^A000120(n)/a(n)^r = Product_{k>=0} (1 - 1/(8^(2^k)+1)^r), where r>0 is a real number.
In particular,
Sum_{n>=0} 1/a(n) = Product_{k>=0} (1 + 1/(8^(2^k)+1)) = 1.1284805...;
Sum_{n>=0} (-1)^A000120(n)/a(n) = 7/8.
a(2^n) = 8^(2^n) + 1, n >= 0.
Note that analogs of Stephan's limit formulas (see Shevelev link) reduce to the relations:
a(2^t*n+2^(t-1)) = 63*(8^(2^(t-1)+1))/(8^(2^(t-1))-1) * a(2^t*n+2^(t-1)-2), t >= 2.
In particular, for t=2,3,4, we have the following formulas:
a(4*n+2) = 65 * a(4*n);
a(8*n+4) = 4097/65 * a(8*n+2);
a(16*n+8) = (16777217/266305) * a(16*n+6), etc. (End)

A117973 a(n) = 2^(wt(n)+1), where wt() = A000120().

Original entry on oeis.org

2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 8, 16, 16, 32, 16, 32, 32, 64, 16, 32, 32, 64, 32, 64, 64, 128, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32
Offset: 0

Views

Author

Eric W. Weisstein, Apr 06 2006

Keywords

Comments

Denominator of Zeta'(-2n).
If Gould's sequence A001316 is written as a triangle, this is what the rows converge to. In other words, let S_0 = [2], and construct S_{n+1} by following S_n with 2*S_n. Then this is S_{oo}. - N. J. A. Sloane, May 30 2009
In A160464 the coefficients of the ES1 matrix are defined. This matrix led to the discovery that the successive differences of the ES1[1-2*m,n] coefficients for m = 1, 2, 3, ..., are equal to the values of Zeta'(-2n), see also A094665 and A160468. - Johannes W. Meijer, May 24 2009

Examples

			-zeta(3)/(4*Pi^2), (3*zeta(5))/(4*Pi^4), (-45*zeta(7))/(8*Pi^6), (315*zeta(9))/(4*Pi^8), (-14175*zeta(11))/(8*Pi^10), ...
		

Crossrefs

Programs

  • Maple
    S := [2]; S := [op(S), op(2*S)]; # repeat ad infinitum! - N. J. A. Sloane, May 30 2009
    a := n -> 2^(add(i,i=convert(n,base,2))+1); # Peter Luschny, May 02 2009
  • Mathematica
    Denominator[(2*n)!/2^(2*n + 1)]

Formula

For n>=0, a(n) = 2 * A001316(n). - N. J. A. Sloane, May 30 2009
For n>0, a(n) = 4 * A048896(n). - Peter Luschny, May 02 2009
a(0) = 2; for n>0, write n = 2^i + j where 0 <= j < 2^i; then a(n) = 2*a(j).
a((2*n+1)*2^p-1) = 2^(p+1) * A001316(n), p >= 0. - Johannes W. Meijer, Jan 28 2013

Extensions

Entry revised by N. J. A. Sloane, May 30 2009

A151787 a(1)=1; for n > 1, a(n)=3*2^{wt(n-1)-1}.

Original entry on oeis.org

1, 3, 3, 6, 3, 6, 6, 12, 3, 6, 6, 12, 6, 12, 12, 24, 3, 6, 6, 12, 6, 12, 12, 24, 6, 12, 12, 24, 12, 24, 24, 48, 3, 6, 6, 12, 6, 12, 12, 24, 6, 12, 12, 24, 12, 24, 24, 48, 6, 12, 12, 24, 12, 24, 24, 48, 12, 24, 24, 48, 24, 48, 48, 96, 3, 6, 6, 12, 6, 12, 12, 24, 6, 12, 12, 24, 12, 24, 24, 48
Offset: 1

Views

Author

N. J. A. Sloane, Jun 25 2009

Keywords

Comments

wt(n) is the Hamming weight = binary weight of n (A000120).

Crossrefs

Programs

  • Maple
    wt:= n -> convert(convert(n,base,2),`+`):
    [1, seq(3*2^(wt(n-1)-1),n=2..100)]; # Robert Israel, Feb 27 2018
  • Mathematica
    a[n_] := If[n == 1, 1, 3*2^(Total[IntegerDigits[n-1, 2]]-1)];
    Array[a, 100] (* Jean-François Alcover, Mar 27 2019 *)
  • PARI
    a(n) = if (n==1, 1, 3*2^(hammingweight(n-1)-1)); \\ Michel Marcus, Feb 27 2018

Formula

From Robert Israel, Feb 27 2018: (Start)
For n > 1, a(2*n)=2*a(n).
a(2*n+1)=a(n+1).
G.f. g(x) satisfies g(x) = (2+1/x)*g(x^2) + x^2. (End)
a(n) = 3*A001316(n-1)/2 for n >= 2. - Georg Fischer, Jun 23 2021

Extensions

Definition corrected by Omar E. Pol, Mar 03 2015

A233774 Total number of vertices in the first n rows of Sierpinski gasket, with a(0) = 1.

Original entry on oeis.org

1, 3, 6, 10, 15, 19, 25, 33, 42, 46, 52, 60, 70, 78, 90, 106, 123, 127, 133, 141, 151, 159, 171, 187, 205, 213, 225, 241, 261, 277, 301, 333, 366, 370, 376, 384, 394, 402, 414, 430, 448, 456, 468, 484, 504, 520, 544, 576, 610, 618, 630, 646, 666, 682
Offset: 0

Views

Author

Omar E. Pol, Dec 16 2013

Keywords

Examples

			Illustration of initial terms:
-----------------------------------------------------
           Diagram            n     A233775(n)   a(n)
-----------------------------------------------------
              *               0         1         1
             /T\
            *---*             1         2         3
           /T\ /T\
          *---*---*           2         3         6
         /T\     /T\
        *---*   *---*         3         4        10
       /T\ /T\ /T\ /T\
      *---*---*---*---*       4         5        15
     /T\             /T\
    *---*           *---*     5         4        19
-----------------------------------------------------
After five stages the number of "black" triangles in the structure is A006046(5) = 11. The total number of vertices is 19, so a(5) = 19.
		

Crossrefs

Partial sums of A233775.

Programs

  • Mathematica
    A233775[n_] := If[n == 0, 1, (2^IntegerExponent[n, 2]+1)*2^(DigitSum[n, 2]-1)];
    Accumulate[Array[A233775, 100, 0]] (* Paolo Xausa, Aug 07 2024 *)

Formula

a(2^k) = A067771(k), k >= 0.

A233775 Number of vertices in the n-th row of the Sierpinski gasket (cf. A047999).

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 6, 8, 9, 4, 6, 8, 10, 8, 12, 16, 17, 4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32, 33, 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, 65, 4, 6, 8, 10, 8, 12
Offset: 0

Views

Author

Omar E. Pol, Dec 16 2013

Keywords

Comments

Partial sums give A233774.
The subsequence of odd terms is A083318. - Gary W. Adamson, Jan 13 2014
Equivalently, this is the coordination sequence for the Sierpinski gasket with respect to the apex. - N. J. A. Sloane, Sep 19 2020

Examples

			Illustration of initial terms:
--------------------------------------------------------
           Diagram            n        a(n)   A233774(n)
--------------------------------------------------------
              *               0         1         1
             /T\
            *---*             1         2         3
           /T\ /T\
          *---*---*           2         3         6
         /T\     /T\
        *---*   *---*         3         4        10
       /T\ /T\ /T\ /T\
      *---*---*---*---*       4         5        15
     /T\             /T\
    *---*           *---*     5         4        19
--------------------------------------------------------
After five stages the number of "black" triangles in the structure is A006046(5) = 11 and the number of "black" triangles in row 5 is A001316(5-1) = 2. The number of vertices in row 5 is equal to 4, so a(5) = 4.
Written as an irregular triangle the sequence begins:
  1;
  2;
  3;
  4,5;
  4,6,8,9;
  4,6,8,10,8,12,16,17;
  4,6,8,10,8,12,16,18,8,12,16,20,16,24,32,33;
  ...
		

Crossrefs

Right border gives A094373.

Programs

Formula

a(0)=1, a(n) = (2^t(n) + 1) * 2^(c(n) - 1) where t(n) = A007814(n) is the number of trailing zeros in the binary representation of n and c(n) = A000120(n) is the total number of ones in the binary representation of n. - Johan Falk, Jun 24 2020
Previous Showing 81-90 of 226 results. Next