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

A145655 Partial sums of A080674.

Original entry on oeis.org

4, 24, 108, 448, 1812, 7272, 29116, 116496, 466020, 1864120, 7456524, 29826144, 119304628, 477218568, 1908874332, 7635497392, 30541989636, 122167958616, 488671834540, 1954687338240, 7818749353044, 31274997412264
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A080674.

Programs

  • Mathematica
    lst={};s=0;Do[s+=(s+=(s+=n));AppendTo[lst,s],{n,3*4!}];lst
    Accumulate[Table[4(4^n-1)/3,{n,0,40}]] (* or *) LinearRecurrence[{6,-9,4},{0,4,24},40] (* Harvey P. Dale, Nov 27 2013 *)

Formula

a(n) = sum_{i=0..n} A080674(i). a(n+1)-a(n) = A080674(n+1).
a(n) = 4*(4^(n+1)-3n-4)/9 = 4*A014825(n). - R. J. Mathar, Oct 21 2008
G.f.: 4x/((1-x)^2(1-4x)). - R. J. Mathar, Oct 21 2008
a(1)=4, a(2)=24, a(3)=108, a(n)=6*a(n-1)-9*a(n-2)+4*a(n-3). - Harvey P. Dale, Nov 27 2013

Extensions

Edited by R. J. Mathar, Oct 21 2008

A002450 a(n) = (4^n - 1)/3.

Original entry on oeis.org

0, 1, 5, 21, 85, 341, 1365, 5461, 21845, 87381, 349525, 1398101, 5592405, 22369621, 89478485, 357913941, 1431655765, 5726623061, 22906492245, 91625968981, 366503875925, 1466015503701, 5864062014805, 23456248059221, 93824992236885, 375299968947541
Offset: 0

Views

Author

Keywords

Comments

