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 10 results.

A006046 Total number of odd entries in first n rows of Pascal's triangle: a(0) = 0, a(1) = 1, a(2k) = 3*a(k), a(2k+1) = 2*a(k) + a(k+1). a(n) = Sum_{i=0..n-1} 2^wt(i).

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 15, 19, 27, 29, 33, 37, 45, 49, 57, 65, 81, 83, 87, 91, 99, 103, 111, 119, 135, 139, 147, 155, 171, 179, 195, 211, 243, 245, 249, 253, 261, 265, 273, 281, 297, 301, 309, 317, 333, 341, 357, 373, 405, 409, 417, 425, 441, 449, 465, 481, 513, 521
Offset: 0

Views

Author

Keywords

Comments

The graph has a blancmange or Takagi appearance. For the asymptotics, see the references by Flajolet with "Mellin" in the title. - N. J. A. Sloane, Mar 11 2021
The following alternative construction of this sequence is due to Thomas Nordhaus, Oct 31 2000: For each n >= 0 let f_n be the piecewise linear function given by the points (k /(2^n), a(k) / 3^n), k = 0, 1, ..., 2^n. f_n is a monotonic map from the interval [0,1] into itself, f_n(0) = 0, f_n(1) = 1. This sequence of functions converges uniformly. But the limiting function is not differentiable on a dense subset of this interval.
I submitted a problem to the Amer. Math. Monthly about an infinite family of non-convex sequences that solve a recurrence that involves minimization: a(1) = 1; a(n) = max { ua(k) + a(n-k) | 1 <= k <= n/2 }, for n > 1; here u is any real-valued constant >= 1. The case u=2 gives the present sequence. Cf. A130665 - A130667. - Don Knuth, Jun 18 2007
a(n) = sum of (n-1)-th row terms of triangle A166556. - Gary W. Adamson, Oct 17 2009
From Gary W. Adamson, Dec 06 2009: (Start)
Let M = an infinite lower triangular matrix with (1, 3, 2, 0, 0, 0, ...) in every column shifted down twice:
1;
3;
2; 1;
0, 3;
0, 2, 1;
0, 0, 3;
0, 0, 2, 1;
0, 0, 0, 3;
0, 0, 0, 2, 1;
...
This sequence starting with "1" = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. (End)
a(n) is also the sum of all entries in rows 0 to n of Sierpiński's triangle A047999. - Reinhard Zumkeller, Apr 09 2012
The production matrix of Dec 06 2009 is equivalent to the following: Let p(x) = (1 + 3x + 2x^2). The sequence = P(x) * p(x^2) * p(x^4) * p(x^8) * .... The sequence divided by its aerated variant = (1, 3, 2, 0, 0, 0, ...). - Gary W. Adamson, Aug 26 2016
Also the total number of ON cells, rows 1 through n, for cellular automaton Rule 90 (Cf. A001316, A038183, also Mathworld Link). - Bradley Klee, Dec 22 2018

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.16.
  • Flajolet, Philippe, and Mordecai Golin. "Mellin transforms and asymptotics." Acta Informatica 31.7 (1994): 673-696.
  • Flajolet, Philippe, Mireille Régnier, and Robert Sedgewick. "Some uses of the Mellin integral transform in the analysis of algorithms." in Combinatorial algorithms on words. Springer, 1985. 241-254.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums of A001316.
See A130665 for Sum 3^wt(n).
a(n) = A074330(n-1) + 1 for n >= 2. A080978(n) = 2*a(n) + 1. Cf. A080263.
Sequences of form a(n) = r*a(ceiling(n/2)) + s*a(floor(n/2)), a(1)=1, for (r,s) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), (1,4), (2,3), (3,2), (4,1): A000027, A006046, A064194, A130665, A073121, A268524, A116520, A268525, A268526, A268527.

Programs

  • Haskell
    a006046 = sum . concat . (`take` a047999_tabl)
    -- Reinhard Zumkeller, Apr 09 2012
    
  • Magma
    [0] cat [n le 1 select 1 else 2*Self(Floor(n/2)) + Self(Floor(Ceiling(n/2))): n in [1..60]]; // Vincenzo Librandi, Aug 30 2016
  • Maple
    f:=proc(n) option remember;
    if n <= 1 then n elif n mod 2 = 0 then 3*f(n/2)
    else 2*f((n-1)/2)+f((n+1)/2); fi; end;
    [seq(f(n),n=0..130)]; # N. J. A. Sloane, Jul 29 2014
  • Mathematica
    f[n_] := Sum[ Mod[ Binomial[n, k], 2], {k, 0, n} ]; Table[ Sum[ f[k], {k, 0, n} ], {n, 0, 100} ]
    Join[{0},Accumulate[Count[#,?OddQ]&/@Table[Binomial[n,k],{n,0,60},{k,0,n}]]] (* _Harvey P. Dale, Dec 10 2014 *)
    FoldList[Plus, 0, Total /@ CellularAutomaton[90, Join[Table[0, {#}], {1}, Table[0, {#}]], #]][[2 ;; -1]] &@50 (* Bradley Klee, Dec 23 2018 *)
    Join[{0}, Accumulate[2^DigitCount[Range[0, 127], 2, 1]]] (* Paolo Xausa, Oct 24 2024 *)
    Join[{0}, Accumulate[2^Nest[Join[#, #+1]&, {0}, 7]]] (* Paolo Xausa, Oct 24 2024, after IWABUCHI Yu(u)ki in A000120 *)
  • PARI
    A006046(n)={ n<2 & return(n); A006046(n\2)*3+if(n%2,1<M. F. Hasler, May 03 2009
    
  • PARI
    a(n) = if(!n, 0, my(r=0, t=1); forstep(i=logint(n, 2), 0, -1, r*=3; if(bittest(n, i), r+=t; t*=2)); r); \\ Ruud H.G. van Tol, Jul 06 2024
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A006046(n):return n if n<=1 else 2*A006046((n-1)//2)+A006046((n+1)//2)if n%2 else 3*A006046(n//2) # Guillermo Hernández, Dec 31 2023
    
  • Python
    from math import prod
    def A006046(n):
        d = list(map(lambda x:int(x)+1,bin(n)[:1:-1]))
        return sum((b-1)*prod(d[a:])*3**a for a, b in enumerate(d))>>1 # Chai Wah Wu, Aug 13 2025
    

Formula

a(n) = Sum_{k=0..n-1} 2^A000120(k). - Paul Barry, Jan 05 2005; simplified by N. J. A. Sloane, Apr 05 2014
For asymptotics see Stolarsky (1977). - N. J. A. Sloane, Apr 05 2014
a(n) = a(n-1) + A001316(n-1). a(2^n) = 3^n. - Henry Bottomley, Apr 05 2001
a(n) = n^(log_2(3))*G(log_2(n)) where G(x) is a function of period 1 defined by its Fourier series. - Benoit Cloitre, Aug 16 2002; formula modified by S. R. Finch, Dec 31 2007
G.f.: (x/(1-x))*Product_{k>=0} (1 + 2*x^2^k). - Ralf Stephan, Jun 01 2003; corrected by Herbert S. Wilf, Jun 16 2005
a(1) = 1, a(n) = 2*a(floor(n/2)) + a(ceiling(n/2)).
a(n) = 3*a(floor(n/2)) + (n mod 2)*2^A000120(n-1). - M. F. Hasler, May 03 2009
a(n) = Sum_{k=0..floor(log_2(n))} 2^k * A360189(n-1,k). - Alois P. Heinz, Mar 06 2023

Extensions

More terms from James Sellers, Aug 21 2000
Definition expanded by N. J. A. Sloane, Feb 16 2016

A130665 a(n) = Sum_{k=0..n} 3^wt(k), where wt() = A000120().

Original entry on oeis.org

1, 4, 7, 16, 19, 28, 37, 64, 67, 76, 85, 112, 121, 148, 175, 256, 259, 268, 277, 304, 313, 340, 367, 448, 457, 484, 511, 592, 619, 700, 781, 1024, 1027, 1036, 1045, 1072, 1081, 1108, 1135, 1216, 1225, 1252, 1279, 1360, 1387, 1468, 1549, 1792, 1801, 1828, 1855
Offset: 0

Views

Author

N. J. A. Sloane, based on a message from Don Knuth, Jun 23 2007

Keywords

Comments

Partial sums of A048883. - David Applegate, Jun 11 2009
From Gary W. Adamson, Aug 26 2016: (Start)
The formula of Mar 26 2010 is equivalent to the left-shifted vector of matrix powers (lim_{k->infinity} M^k), of the production matrix M:
1, 0, 0, 0, 0, 0, ...
4, 0, 0, 0, 0, 0, ...
3, 1, 0, 0, 0, 0, ...
0, 4, 0, 0, 0, 0, ...
0, 3, 1, 0, 0, 0, ...
0, 0, 4, 0, 0, 0, ...
0, 0, 3, 1, 0, 0, ...
...
The sequence divided by its aerated variant is (1, 4, 3, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Haskell
    a130665 = sum . map (3 ^) . (`take` a000120_list) . (+ 1)
    -- Reinhard Zumkeller, Apr 18 2012
    
  • Maple
    u:=3; a[1]:=1; M:=30; for n from 1 to M do a[2*n] := (u+1)*a[n]; a[2*n+1] := u*a[n] + a[n+1]; od; t1:=[seq( a[n], n=1..2*M )]; # Gives sequence with a different offset
  • Mathematica
    f[n_] := Sum[3^Count[ IntegerDigits[k, 2], 1], {k, 0, n}]; Array[f, 51, 0] (* Robert G. Wilson v, Jun 28 2010 *)
  • Python
    def a(n):  # formula version, n=10^10000 takes ~1 second
        if n == 0:
            return 1
        msb = 1 << (n.bit_length() - 1)
        return msb**2 + 3 * a(n-msb) # Stefan Pochmann, Mar 15 2023
    
  • Python
    def a(n):  # optimized, n=10^50000 takes ~1 second
        n += 1
        total = 0
        power3 = 1
        while n:
            log = n.bit_length() - 1
            total += power3 << (2*log)
            n -= 1 << log
            power3 *= 3
        return total # Stefan Pochmann, Mar 15 2023

Formula

With a different offset: a(1) = 1; a(n) = max { 3*a(k)+a(n-k) | 1 <= k <= n/2 }, for n>1.
a(2n+1) = 4*a(n) and a(2n) = 3*a(n-1) + a(n).
a(n) = (A147562(n+1) - 1)*3/4 + 1. - Omar E. Pol, Nov 08 2009
a(n) = A160410(n+1)/4. - Omar E. Pol, Nov 12 2009
Let r(x) = (1 + 4x + 3x^2), then (1 + 4x + 7x^2 + 16x^3 + ...) =
r(x)* r(x^2) * r(x^4) * r(x^8) * ... - Gary W. Adamson, Mar 26 2010
For asymptotics see the discussion in the comments in A006046. - N. J. A. Sloane, Mar 11 2021
a(n) = Sum_{k=0..floor(log_2(n+1))} 3^k * A360189(n,k). - Alois P. Heinz, Mar 06 2023
a(n) = msb^2 + 3*a(n-msb), where msb = A053644(n). - Stefan Pochmann, Mar 15 2023

Extensions

Simpler definition (and new offset) from David Applegate, Jun 11 2009
Lower limit of sum in definition changed from 1 to 0 by Robert G. Wilson v, Jun 28 2010

A116520 a(0) = 0, a(1) = 1; a(n) = max { 4*a(k) + a(n-k) | 1 <= k <= n/2 }, for n > 1.

Original entry on oeis.org

0, 1, 5, 9, 25, 29, 45, 61, 125, 129, 145, 161, 225, 241, 305, 369, 625, 629, 645, 661, 725, 741, 805, 869, 1125, 1141, 1205, 1269, 1525, 1589, 1845, 2101, 3125, 3129, 3145, 3161, 3225, 3241, 3305, 3369, 3625, 3641, 3705, 3769, 4025, 4089, 4345, 4601, 5625
Offset: 0

Views

Author

Roger L. Bagula, Mar 15 2006

Keywords

Comments

Equivalently, a(n) = r*a(ceiling(n/2)) + s*a(floor(n/2)), a(0)=0, a(1)=1, for (r,s) = (1,4). - N. J. A. Sloane, Feb 16 2016
A 5-divide version of A084230.
Zero together with the partial sums of A102376. - Omar E. Pol, May 05 2010
Also, total number of cubic ON cells after n generations in a three-dimensional cellular automaton in which A102376(n-1) gives the number of cubic ON cells in the n-th level of the structure starting from the top. An ON cell remains ON forever. The structure looks like an irregular stepped pyramid, with n >= 1. - Omar E. Pol, Feb 13 2015
From Gary W. Adamson, Aug 27 2016: (Start)
The formula of Mar 26 2010 is equivalent to lim_{k->infinity} M^k of the following production matrix M:
1, 0, 0, 0, 0, 0, ...
5, 0, 0, 0, 0, 0, ...
4, 1, 0, 0, 0, 0, ...
0, 5, 0, 0, 0, 0, ...
0, 4, 1, 0, 0, 0, ...
0, 0, 5, 0, 0, 0, ...
0, 0, 4, 1, 0, 0, ...
0, 0, 0, 5, 0, 0, ...
...
The sequence with offset 1 divided by its aerated variant is (1, 5, 4, 0, 0, 0, ...). (End)

Crossrefs

Sequences of the form a(n) = r*a(ceiling(n/2)) + s*a(floor(n/2)), a(1)=1, for (r,s) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), (1,4), (2,3), (3,2), (4,1): A000027, A006046, A064194, A130665, A073121, A268524, A116520, A268525, A268526, A268527.

Programs

  • Haskell
    import Data.List (transpose)
    a116520 n = a116520_list !! n
    a116520_list = 0 : zs where
       zs = 1 : (concat $ transpose
                          [zipWith (+) vs zs, zipWith (+) vs $ tail zs])
          where vs = map (* 4) zs
    -- Reinhard Zumkeller, Apr 18 2012
  • Maple
    a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 0 then 5*a(n/2) else 4*a((n-1)/2)+a((n+1)/2) fi end: seq(a(n),n=0..52);
  • Mathematica
    b[0] := 0 b[1] := 1 b[n_?EvenQ] := b[n] = 5*b[n/2] b[n_?OddQ] := b[n] = 4*b[(n - 1)/2] + b[(n + 1)/2] a = Table[b[n], {n, 1, 25}]

Formula

a(0) = 1, a(1) = 1; thereafter a(2n) = 5a(n) and a(2n+1) = 4a(n) + a(n+1).
Let r(x) = (1 + 5x + 4x^2). Then (1 + 5x + 9x^2 + 25x^3 + ...) = r(x) * r(x^2) * r(x^4) * r(x^8) * ... . - Gary W. Adamson, Mar 26 2010
a(n) = Sum_{k=0..n-1} 4^wt(k), where wt = A000120. - Mike Warburton, Mar 14 2019
a(n) = Sum_{k=0..floor(log_2(n))} 4^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023

Extensions

Edited by N. J. A. Sloane, Apr 16 2006, Jul 02 2008

A360189 Triangle T(n,k), n>=0, 0<=k<=floor(log_2(n+1)), read by rows: T(n,k) = number of nonnegative integers <= n having binary weight k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 1, 3, 3, 1, 3, 3, 1, 1, 4, 3, 1, 1, 4, 4, 1, 1, 4, 5, 1, 1, 4, 5, 2, 1, 4, 6, 2, 1, 4, 6, 3, 1, 4, 6, 4, 1, 4, 6, 4, 1, 1, 5, 6, 4, 1, 1, 5, 7, 4, 1, 1, 5, 8, 4, 1, 1, 5, 8, 5, 1, 1, 5, 9, 5, 1, 1, 5, 9, 6, 1, 1, 5, 9, 7, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 04 2023

Keywords

Comments

T(n,k) is defined for all n >= 0 and k >= 0. Terms that are not in the triangle are zero.

Examples

			T(6,2) = 3: 3, 5, 6, or in binary: 11_2, 101_2, 110_2.
T(15,3) = 4: 7, 11, 13, 14, or in binary: 111_2, 1011_2, 1101_2, 1110_2.
Triangle T(n,k) begins:
  1;
  1, 1;
  1, 2;
  1, 2, 1;
  1, 3, 1;
  1, 3, 2;
  1, 3, 3;
  1, 3, 3, 1;
  1, 4, 3, 1;
  1, 4, 4, 1;
  1, 4, 5, 1;
  1, 4, 5, 2;
  1, 4, 6, 2;
  1, 4, 6, 3;
  1, 4, 6, 4;
  1, 4, 6, 4, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A000012, A029837(n+1) = A113473(n) for n>0, A340068(n+1).
Last elements of rows give A090996(n+1).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<0, 0,
          b(n-1)+x^add(i, i=Bits[Split](n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..23);
  • PARI
    T(n,k) = my(v1); v1 = Vecrev(binary(n+1)); v1 = Vecrev(select(x->(x>0),v1,1)); sum(j=0, min(k,#v1-1), binomial(v1[j+1]-1,k-j)) \\ Mikhail Kurkov, Nov 27 2024

Formula

T(n,k) = T(n-1,k) + [A000120(n) = k] where [] is the Iverson bracket and T(n,k) = 0 for n<0.
T(2^n-1,k) = A007318(n,k) = binomial(n,k).
T(n,floor(log_2(n+1))) = A090996(n+1).
Sum_{k>=0} T(n,k) = n+1.
Sum_{k>=0} k * T(n,k) = A000788(n).
Sum_{k>=0} k^2 * T(n,k) = A231500(n).
Sum_{k>=0} k^3 * T(n,k) = A231501(n).
Sum_{k>=0} k^4 * T(n,k) = A231502(n).
Sum_{k>=0} 2^k * T(n,k) = A006046(n+1).
Sum_{k>=0} 3^k * T(n,k) = A130665(n).
Sum_{k>=0} 4^k * T(n,k) = A116520(n+1).
Sum_{k>=0} 5^k * T(n,k) = A130667(n+1).
Sum_{k>=0} 6^k * T(n,k) = A116522(n+1).
Sum_{k>=0} 7^k * T(n,k) = A161342(n+1).
Sum_{k>=0} 8^k * T(n,k) = A116526(n+1).
Sum_{k>=0} 10^k * T(n,k) = A116525(n+1).
Sum_{k>=0} n^k * T(n,k) = A361257(n).
T(n,k) = Sum_{j=0..min(k, A000120(n+1)-1)} binomial(A272020(n+1,j+1)-1,k-j) for n >= 0, k >= 0 (see Peter J. Taylor link). - Mikhail Kurkov, Nov 27 2024

A161342 Number of "ON" cubic cells at n-th stage in simple 3-dimensional cellular automaton: a(n) = A160428(n)/8.

Original entry on oeis.org

0, 1, 8, 15, 64, 71, 120, 169, 512, 519, 568, 617, 960, 1009, 1352, 1695, 4096, 4103, 4152, 4201, 4544, 4593, 4936, 5279, 7680, 7729, 8072, 8415, 10816, 11159, 13560, 15961, 32768, 32775, 32824, 32873, 33216, 33265, 33608, 33951, 36352, 36401, 36744, 37087, 39488
Offset: 0

Views

Author

Omar E. Pol, Jun 14 2009

Keywords

Comments

First differences are in A161343. - Omar E. Pol, May 03 2015
From Gary W. Adamson, Aug 30 2016: (Start)
Let M =
1, 0, 0, 0, 0, ...
8, 0, 0, 0, 0, ...
7, 1, 0, 0, 0, ...
0, 8, 0, 0, 0, ...
0, 7, 1, 0, 0, ...
0, 0, 8, 0, 0, ...
0, 0, 7, 1, 0, ...
...
Then M^k converges to a single nonzero column giving the sequence.
The sequence with offset 1 divided by its aerated variant is (1, 8, 7, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<0, 0,
          b(n-1)+x^add(i, i=Bits[Split](n)))
        end:
    a:= n-> subs(x=7, b(n-1)):
    seq(a(n), n=0..44);  # Alois P. Heinz, Mar 06 2023
  • Mathematica
    A161342list[nmax_]:=Join[{0},Accumulate[7^DigitCount[Range[0,nmax-1],2,1]]];A161342list[100] (* Paolo Xausa, Aug 05 2023 *)

Formula

From Nathaniel Johnston, Nov 13 2010: (Start)
a(n) = Sum_{k=0..n-1} 7^A000120(k).
a(n) = 1 + 7 * Sum_{k=1..n-1} A151785(k), for n >= 1.
a(2^n) = 2^(3n).
(End)
a(n) = Sum_{k=0..floor(log_2(n))} 7^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023

Extensions

More terms from Nathaniel Johnston, Nov 13 2010

A116522 a(0)=1, a(1)=1, a(n)=7*a(n/2) for n=2,4,6,..., a(n)=6*a((n-1)/2)+a((n+1)/2) for n=3,5,7,....

Original entry on oeis.org

0, 1, 7, 13, 49, 55, 91, 127, 343, 349, 385, 421, 637, 673, 889, 1105, 2401, 2407, 2443, 2479, 2695, 2731, 2947, 3163, 4459, 4495, 4711, 4927, 6223, 6439, 7735, 9031, 16807, 16813, 16849, 16885, 17101, 17137, 17353, 17569, 18865, 18901, 19117, 19333
Offset: 0

Views

Author

Roger L. Bagula, Mar 15 2006

Keywords

Comments

A 7-divide version of A084230.
The Harborth: f(2^k) = 3^k suggests that a family of sequences of the form: f(2^k) = prime(n)^k.
From Gary W. Adamson, Aug 27 2016: (Start)
Let M = the production matrix below. Then lim_{k->infinity} M^k generates the sequence with offset 1 by extracting the left-shifted vector.
1, 0, 0, 0, 0, ...
7, 0, 0, 0, 0, ...
6, 1, 0, 0, 0, ...
0, 7, 0, 0, 0, ...
0, 6, 1, 0, 0, ...
0, 0, 7, 0, 0, ...
0, 0, 6, 1, 0, ...
...
The sequence divided by its aerated variant is (1, 7, 6, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Maple
    a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 0 then 7*a(n/2) else 6*a((n-1)/2)+a((n+1)/2) fi end: seq(a(n),n=0..47);
    # second Maple program:
    b:= proc(n) option remember; `if`(n<0, 0,
          b(n-1)+x^add(i, i=Bits[Split](n)))
        end:
    a:= n-> subs(x=6, b(n-1)):
    seq(a(n), n=0..44);  # Alois P. Heinz, Mar 06 2023
  • Mathematica
    b[0] := 0; b[1] := 1; b[n_?EvenQ] := b[n] = 7*b[n/2]; b[n_?OddQ] := b[n] = 6*b[(n - 1)/2] + b[(n + 1)/2]; a = Table[b[n], {n, 1, 25}]

Formula

G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...), where r(x) = (1 + 7x + 6x^2).
a(n) = Sum_{k=0..n-1} 6^wt(k), where wt = A000120. - Mike Warburton, Mar 14 2019
a(n) = Sum_{k=0..floor(log_2(n))} 6^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023

Extensions

Edited by N. J. A. Sloane, Apr 16 2005

A116525 a(0)=1, a(1)=1, a(n) = 11*a(n/2) for even n, and a(n) = 10*a((n-1)/2) + a((n+1)/2) for odd n >= 3.

Original entry on oeis.org

0, 1, 11, 21, 121, 131, 231, 331, 1331, 1341, 1441, 1541, 2541, 2641, 3641, 4641, 14641, 14651, 14751, 14851, 15851, 15951, 16951, 17951, 27951, 28051, 29051, 30051, 40051, 41051, 51051, 61051, 161051, 161061, 161161, 161261, 162261, 162361, 163361, 164361
Offset: 0

Views

Author

Roger L. Bagula, Mar 15 2006

Keywords

Comments

From Gary W. Adamson, Aug 30 2016: (Start)
Let M =
1, 0, 0, 0, 0, ...
11, 0, 0, 0, 0, ...
10, 1, 0, 0, 0, ...
0, 11, 0, 0, 0, ...
0, 10, 1, 0, 0, ...
0, 0, 11, 0, 0, ...
0, 0, 10, 1, 0, ...
...
Then lim_{k->infinity} M^k converges to a single nonzero column giving the sequence.
The sequence divided by its aerated variant is (1, 11, 10, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Maple
    a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 0 then 11*a(n/2) else 10*a((n-1)/2)+a((n+1)/2) fi end: seq(a(n),n=0..42);
  • Mathematica
    b[0] := 0; b[1] := 1; b[n_?EvenQ] := b[n] = 11*b[n/2]; b[n_?OddQ] := b[n] = 10*b[(n - 1)/2] + b[(n + 1)/2]; a = Table[b[n], {n, 1, 25}]

Formula

Let r(x) = (1 + 11x + 10x^2). The sequence is r(x) * r(x^2) * r(x^4) * r(x^8) * ... - Gary W. Adamson, Aug 30 2016
a(n) = Sum_{k=0..n-1} 10^wt(k), where wt = A000120. - Mike Warburton, Mar 14 2019
a(n) = Sum_{k=0..floor(log_2(n))} 10^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023

Extensions

Edited by N. J. A. Sloane, Apr 16 2005

A116526 a(0)=1, a(1)=1, a(n) = 9*a(n/2) for even n >= 2, and a(n) = 8*a((n-1)/2) + a((n+1)/2) for odd n >= 3.

Original entry on oeis.org

0, 1, 9, 17, 81, 89, 153, 217, 729, 737, 801, 865, 1377, 1441, 1953, 2465, 6561, 6569, 6633, 6697, 7209, 7273, 7785, 8297, 12393, 12457, 12969, 13481, 17577, 18089, 22185, 26281, 59049, 59057, 59121, 59185, 59697, 59761, 60273, 60785, 64881, 64945, 65457, 65969
Offset: 0

Views

Author

Roger L. Bagula, Mar 15 2006

Keywords

Comments

A 9-divide version of A084230.
The interest this one has is in the prime form of even odd 2^n+1, 2^n.
From Gary W. Adamson, Aug 30 2016: (Start)
Let M =
1, 0, 0, 0, 0, ...
9, 0, 0, 0, 0, ...
8, 1, 0, 0, 0, ...
0, 9, 0, 0, 0, ...
0, 8, 1, 0, 0, ...
0, 0, 9, 0, 0, ...
0, 0, 8, 1, 0, ...
...
Then M^k converges to a single nonzero column giving the sequence.
The sequence divided by its aerated variant is (1, 9, 8, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Maple
    a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 0 then 9*a(n/2) else 8*a((n-1)/2)+a((n+1)/2) fi end: seq(a(n),n=0..45);
  • Mathematica
    b[0] := 0; b[1] := 1; b[n_?EvenQ] := b[n] = 9*b[n/2]; b[n_?OddQ] := b[n] = 8*b[(n - 1)/2] + b[(n + 1)/2]; a = Table[b[n], {n, 1, 25}]

Formula

a(n) = Sum_{k=0..n-1} 8^wt(k), where wt = A000120. - Mike Warburton, Mar 14 2019
a(n) = Sum_{k=0..floor(log_2(n))} 8^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023

Extensions

Edited by N. J. A. Sloane, Apr 16 2006

A256141 Square array read by antidiagonals upwards: T(n,k), n>=0, k>=0, in which row n lists the partial sums of the n-th row of the square array of A256140.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 5, 4, 1, 1, 5, 7, 9, 5, 1, 1, 6, 9, 16, 11, 6, 1, 1, 7, 11, 25, 19, 15, 7, 1, 1, 8, 13, 36, 29, 28, 19, 8, 1, 1, 9, 15, 49, 41, 45, 37, 27, 9, 1, 1, 10, 17, 64, 55, 66, 61, 64, 29, 10, 1, 1, 11, 19, 81, 71, 91, 91, 125, 67, 33, 11, 1, 1, 12, 21, 100, 89, 120, 127, 216, 129, 76, 37, 12, 1
Offset: 0

Views

Author

Omar E. Pol, Mar 16 2015

Keywords

Comments

Questions:
Is also A130667 a row of this square array?
Is also A116522 a row of this square array?
Is also A116526 a row of this square array?
Is also A116525 a row of this square array?
Is also A116524 a row of this square array?

Examples

			The corner of the square array with the first 15 terms of the first 12 rows looks like this:
--------------------------------------------------------------------------
A000012: 1, 1, 1,  1,  1,  1,  1,   1,   1,   1,   1,   1,   1,   1,   1
A000027: 1, 2, 3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14,  15
A006046: 1, 3, 5,  9, 11, 15, 19,  27,  29,  33,  37,  45,  49,  57,  65
A130665: 1, 4, 7, 16, 19, 28, 37,  64,  67,  76,  85, 112, 121, 148, 175
A116520: 1, 5, 9, 25, 29, 45, 61, 125, 129, 145, 161, 225, 241, 305, 369
A130667? 1, 6,11, 36, 41, 66, 91, 216, 221, 246, 271, 396, 421, 546, 671
A116522? 1, 7,13, 49, 55, 91,127, 343, 349, 385, 421, 637, 673, 889,1105
A161342: 1, 8,15, 64, 71,120,169, 512, 519, 568, 617, 960,1009,1352,1695
A116526? 1, 9,17, 81, 89,153,217, 729, 737, 801, 865,1377,1441,1953,2465
.......: 1,10,19,100,109,190,271,1000,1009,1090,1171,1900,1981,2710,3439
A116525? 1,11,21,121,131,231,331,1331,1341,1441,1541,2541,2641,3641,4641
.......: 1,12,23,144,155,276,397,1728,1739,1860,1981,3312,3422,4764,6095
		

Crossrefs

First five rows are A000012, A000027, A006046, A130665, A116520. Row 7 is A161342.
First eight columns are A000012, A000027, A005408, A000290, A028387, A000384, A003215, A000578. Column 9 is A081437. Column 11 is A015237. Columns 13-15 are A005915, A005917, A000583.

A256135 a(n) = 5^A000120(n).

Original entry on oeis.org

1, 5, 5, 25, 5, 25, 25, 125, 5, 25, 25, 125, 25, 125, 125, 625, 5, 25, 25, 125, 25, 125, 125, 625, 25, 125, 125, 625, 125, 625, 625, 3125, 5, 25, 25, 125, 25, 125, 125, 625, 25, 125, 125, 625, 125, 625, 625, 3125, 25, 125, 125, 625, 125, 625, 625, 3125, 125, 625, 625, 3125, 625, 3125, 3125, 15625
Offset: 0

Views

Author

Omar E. Pol, Mar 19 2015

Keywords

Comments

Also, a row of the square array A256140.
It appears that when A151780 is regarded as a triangle in which the row lengths are the powers of 2, this is what the rows converge to.

Examples

			Also, written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
5;
5, 25;
5, 25, 25, 125;
5, 25, 25, 125, 25, 125, 125, 625;
...
		

Crossrefs

Programs

Formula

a(n) = A000351(A000120(n)). - Michel Marcus, Mar 21 2015
G.f.: Product_{k>=0} (1 + 5*x^(2^k)). - Ilya Gutkovskiy, Feb 28 2017

Extensions

More terms from Michael De Vlieger, Mar 20 2015
Showing 1-10 of 10 results.