For n > 0, a(n) is the degree (n-1) "numbral" power of 5 (see A048888 for the definition of numbral arithmetic). Example: a(3) = 21, since the numbral square of 5 is 5(*)5 = 101(*)101(base 2) = 101 OR 10100 = 10101(base 2) = 21, where the OR is taken bitwise. - John W. Layman, Dec 18 2001
a(n) is composite for all n > 2 and has factors x, (3*x + 2*(-1)^n) where x belongs to A001045. In binary the terms greater than 0 are 1, 101, 10101, 1010101, etc. - John McNamara, Jan 16 2002
Number of n X 2 binary arrays with path of adjacent 1's from upper left corner to right column. - R. H. Hardin, Mar 16 2002
The Collatz-function iteration started at a(n), for n >= 1, will end at 1 after 2*n+1 steps. - Labos Elemer, Sep 30 2002 [corrected by Wolfdieter Lang, Aug 16 2021]
Second binomial transform of A001045. - Paul Barry, Mar 28 2003
All members of sequence are also generalized octagonal numbers (A001082). - Matthew Vandermast, Apr 10 2003
Also sum of squares of divisors of 2^(n-1): a(n) = A001157(A000079(n-1)), for n > 0. - Paul Barry, Apr 11 2003
Binomial transform of A000244 (with leading zero). - Paul Barry, Apr 11 2003
Number of walks of length 2n between two vertices at distance 2 in the cycle graph C_6. For n = 2 we have for example 5 walks of length 4 from vertex A to C: ABABC, ABCBC, ABCDC, AFABC and AFEDC. - Herbert Kociemba, May 31 2004
Also number of walks of length 2n + 1 between two vertices at distance 3 in the cycle graph C_12. - Herbert Kociemba, Jul 05 2004
a(n+1) is the number of steps that are made when generating all n-step random walks that begin in a given point P on a two-dimensional square lattice. To make one step means to mark one vertex on the lattice (compare A080674). - Pawel P. Mazur (Pawel.Mazur(AT)pwr.wroc.pl), Mar 13 2005
a(n+1) is the sum of square divisors of 4^n. - Paul Barry, Oct 13 2005
a(n+1) is the decimal number generated by the binary bits in the n-th generation of the Rule 250 elementary cellular automaton. - Eric W. Weisstein, Apr 08 2006
a(n-1) / a(n) = percentage of wasted storage if a single image is stored as a pyramid with a each subsequent higher resolution layer containing four times as many pixels as the previous layer. n is the number of layers. - Victor Brodsky (victorbrodsky(AT)gmail.com), Jun 15 2006
k is in the sequence if and only if C(4k + 1, k) (A052203) is odd. - Paul Barry, Mar 26 2007
This sequence also gives the number of distinct 3-colorings of the odd cycle C(2*n - 1). - Keith Briggs, Jun 19 2007
All numbers of the form m*4^m + (4^m-1)/3 have the property that they are sums of two squares and also their indices are the sum of two squares. This follows from the identity m*4^m + (4^m-1)/3 = 4(4(..4(4m + 1) + 1) + 1) + 1 ..) + 1. - Artur Jasinski, Nov 12 2007
For n > 0, terms are the numbers that, in base 4, are repunits: 1_4, 11_4, 111_4, 1111_4, etc. - Artur Jasinski, Sep 30 2008
Let A be the Hessenberg matrix of order n, defined by: A[1, j] = 1, A[i, i] := 5, (i > 1), A[i, i - 1] = -1, and A[i, j] = 0 otherwise. Then, for n >= 1, a(n) = charpoly(A,1). - Milan Janjic, Jan 27 2010
This is the sequence A(0, 1; 3, 4; 2) = A(0, 1; 4, 0; 1) of the family of sequences [a, b : c, d : k] considered by G. Detlefs, and treated as A(a, b; c, d; k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010
6*a(n) + 1 is every second Mersenne number greater than or equal to M3, hence all Mersenne primes greater than M2 must be a 6*a(n) + 1 of this sequence. - Roderick MacPhee, Nov 01 2010
Smallest number having alternating bit sum n. Cf. A065359.
For n = 1, 2, ..., the last digit of a(n) is 1, 5, 1, 5, ... . - Washington Bomfim, Jan 21 2011
Rule 50 elementary cellular automaton generates this sequence. This sequence also appears in the second column of array in A173588. - Paul Muljadi, Jan 27 2011
Sequence found by reading the line from 0, in the direction 0, 5, ... and the line from 1, in the direction 1, 21, ..., in the square spiral whose edges are the Jacobsthal numbers A001045 and whose vertices are the numbers A000975. These parallel lines are two semi-diagonals in the spiral. - Omar E. Pol, Sep 10 2011
a(n), n >= 1, is also the inverse of 3, denoted by 3^(-1), Modd(2^(2*n - 1)). For Modd n see a comment on A203571. E.g., a(2) = 5, 3 * 5 = 15 == 1 (Modd 8), because floor(15/8) = 1 is odd and -15 == 1 (mod 8). For n = 1 note that 3 * 1 = 3 == 1 (Modd 2) because floor(3/2) = 1 and -3 == 1 (mod 2). The inverse of 3 taken Modd 2^(2*n) coincides with 3^(-1) (mod 2^(2*n)) given in A007583(n), n >= 1. - Wolfdieter Lang, Mar 12 2012
If an AVL tree has a leaf at depth n, then the tree can contain no more than a(n+1) nodes total. - Mike Rosulek, Nov 20 2012
Also, this is the Lucas sequence V(5, 4). - Bruno Berselli, Jan 10 2013
Also, for n > 0, a(n) is an odd number whose Collatz trajectory contains no odd number other than n and 1. - Jayanta Basu, Mar 24 2013
Sum_{n >= 1} 1/a(n) converges to (3*(log(4/3) - QPolyGamma[0, 1, 1/4]))/log(4) = 1.263293058100271... = A321873. - K. G. Stier, Jun 23 2014
Consider n spheres in R^n: the i-th one (i=1, ..., n) has radius r(i) = 2^(1-i) and the coordinates of its center are (0, 0, ..., 0, r(i), 0, ..., 0) where r(i) is in position i. The coordinates of the intersection point in the positive orthant of these spheres are (2/a(n), 4/a(n), 8/a(n), 16/a(n), ...). For example in R^2, circles centered at (1, 0) and (0, 1/2), and with radii 1 and 1/2, meet at (2/5, 4/5). - Jean M. Morales, May 19 2015
From Peter Bala, Oct 11 2015: (Start)
a(n) gives the values of m such that binomial(4*m + 1,m) is odd. Cf. A003714, A048716, A263132.
2*a(n) = A020988(n) gives the values of m such that binomial(4*m + 2, m) is odd.
4*a(n) = A080674(n) gives the values of m such that binomial(4*m + 4, m) is odd. (End)
Collatz Conjecture Corollary: Except for powers of 2, the Collatz iteration of any positive integer must eventually reach a(n) and hence terminate at 1. - Gregory L. Simay, May 09 2016
Number of active (ON, black) cells at stage 2^n - 1 of the two-dimensional cellular automaton defined by "Rule 598", based on the 5-celled von Neumann neighborhood. - Robert Price, May 16 2016
From Luca Mariot and Enrico Formenti, Sep 26 2016: (Start)
a(n) is also the number of coprime pairs of polynomials (f, g) over GF(2) where both f and g have degree n + 1 and nonzero constant term.
a(n) is also the number of pairs of one-dimensional binary cellular automata with linear and bipermutive local rule of neighborhood size n+1 giving rise to orthogonal Latin squares of order 2^m, where m is a multiple of n. (End)
Except for 0, 1 and 5, all terms are Brazilian repunits numbers in base 4, and so belong to A125134. For n >= 3, all these terms are composite because a(n) = {(2^n-1) * (2^n + 1)}/3 and either (2^n - 1) or (2^n + 1) is a multiple of 3. - Bernard Schott, Apr 29 2017
Given the 3 X 3 matrix A = [2, 1, 1; 1, 2, 1; 1, 1, 2] and the 3 X 3 unit matrix I_3, A^n = a(n)(A - I_3) + I_3. - Nicolas Patrois, Jul 05 2017
The binary expansion of a(n) (n >= 1) consists of n 1's alternating with n - 1 0's. Example: a(4) = 85 = 1010101_2. - Emeric Deutsch, Aug 30 2017
a(n) (n >= 1) is the viabin number of the integer partition [n, n - 1, n - 2, ..., 2, 1] (for the definition of viabin number see comment in A290253). Example: a(4) = 85 = 1010101_2; consequently, the southeast border of the Ferrers board of the corresponding integer partition is ENENENEN, where E = (1, 0), N = (0, 1); this leads to the integer partition [4, 3, 2, 1]. - Emeric Deutsch, Aug 30 2017
Numbers whose binary and Gray-code representations are both palindromes (i.e., intersection of A006995 and A281379). - Amiram Eldar, May 17 2021
Starting with n = 1 the sequence satisfies {a(n) mod 6} = repeat{1, 5, 3}. - Wolfdieter Lang, Jan 14 2022
Terms >= 5 are those q for which the multiplicative order of 2 mod q is floor(log_2(q)) + 2 (and which is 1 more than the smallest possible order for any q). - Tim Seuré, Mar 09 2024
The order of 2 modulo a(n) is 2*n for n >= 2. - Joerg Arndt, Mar 09 2024

Examples

			Apply Collatz iteration to 9: 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5 and hence 16, 8, 4, 2, 1.
Apply Collatz iteration to 27: 27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5 and hence 16, 8, 4, 2, 1. [Corrected by _Sean A. Irvine_ at the suggestion of Stephen Cornelius, Mar 04 2024]
a(5) = (4^5 - 1)/3 = 341 = 11111_4 = {(2^5 - 1) * (2^5 + 1)}/3 = 31 * 33/3 = 31 * 11. - _Bernard Schott_, Apr 29 2017
		

References

  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 112.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums of powers of 4, A000302.
When converted to binary, this gives A094028.
Subsequence of A003714.
Primitive factors: A129735.

Programs

  • GAP
    List([0..25], n -> (4^n-1)/3); # Muniru A Asiru, Feb 18 2018
    
  • Haskell
    a002450 = (`div` 3) . a024036
    a002450_list = iterate ((+ 1) . (* 4)) 0
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Magma
    [ (4^n-1)/3: n in [0..25] ]; // Klaus Brockhaus, Oct 28 2008
    
  • Magma
    [n le 2 select n-1 else 5*Self(n-1)-4*Self(n-2): n in [1..70]]; // Vincenzo Librandi, Jun 13 2015
    
  • Maple
    [seq((4^n-1)/3,n=0..40)];
    A002450:=1/(4*z-1)/(z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[(4^n - 1)/3, {n, 0, 127}] (* Vladimir Joseph Stephan Orlovsky, Sep 29 2008 *)
    LinearRecurrence[{5, -4}, {0, 1}, 30] (* Harvey P. Dale, Jun 23 2013 *)
  • Maxima
    makelist((4^n-1)/3, n, 0, 30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    a(n) = (4^n-1)/3;
    
  • PARI
    my(z='z+O('z^40)); Vec(z/((1-z)*(1-4*z))) \\ Altug Alkan, Oct 11 2015
    
  • Python
    def A002450(n): return ((1<<(n<<1))-1)//3 # Chai Wah Wu, Jan 29 2023
  • Scala
    ((List.fill(20)(4: BigInt)).scanLeft(1: BigInt)( * )).scanLeft(0: BigInt)( + ) // Alonso del Arte, Sep 17 2019
    

Formula

From Wolfdieter Lang, Apr 24 2001: (Start)
a(n+1) = Sum_{m = 0..n} A060921(n, m).
G.f.: x/((1-x)*(1-4*x)). (End)
a(n) = Sum_{k = 0..n-1} 4^k; a(n) = A001045(2*n). - Paul Barry, Mar 17 2003
E.g.f.: (exp(4*x) - exp(x))/3. - Paul Barry, Mar 28 2003
a(n) = (A007583(n) - 1)/2. - N. J. A. Sloane, May 16 2003
a(n) = A000975(2*n)/2. - N. J. A. Sloane, Sep 13 2003
a(n) = A084160(n)/2. - N. J. A. Sloane, Sep 13 2003
a(n+1) = 4*a(n) + 1, with a(0) = 0. - Philippe Deléham, Feb 25 2004
a(n) = Sum_{i = 0..n-1} C(2*n - 1 - i, i)*2^i. - Mario Catalani (mario.catalani(AT)unito.it), Jul 23 2004
a(n+1) = Sum_{k = 0..n} binomial(n+1, k+1)*3^k. - Paul Barry, Aug 20 2004
a(n) = center term in M^n * [1 0 0], where M is the 3 X 3 matrix [1 1 1 / 1 3 1 / 1 1 1]. M^n * [1 0 0] = [A007583(n-1) a(n) A007583(n-1)]. E.g., a(4) = 85 since M^4 * [1 0 0] = [43 85 43] = [A007583(3) a(4) A007583(3)]. - Gary W. Adamson, Dec 18 2004
a(n) = Sum_{k = 0..n, j = 0..n} C(n, j)*C(j, k)*A001045(j - k). - Paul Barry, Feb 15 2005
a(n) = Sum_{k = 0..n} C(n, k)*A001045(n-k)*2^k = Sum_{k = 0..n} C(n, k)*A001045(k)*2^(n-k). - Paul Barry, Apr 22 2005
a(n) = A125118(n, 3) for n > 2. - Reinhard Zumkeller, Nov 21 2006
a(n) = Sum_{k = 0..n} 2^(n - k)*A128908(n, k), n >= 1. - Philippe Deléham, Oct 19 2008
a(n) = Sum_{k = 0..n} A106566(n, k)*A100335(k). - Philippe Deléham, Oct 30 2008
If we define f(m, j, x) = Sum_{k = j..m} binomial(m, k)*stirling2(k, j)*x^(m - k) then a(n-1) = f(2*n, 4, -2), n >= 2. - Milan Janjic, Apr 26 2009
a(n) = A014551(n) * A001045(n). - R. J. Mathar, Jul 08 2009
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3) = 5*a(n-1) - 4*a(n-2), a(0) = 0, a(1) = 1, a(2) = 5. - Wolfdieter Lang, Oct 18 2010
a(0) = 0, a(n+1) = a(n) + 2^(2*n). - Washington Bomfim, Jan 21 2011
A036555(a(n)) = 2*n. - Reinhard Zumkeller, Jan 28 2011
a(n) = Sum_{k = 1..floor((n+2)/3)} C(2*n + 1, n + 2 - 3*k). - Mircea Merca, Jun 25 2011
a(n) = Sum_{i = 1..n} binomial(2*n + 1, 2*i)/3. - Wesley Ivan Hurt, Mar 14 2015
a(n+1) = 2^(2*n) + a(n), a(0) = 0. - Ben Paul Thurston, Dec 27 2015
a(k*n)/a(n) = 1 + 4^n + ... + 4^((k-1)*n). - Gregory L. Simay, Jun 09 2016
Dirichlet g.f.: (PolyLog(s, 4) - zeta(s))/3. - Ilya Gutkovskiy, Jun 26 2016
A000120(a(n)) = n. - André Dalwigk, Mar 26 2018
a(m) divides a(m*n), in particular: a(2*n) == 0 (mod 5), a(3*n) == 0 (mod 3*7), a(5*n) == 0 (mod 11*31), etc. - M. F. Hasler, Oct 19 2018
a(n) = 4^(n-1) + a(n-1). - Bob Selcoe, Jan 01 2020
a(n) = A178415(1, n) = A347834(1, n-1), arrays, for n >= 1. - Wolfdieter Lang, Nov 29 2021
a(n) = A000225(2*n)/3. - John Keith, Jan 22 2022
a(n) = A080674(n) + 1 = A047849(n) - 1 = A163834(n) - 2 = A155701(n) - 3 = A163868(n) - 4 = A156605(n) - 7. - Ray Chandler, Jun 16 2023
From Peter Bala, Jul 23 2025: (Start)
The following are examples of telescoping products. Cf. A016153:
Product_{k = 1..2*n} 1 + 2^k/a(k+1) = a(n+1)/A007583(n) = (4^(n+1) - 1)/(2*4^n + 1).
Hence, Product_{k >= 1} 1 + 2^k/a(k+1) = 2.
Product_{k >= 1} 1 - 2^k/a(k+1) = 2/5, since 1 - 2^n/a(n+1) = b(n)/b(n-1), where b(n) = 2 - 3/(1 - 2^(n+1)).
Product_{k >= 1} 1 + (-2)^k/a(k+1) = 2/3, since 1 + (-2)^n/a(n+1) = c(n)/c(n-1), where c(n) = 2 - 1/(1 + (-2)^(n+1)).
Product_{k >= 1} 1 - (-2)^k/a(k+1) = 6/5, since 1 - (-2)^n/a(n+1) = d(n)/d(n-1), where d(n) = 2 - 1/(1 - (-2)^(n+1)). (End)

A020988 a(n) = (2/3)*(4^n-1).

Original entry on oeis.org

0, 2, 10, 42, 170, 682, 2730, 10922, 43690, 174762, 699050, 2796202, 11184810, 44739242, 178956970, 715827882, 2863311530, 11453246122, 45812984490, 183251937962, 733007751850, 2932031007402, 11728124029610, 46912496118442, 187649984473770, 750599937895082
Offset: 0

Views

Author

Keywords

Comments

Numbers whose binary representation is 10, n times (see A163662(n) for n >= 1). - Alexandre Wajnberg, May 31 2005
Numbers whose base-4 representation consists entirely of 2's; twice base-4 repunits. - Franklin T. Adams-Watters, Mar 29 2006
Expected time to finish a random Tower of Hanoi problem with 2n disks using optimal moves, so (since 2n is even and A010684(2n) = 1) a(n) = A060590(2n). - Henry Bottomley, Apr 05 2001
a(n) is the number of derangements of [2n + 3] with runs consisting of consecutive integers. E.g., a(1) = 10 because the derangements of {1, 2, 3, 4, 5} with runs consisting of consecutive integers are 5|1234, 45|123, 345|12, 2345|1, 5|4|123, 5|34|12, 45|23|1, 345|2|1, 5|4|23|1, 5|34|2|1 (the bars delimit the runs). - Emeric Deutsch, May 26 2003
For n > 0, also smallest numbers having in binary representation exactly n + 1 maximal groups of consecutive zeros: A087120(n) = a(n-1), see A087116. - Reinhard Zumkeller, Aug 14 2003
Number of walks of length 2n + 3 between any two diametrically opposite vertices of the cycle graph C_6. Example: a(0) = 2 because in the cycle ABCDEF we have two walks of length 3 between A and D: ABCD and AFED. - Emeric Deutsch, Apr 01 2004
From Paul Barry, May 18 2003: (Start)
Row sums of triangle using cumulative sums of odd-indexed rows of Pascal's triangle (start with zeros for completeness):
0 0
1 1
1 4 4 1
1 6 14 14 6 1
1 8 27 49 49 27 8 1 (End)
a(n) gives the position of the n-th zero in A173732, i.e., A173732(a(n)) = 0 for all n and this gives all the zeros in A173732. - Howard A. Landman, Mar 14 2010
Smallest number having alternating bit sum -n. Cf. A065359. For n = 0, 1, ..., the last digit of a(n) is 0, 2, 0, 2, ... . - Washington Bomfim, Jan 22 2011
Number of toothpicks minus 1 in the toothpick structure of A139250 after 2^n stages. - Omar E. Pol, Mar 15 2012
For n > 0 also partial sums of the odd powers of 2 (A004171). - K. G. Stier, Nov 04 2013
Values of m such that binomial(4*m + 2, m) is odd. Cf. A002450. - Peter Bala, Oct 06 2015
For a(n) > 2, values of m such that m is two steps away from a power of 2 under the Collatz iteration. - Roderick MacPhee, Nov 10 2016
a(n) is the position of the first occurrence of 2^(n+1)-1 in A020986. See the Brillhart and Morton link, pp. 856-857. - John Keith, Jan 12 2021
a(n) is the number of monotone paths in the n-dimensional cross-polytope for a generic linear orientation. See the Black and De Loera link. - Alexander E. Black, Feb 15 2023

Crossrefs

Programs

Formula

a(n) = 4*a(n-1) + 2, a(0) = 0.
a(n) = A026644(2*n).
a(n) = A007583(n) - 1 = A039301(n+1) - 2 = A083584(n-1) + 1.
E.g.f. : (2/3)*(exp(4*x)-exp(x)). - Paul Barry, May 18 2003
a(n) = A007583(n+1) - 1 = A039301(n+2) - 2 = A083584(n) + 1. - Ralf Stephan, Jun 14 2003
G.f.: 2*x/((1-x)*(1-4*x)). - R. J. Mathar, Sep 17 2008
a(n) = a(n-1) + 2^(2n-1), a(0) = 0. - Washington Bomfim, Jan 22 2011
a(n) = A193652(2*n). - Reinhard Zumkeller, Aug 08 2011
a(n) = 5*a(n-1) - 4*a(n-2) (n > 1), a(0) = 0, a(1) = 2. - L. Edson Jeffery, Mar 02 2012
a(n) = (2/3)*A024036(n). - Omar E. Pol, Mar 15 2012
a(n) = 2*A002450(n). - Yosu Yurramendi, Jan 24 2017
From Seiichi Manyama, Nov 24 2017: (Start)
Zeta_{GL(2)/F_1}(s) = Product_{k = 1..4} (s-k)^(-b(2,k)), where Sum b(2,k)*t^k = t*(t-1)*(t^2-1). That is Zeta_{GL(2)/F_1}(s) = (s-3)*(s-2)/((s-4)*(s-1)).
Zeta_{GL(2)/F_1}(s) = Product_{n > 0} (1 - (1/s)^n)^(-A295521(n)) = Product_{n > 0} (1 - x^n)^(-A295521(n)) = (1-3*x)*(1-2*x)/((1-4*x)*(1-x)) = 1 + Sum_{k > 0} a(k-1)*x^k (x=1/s). (End)
From Oboifeng Dira, May 29 2020: (Start)
a(n) = A078008(2n+1) (second bisection).
a(n) = Sum_{k=0..n} binomial(2n+1, ((n+2) mod 3)+3k). (End)
From John Reimer Morales, Aug 04 2025: (Start)
a(n) = A000302(n) - A047849(n).
a(n) = A020522(n) + A000079(n) - A047849(n). (End)

Extensions

Edited by N. J. A. Sloane, Sep 06 2006

A024036 a(n) = 4^n - 1.

Original entry on oeis.org

0, 3, 15, 63, 255, 1023, 4095, 16383, 65535, 262143, 1048575, 4194303, 16777215, 67108863, 268435455, 1073741823, 4294967295, 17179869183, 68719476735, 274877906943, 1099511627775, 4398046511103, 17592186044415, 70368744177663, 281474976710655
Offset: 0

Views

Author

Keywords

Comments

This sequence is the normalized length per iteration of the space-filling Peano-Hilbert curve. The curve remains in a square, but its length increases without bound. The length of the curve, after n iterations in a unit square, is a(n)*2^(-n) where a(n) = 4*a(n-1)+3. This is the sequence of a(n) values. a(n)*(2^(-n)*2^(-n)) tends to 1, the area of the square where the curve is generated, as n increases. The ratio between the number of segments of the curve at the n-th iteration (A015521) and a(n) tends to 4/5 as n increases. - Giorgio Balzarotti, Mar 16 2006
Numbers whose base-4 representation is 333....3. - Zerinvary Lajos, Feb 03 2007
From Eric Desbiaux, Jun 28 2009: (Start)
It appears that for a given area, a square n^2 can be divided into n^2+1 other squares.
It's a rotation and zoom out of a Cartesian plan, which creates squares with side
= sqrt( (n^2) / (n^2+1) ) --> A010503|A010532|A010541... --> limit 1,
and diagonal sqrt(2*sqrt((n^2)/(n^2+1))) --> A010767|... --> limit A002193.
(End)
Also the total number of line segments after the n-th stage in the H tree, if 4^(n-1) H's are added at the n-th stage to the structure in which every "H" is formed by 3 line segments. A164346 (the first differences of this sequence) gives the number of line segments added at the n-th stage. - Omar E. Pol, Feb 16 2013
a(n) is the cumulative number of segment deletions in a Koch snowflake after (n+1) iterations. - Ivan N. Ianakiev, Nov 22 2013
Inverse binomial transform of A005057. - Wesley Ivan Hurt, Apr 04 2014
For n > 0, a(n) is one-third the partial sums of A002063(n-1). - J. M. Bergot, May 23 2014
Also the cyclomatic number of the n-Sierpinski tetrahedron graph. - Eric W. Weisstein, Sep 18 2017

Examples

			G.f. = 3*x + 15*x^2 + 63*x^3 + 255*x^4 + 1023*x^5 + 4095*x^6 + ...
		

References

  • Graham Everest, Alf van der Poorten, Igor Shparlinski, and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.

Crossrefs

Programs

  • Haskell
    a024036 = (subtract 1) . a000302
    a024036_list = iterate ((+ 3) . (* 4)) 0
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Maple
    A024036:=n->4^n-1; seq(A024036(n), n=0..30); # Wesley Ivan Hurt, Apr 04 2014
  • Mathematica
    Array[4^# - 1 &, 50, 0] (* Vladimir Joseph Stephan Orlovsky, Nov 03 2009 *)
    (* Start from Eric W. Weisstein, Sep 19 2017 *)
    Table[4^n - 1, {n, 0, 20}]
    4^Range[0, 20] - 1
    LinearRecurrence[{5, -4}, {0, 3}, 20]
    CoefficientList[Series[3 x/(1 - 5 x + 4 x^2), {x, 0, 20}], x]
    (* End *)
  • PARI
    for(n=0, 100, print1(4^n-1, ", ")) \\ Felix Fröhlich, Jul 04 2014
  • Sage
    [gaussian_binomial(2*n,1, 2) for n in range(21)] # Zerinvary Lajos, May 28 2009
    
  • Sage
    [stirling_number2(2*n+1, 2) for n in range(21)] # Zerinvary Lajos, Nov 26 2009
    

Formula

a(n) = 3*A002450(n). - N. J. A. Sloane, Feb 19 2004
G.f.: 3*x/((-1+x)*(-1+4*x)) = 1/(-1+x) - 1/(-1+4*x). - R. J. Mathar, Nov 23 2007
E.g.f.: exp(4*x) - exp(x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A000051(n)*A000225(n). - Reinhard Zumkeller, Feb 14 2009
A079978(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2009
a(n) = A179857(A000225(n)), for n > 0; a(n) > A179857(m), for m < A000225(n). - Reinhard Zumkeller, Jul 31 2010
a(n) = 4*a(n-1) + 3, with a(0) = 0. - Vincenzo Librandi, Aug 01 2010
A000120(a(n)) = 2*n. - Reinhard Zumkeller, Feb 07 2011
a(n) = (3/2)*A020988(n). - Omar E. Pol, Mar 15 2012
a(n) = (Sum_{i=0..n} A002001(i)) - 1 = A178789(n+1) - 3. - Ivan N. Ianakiev, Nov 22 2013
a(n) = n*E(2*n-1,1)/B(2*n,1), for n > 0, where E(n,x) denotes the Euler polynomials and B(n,x) the Bernoulli polynomials. - Peter Luschny, Apr 04 2014
a(n) = A000302(n) - 1. - Sean A. Irvine, Jun 18 2019
Sum_{n>=1} 1/a(n) = A248721. - Amiram Eldar, Nov 13 2020
a(n) = A080674(n) - A002450(n). - Elmo R. Oliveira, Dec 02 2023

Extensions

More terms Wesley Ivan Hurt, Apr 04 2014

A228275 A(n,k) = Sum_{i=1..k} n^i; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 6, 3, 0, 0, 4, 14, 12, 4, 0, 0, 5, 30, 39, 20, 5, 0, 0, 6, 62, 120, 84, 30, 6, 0, 0, 7, 126, 363, 340, 155, 42, 7, 0, 0, 8, 254, 1092, 1364, 780, 258, 56, 8, 0, 0, 9, 510, 3279, 5460, 3905, 1554, 399, 72, 9, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 19 2013

Keywords

Comments

A(n,k) is the total sum of lengths of longest ending contiguous subsequences with the same value over all s in {1,...,n}^k:
A(4,1) = 4 = 1+1+1+1: [1], [2], [3], [4].
A(1,4) = 4: [1,1,1,1].
A(3,2) = 12 = 2+1+1+1+2+1+1+1+2: [1,1], [1,2], [1,3], [2,1], [2,2], [2,3], [3,1], [3,2], [3,3].
A(2,3) = 14 = 3+1+1+2+2+1+1+3: [1,1,1], [1,1,2], [1,2,1], [1,2,2], [2,1,1], [2,1,2], [2,2,1], [2,2,2].

Examples

			Square array A(n,k) begins:
  0, 0,  0,   0,    0,     0,      0,      0, ...
  0, 1,  2,   3,    4,     5,      6,      7, ...
  0, 2,  6,  14,   30,    62,    126,    254, ...
  0, 3, 12,  39,  120,   363,   1092,   3279, ...
  0, 4, 20,  84,  340,  1364,   5460,  21844, ...
  0, 5, 30, 155,  780,  3905,  19530,  97655, ...
  0, 6, 42, 258, 1554,  9330,  55986, 335922, ...
  0, 7, 56, 399, 2800, 19607, 137256, 960799, ...
		

Crossrefs

Rows n=0-11 give: A000004, A001477, A000918(k+1), A029858(k+1), A080674, A104891, A105281, A104896, A052379(k-1), A052386, A105279, A105280.
Main diagonal gives A031972.
Lower diagonal gives A226238.
Cf. A228250.

Programs

  • Maple
    A:= (n, k)-> `if`(n=1, k, (n/(n-1))*(n^k-1)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    a[0, 0] = 0; a[1, k_] := k; a[n_, k_] := n*(n^k-1)/(n-1); Table[a[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Dec 16 2013 *)

Formula

A(1,k) = k, else A(n,k) = n/(n-1)*(n^k-1).
A(n,k) = Sum_{i=1..k} n^i.
A(n,k) = Sum_{i=1..k+1} binomial(k+1,i)*A(n-i,k)*(-1)^(i+1) for n>k, given values A(0,k), A(1,k),..., A(k,k). - Yosu Yurramendi, Sep 03 2013

A105279 a(0)=0; a(n) = 10*a(n-1) + 10.

Original entry on oeis.org

0, 10, 110, 1110, 11110, 111110, 1111110, 11111110, 111111110, 1111111110, 11111111110, 111111111110, 1111111111110, 11111111111110, 111111111111110, 1111111111111110, 11111111111111110, 111111111111111110, 1111111111111111110, 11111111111111111110, 111111111111111111110
Offset: 0

Views

Author

Alexandre Wajnberg, Apr 25 2005

Keywords

Comments

a(n) is the smallest even number with digits in {0,1} having digit sum n; in other words, the base 10 reading of the binary string of A000918(n). Cf. A069532. - Jason Kimberley, Nov 02 2011
Also, except for a(0), the binary representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 645", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 19 2017

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Row n=10 of A228275.
Partial sums of A178500.

Programs

  • Haskell
    a105279 n = a105279_list !! n
    a105279_list = iterate ((* 10) . (+ 1)) 0
    -- Reinhard Zumkeller, Feb 05 2012
  • Magma
    [-10/9+(10/9)*10^n: n in [0..20]]; // Vincenzo Librandi, Jul 04 2011
    
  • Mathematica
    NestList[10*(# + 1) &, 0, 25] (* Paolo Xausa, Jul 17 2024 *)

Formula

a(n) = (10/9)*(10^n - 1), with n>=0.
a(n) = Sum_{k=1..n} 10^k.
Repunits times 10: a(n) = 10 * A002275(n). - Reinhard Zumkeller, Feb 05 2012
From Stefano Spezia, Sep 15 2023: (Start)
O.g.f.: 10*x/((1 - x)*(1 - 10*x)).
E.g.f.: 10*exp(x)*(exp(9*x) - 1)/9. (End)
From Elmo R. Oliveira, Jun 18 2025: (Start)
a(n) = 11*a(n-1) - 10*a(n-2).
a(n) = A124166(n)/10.
a(n) = A161770(n)/100 for n >= 1. (End)

A263132 Positive values of m such that binomial(4*m - 1, m) is odd.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 12, 16, 22, 24, 32, 43, 44, 48, 64, 86, 88, 96, 128, 171, 172, 176, 192, 256, 342, 344, 352, 384, 512, 683, 684, 688, 704, 768, 1024, 1366, 1368, 1376, 1408, 1536, 2048, 2731, 2732, 2736, 2752, 2816, 3072, 4096, 5462, 5464, 5472, 5504
Offset: 1

Views

Author

Peter Bala, Oct 10 2015

Keywords

Comments

This sequence, when viewed as a set, equals the set of numbers of the form 4^n * ceiling(2^k/3) for n >= 0, k >= 1, i.e., the product subset in Z of A000302 and A005578 regarded as sets. See the example below.
Equivalently, this sequence, when viewed as a set, equals the set of numbers of the form 2^n * (2^(2*k + 1) + 1)/3 for n,k >= 0, i.e., the product subset in Z of A000079 and A007583 regarded as sets. See the example below.
2*a(n) gives the values of m such that binomial(4*m - 2,m) is odd. 4*a(n) gives the values of m such that binomial(4*m - 3,m) is odd (other than m = 1) and also the values of m such that binomial(4*m - 4,m) is odd.

Examples

			1) Notice how this sequence can be read from Table 1 below by moving through the table in a sequence of 'knight moves' (1 down and 2 to the left) starting from the first row. For example, starting at 11 on the top row we move in a series of knights moves 11 -> 12 -> 16, then return to the top row at 22 and move 22 -> 24 -> 32, return to the top row at 43 and move 43 -> 44 -> 48 -> 64, then return to top row at 86 and so on.
........................................................
.   Table 1: 4^n * ceiling(2^k/3) for n >= 0, k >= 1   .
........................................................
n\k|   1    2    3    4     5     6    7    8     9
---+----------------------------------------------------
0  |   1    2    3    6    11    22   43   86   171 ...
1  |   4    8   12   24    44    88  172  ...
2  |  16   32   48   96   176    ...
3  |  64  128  192  ...
4  | 256  ...
...
2) Notice how this sequence can be read from Table 2 below in a sequence of 'knight moves' (2 down and 1 to the left) starting from the first two rows. For example, starting at 43 in the first row we jump 43 -> 44 -> 48 -> 64, then return to the second row at 86 and jump 86 -> 88 -> 96 -> 128, followed by 171 -> 172 -> 176 -> 192 -> 256, and so on.
....................................................
.   Table 2: 2^n * (2^(2*k + 1) + 1)/3, n,k >= 0   .
....................................................
n\k|   0    1     2     3      4      5
---+----------------------------------------------
0  |   1    3    11    43    171    683  ...
1  |   2    6    22    86    342   1366  ...
2  |   4   12    44   172    684   2732  ...
3  |   8   24    88   344   1368   5464  ...
4  |  16   48   176   688   2736  10928  ...
5  |  32   96   352  1376   5472  21856  ...
6  |  64  192   704  2752  10944  43712  ...
7  | 128  384  1408  5504  21888  87424  ...
8  | 256 ...
		

Crossrefs

Other odd binomials: A002450 (4*m+1,m), A020988 (4*m+2,m), A263133 (4*m+3,m), A080674 (4*m+4,m), A118113 (3*m-2,m), A003714 (3*m,m).

Programs

  • Magma
    [n: n in [1..6000] | Binomial(4*n-1, n) mod 2 eq 1]; // Vincenzo Librandi, Oct 12 2015
    
  • Maple
    for n from 1 to 5000 do if mod(binomial(4*n-1, n), 2) = 1 then print(n) end if end do;
  • Mathematica
    Select[Range[6000],OddQ[Binomial[4#-1,#]]&] (* Harvey P. Dale, Dec 26 2015 *)
  • PARI
    for(n=1, 1e4, if (binomial(4*n-1, n) % 2 == 1, print1(n", "))) \\ Altug Alkan, Oct 11 2015
    
  • PARI
    a(n) = my(r,s=sqrtint(4*n-3,&r)); (1<Kevin Ryde, Jun 14 2025
    
  • Python
    A263132_list = [m for m in range(1,10**6) if not ~(4*m-1) & m] # Chai Wah Wu, Feb 07 2016

Formula

a(n) = A263133(n) + 1.
m is a term if and only if m AND NOT (4*m-1) = 0 where AND and NOT are bitwise operators. - Chai Wah Wu, Feb 07 2016
a(n) = (2^A000267(n-1) + 2^A384688(n-1)) / 3. - Kevin Ryde, Jun 14 2025

Extensions

More terms from Vincenzo Librandi, Oct 12 2015

A097072 Expansion of (1 - 2*x + 2*x^2)/((1 - x^2)*(1 - 2*x)).

Original entry on oeis.org

1, 0, 3, 4, 11, 20, 43, 84, 171, 340, 683, 1364, 2731, 5460, 10923, 21844, 43691, 87380, 174763, 349524, 699051, 1398100, 2796203, 5592404, 11184811, 22369620, 44739243, 89478484, 178956971, 357913940, 715827883, 1431655764, 2863311531, 5726623060, 11453246123
Offset: 0

Author

Paul Barry, Jul 22 2004

Keywords

Crossrefs

Programs

  • Magma
    [(4*2^n - 3 + 5*(-1)^n)/6: n in [0..50]]; // G. C. Greubel, Oct 10 2017
  • Maple
    a:= n-> ceil(2*(2^n-1)/3)+(-1)^n:
    seq(a(n), n=0..32);  # Alois P. Heinz, Jun 15 2023
  • Mathematica
    CoefficientList[Series[(1-2x+2x^2)/((1-x^2)(1-2x)),{x,0,50}],x]  (* Harvey P. Dale, Mar 09 2011 *)
    Table[2*2^n/3 - 1/2 + 5 (-1)^n/6, {n, 0, 32}] (* Michael De Vlieger, Feb 22 2017 *)
  • PARI
    for(n=0,50, print1((4*2^n - 3 + 5*(-1)^n)/6, ", ")) \\ G. C. Greubel, Oct 10 2017
    

Formula

a(n) = (4*2^n - 3 + 5*(-1)^n)/6.
a(n) = Sum_{k=0..n} (2^k - 1 + 0^k)(-1)^(n-k).
a(n) = A001045(n+1) - A000035(n).
a(n) = a(n-1) + 2*a(n-2) + 1, n > 1. - Gary Detlefs, Jun 20 2010
a(2*n) = A007583(n), a(2*n+1) = A080674(n), n >= 0. - Yosu Yurramendi, Feb 21 2017
a(n) = A000975(n) + (-1)^n. - Alois P. Heinz, Jun 15 2023

A247817 Sum(4^k, k=2..n).

Original entry on oeis.org

0, 16, 80, 336, 1360, 5456, 21840, 87376, 349520, 1398096, 5592400, 22369616, 89478480, 357913936, 1431655760, 5726623056, 22906492240, 91625968976, 366503875920, 1466015503696, 5864062014800, 23456248059216, 93824992236880, 375299968947536, 1501199875790160
Offset: 1

Author

Vincenzo Librandi, Sep 25 2014

Keywords

Crossrefs

Cf. Sum(h^k,k=2..n): A028329 (h=2), A168569 (h=3), this sequence (h=4), A168571 (h=5), A247840 (h=6), A168572 (h=7), A247841 (h=8), A247842 (h=9), A124166 (h=10).

Programs

  • Magma
    [0] cat [&+[4^k: k in [2..n]]: n in [2..30]];
    
  • Magma
    [(4^(n+1)-16)/3: n in [1..30]];
    
  • Mathematica
    RecurrenceTable[{a[1] == 0, a[n] == a[n-1] + 4^n}, a, {n, 30}] (* or *) CoefficientList[ Series[16 x / ((1 - x) (1 - 4 x)),{x, 0, 40}], x]
    LinearRecurrence[{5,-4},{0,16},30] (* Harvey P. Dale, Feb 19 2023 *)
  • PARI
    a(n) = sum(k=2, n, 4^k); \\ Michel Marcus, Sep 25 2014

Formula

G.f.: 16*x^2/((1-x)*(1-4*x)).
a(n) = a(n-1) + 4^n = (4^(n+1) - 16)/3 = 5*a(n-1) - 4*a(n-2).
a(n) = A080674(n) - 4. - Michel Marcus, Sep 25 2014

A084240 a(n) = -5*a(n-1) - 4*a(n-2), a(0)=1, a(1)=0.

Original entry on oeis.org

1, 0, -4, 20, -84, 340, -1364, 5460, -21844, 87380, -349524, 1398100, -5592404, 22369620, -89478484, 357913940, -1431655764, 5726623060, -22906492244, 91625968980, -366503875924, 1466015503700, -5864062014804, 23456248059220, -93824992236884, 375299968947540
Offset: 0

Author

Paul Barry, May 23 2003

Keywords

Comments

A Jacobsthal related sequence.
Inverse binomial transform of A084246.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{-5,-4},{1,0},30] (* Harvey P. Dale, Dec 13 2021 *)

Formula

G.f.: (1+5*x)/((1+x)*(1+4*x)).
E.g.f.: (4*exp(-x) - exp(-4*x))/3.
a(n) = A084241(n) + (-1)^n
a(n) = (-1)^(n+1)*(A002450(n)-1) = (-1)^(n+1)*(A001045(2*n)-1).
a(n) = (4*(-1)^n - (-4)^n)/3.
a(n) = (-1)^(n-1) * A080674(n-1). - Falk Hüffner, Jan 11 2021
Showing 1-10 of 16 results. Next