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

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

A002001 a(n) = 3*4^(n-1), n>0; a(0)=1.

Original entry on oeis.org

1, 3, 12, 48, 192, 768, 3072, 12288, 49152, 196608, 786432, 3145728, 12582912, 50331648, 201326592, 805306368, 3221225472, 12884901888, 51539607552, 206158430208, 824633720832, 3298534883328, 13194139533312, 52776558133248, 211106232532992, 844424930131968
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1996

Keywords

Comments

Second binomial transform of (1,1,4,4,16,16,...) = (3*2^n+(-2)^n)/4. - Paul Barry, Jul 16 2003
Number of vertices (or sides) formed after the (n-1)-th iterate towards building a Koch's snowflake. - Lekraj Beedassy, Jan 24 2005
For n >= 1, a(n) is the number of functions f:{1,2,...,n}->{1,2,3,4} such that for a fixed x in {1,2,...,n} and a fixed y in {1,2,3,4} we have f(x) <> y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
a(n) = (n+1) terms in the sequence (1, 2, 3, 3, 3, ...) dot (n+1) terms in the sequence (1, 1, 3, 12, 48, ...). Example: a(4) = 192 = (1, 2, 3, 3, 3) dot (1, 1, 3, 12, 48) = (1 + 2 + 9 + 36 + 144). - Gary W. Adamson, Aug 03 2010
a(n) is the number of compositions of n when there are 3 types of each natural number. - Milan Janjic, Aug 13 2010
See A178789 for the number of acute (= exterior) angles of the Koch snowflake referred to in the above comment by L. Beedassy. - M. F. Hasler, Dec 17 2013
After 1, subsequence of A033428. - Vincenzo Librandi, May 26 2014
a(n) counts walks (closed) on the graph G(1-vertex; 1-loop x3, 2-loop x3, 3-loop x3, 4-loop x3, ...). - David Neil McGrath, Jan 01 2015
For n > 1, a(n) are numbers k such that (2^(k-1) mod k)/(2^k mod k) = 2; 2^(a(n)-1) == 2^(2n-1) (mod a(n)) and 2^a(n) == 2^(2n-2) (mod a(n)). - Thomas Ordowski, Apr 22 2020
For n > 1, a(n) is the number of 4-colorings of the Hex graph of size 2 X (n-1). More generally, for q > 2, the number of q-colorings of the Hex graph of size 2 X n is given by q*(q - 1)*(q - 2)^(2*n - 2). - Sela Fried, Sep 25 2023
For n > 1, a(n) is the number of pixels in the HEALPix discretization of the sphere of order n-2; HEALPix is a common sphere pixellization scheme in astronomy, cosmology, and nuclear engineering. - Jayson R. Vavrek, Aug 08 2024

Crossrefs

First difference of 4^n (A000302).

Programs

Formula

From Paul Barry, Apr 20 2003: (Start)
a(n) = (3*4^n + 0^n)/4 (with 0^0=1).
E.g.f.: (3*exp(4*x) + 1)/4. (End)
With interpolated zeros, this has e.g.f. (3*cosh(2*x) + 1)/4 and binomial transform A006342. - Paul Barry, Sep 03 2003
a(n) = Sum_{j=0..1} Sum_{k=0..n} C(2n+j, 2k). - Paul Barry, Nov 29 2003
G.f.: (1-x)/(1-4*x). The sequence 1, 3, -12, 48, -192, ... has g.f. (1+7*x)/(1+4*x). - Paul Barry, Feb 12 2004
a(n) = 3*Sum_{k=0..n-1} a(k). - Adi Dani, Jun 24 2011
G.f.: 1/(1-3*Sum_{k>=1} x^k). - Joerg Arndt, Jun 24 2011
Row sums of triangle A134316. - Gary W. Adamson, Oct 19 2007
a(n) = A011782(n) * A003945(n). - R. J. Mathar, Jul 08 2009
If p(1)=3 and p(i)=3 for i > 1, and if A is the Hessenberg matrix of order n defined by A(i,j) = p(j-i+1) when i <= j, A(i,j)=-1 when i=j+1, and A(i,j) = 0 otherwise, then, for n >= 1, a(n) = det A. - Milan Janjic, Apr 29 2010
a(n) = 4*a(n-1), a(0)=1, a(1)=3. - Vincenzo Librandi, Dec 31 2010
G.f.: 1 - G(0) where G(k) = 1 - 1/(1-3*x)/(1-x/(x-1/G(k+1))); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 25 2013
G.f.: x+2*x/(G(0)-2), where G(k) = 1 + 1/(1 - x*(3*k+1)/(x*(3*k+4) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n) = ceiling(3*4^(n-1)). - Wesley Ivan Hurt, Dec 17 2013
Construct the power matrix T(n,j) = [A(n)^*j]*[S(n)^*(j-1)] where A(n)=(3,3,3,...) and S(n)=(0,1,0,0,...). (* is convolution operation.) Then T(n,j) counts n-walks containing j loops on the single vertex graph above and a(n) = Sum_{j=1..n} T(n,j). (S(n)^*0=I.) - David Neil McGrath, Jan 01 2015

A047849 a(n) = (4^n + 2)/3.

Original entry on oeis.org

1, 2, 6, 22, 86, 342, 1366, 5462, 21846, 87382, 349526, 1398102, 5592406, 22369622, 89478486, 357913942, 1431655766, 5726623062, 22906492246, 91625968982, 366503875926, 1466015503702, 5864062014806, 23456248059222, 93824992236886, 375299968947542
Offset: 0

Views

Author

Keywords

Comments

Counts closed walks of length 2n at a vertex of the cyclic graph on 6 nodes C_6. - Paul Barry, Mar 10 2004
The number of closed walks of odd length of the cyclic graph is zero. See the array w(N,L) and triangle a(K,N) given in A199571 for the general case. - Wolfdieter Lang, Nov 08 2011
A. A. Ivanov conjectures that the dimension of the universal embedding of the unitary dual polar space DSU(2n,4) is a(n). - J. Taylor (jt_cpp(AT)yahoo.com), Apr 02 2004
Permutations with two fixed points avoiding 123 and 132.
Related to A024495(6n), A131708(6n+2), A024493(6n+4). First differences give A000302. - Paul Curtz, Mar 25 2008
Also the number of permutations of length n which avoid 4321 and 4123 (or 4321 and 3412, or 4123 and 3214, or 4123 and 2143). - Vincent Vatter, Aug 17 2009; minor correction by Henning Ulfarsson, May 14 2017
This sequence is related to A014916 by A014916(n) = n*a(n)-Sum_{i=0..n-1} a(i). - Bruno Berselli, Jul 27 2010, Mar 02 2012
For n >= 2, a(n) equals 2^n times the permanent of the (2n-2) X (2n-2) tridiagonal matrix with 1/sqrt(2)'s along the main diagonal, and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
For n > 0, counts closed walks of length (n) at a vertex of a triangle with two (x2) loops at each vertex. - David Neil McGrath, Sep 11 2014
From Michel Lagneau, Feb 26 2015: (Start)
a(n) is also the sum of the largest odd divisors of the integers 1,2,3, ..., 2^n.
Proof:
All integers of the set {2^(n-1)+1, 2^(n-1)+2, ..., 2^n} are of the form 2^k(2m+1) where k and m integers. The greatest odd divisor of a such integer is 2m+1. Reciprocally, if 2m+1 is an odd integer <= 2^n, there exists a unique integer in the set {2^(n-1)+1, 2^(n-1)+2, ..., 2^n} where 2m+1 is the greatest odd divisor. Hence the recurrence relation:
a(n) = a(n+1) + (1 + 3 + ... + 2*2^(n-1) - 1) = a(n-1) + 4^(n-1) for n >= 2.
We obtain immediately: a(n) = a(1) + 4 + ... + 4^n = (4^n+2)/3. (End)
The number of Riordan graphs of order n+1. See Cheon et al., Proposition 2.8. - Peter Bala, Aug 12 2021
Let q = 2^(2n+1) and Omega_n be the Suzuki ovoid with q^2 + 1 points. Then a(n) is the number of orbits of the finite Suzuki group Sz(q) on 3-subsets of Omega_n. Link to result in References. - Paul M. Bradley, Jun 04 2023
Also the cogrowth sequence for the 8-element dihedral group D8 = . - Sean A. Irvine, Nov 04 2024

Examples

			a(2) = 6 for the number of round trips in C_6 from the six round trips from, say, vertex no. 1: 12121, 16161, 12161, 16121, 12321 and 16561. - _Wolfdieter Lang_, Nov 08 2011
		

Crossrefs

Programs

Formula

n-th difference of a(n), a(n-1), ..., a(0) is 3^(n-1) for n >= 1.
From Henry Bottomley, Aug 29 2000: (Start)
a(n) = (4^n + 2)/3.
a(n) = 4*a(n-1) - 2.
a(n) = 5*a(n-1) - 4*a(n-2).
a(n) = 2*A007583(n-1) = A002450(n) + 1. (End)
a(n) = A047848(1,n).
With interpolated zeros, this is (-2)^n/6 + 2^n/6 + (-1)^n/3 + 1/3. - Paul Barry, Aug 26 2003
a(n) = A007583(n) - A002450(n) = A001045(2n+1) - A001045(2n) . - Philippe Deléham, Feb 25 2004
Second binomial transform of A078008. Binomial transform of 1, 1, 3, 9, 81, ... (3^n/3 + 2*0^n/3). a(n) = A078008(2n). - Paul Barry, Mar 14 2004
G.f.: (1-3*x)/((1-x)*(1-4*x)). - Herbert Kociemba, Jun 06 2004
a(n) = Sum_{k=0..n} 2^k*A121314(n,k). - Philippe Deléham, Sep 15 2006
a(n) = (A001045(2*n+1) + 1)/2. - Paul Barry, Dec 05 2007
From Bruno Berselli, Jul 27 2010: (Start)
a(n) = (A020988(n) + 2)/2 = A039301(n+1)/2.
Sum_{i=0..n} a(i) = A073724(n). (End)
For n >= 3, a(n) equals [2, 1, 1; 1, 2, 1; 1, 1, 2]^(n - 2)*{1, 1, 2}*{1, 1, 2}. - John M. Campbell, Jul 09 2011
a(n) = Sum_{k=0..n} binomial(2*n, mod(n,3) + 3*k). - Oboifeng Dira, May 29 2020
From Elmo R. Oliveira, Dec 21 2023: (Start)
E.g.f.: (exp(x)*(exp(3*x) + 2))/3.
a(n) = A178789(n+1)/3. (End)
a(n) = A000302(n) - A020988(n). - John Reimer Morales, Aug 03 2025

Extensions

New name from Charles R Greathouse IV, Dec 22 2011

A335545 A(n,k) is the sum of the k-th powers of the (positive) number of permutations of [n] with j descents (j=0..max(0,n-1)); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 6, 4, 1, 1, 2, 18, 24, 5, 1, 1, 2, 66, 244, 120, 6, 1, 1, 2, 258, 2664, 5710, 720, 7, 1, 1, 2, 1026, 29284, 322650, 188908, 5040, 8, 1, 1, 2, 4098, 322104, 19888690, 55457604, 8702820, 40320, 9, 1, 1, 2, 16386, 3543124, 1276095330, 16657451236, 17484605040, 524888040, 362880, 10
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2020

Keywords

Examples

			Square array A(n,k) begins:
  1,   1,      1,        1,           1,             1, ...
  1,   1,      1,        1,           1,             1, ...
  2,   2,      2,        2,           2,             2, ...
  3,   6,     18,       66,         258,          1026, ...
  4,  24,    244,     2664,       29284,        322104, ...
  5, 120,   5710,   322650,    19888690,    1276095330, ...
  6, 720, 188908, 55457604, 16657451236, 5025377832180, ...
  ...
		

Crossrefs

Columns k=0-2 give: A028310, A000142, A168562.
Rows n=0+1, 2-3 give: A000012, A007395(k+1), A178789(k+1).
Main diagonal gives A335546.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          expand(add(b(u-j, o+j-1, 1)*x^t, j=1..u))+
                 add(b(u+j-1, o-j, 1), j=1..o))
        end:
    A:= (n, k)-> (p-> add(coeff(p, x, i)^k, i=0..degree(p)))(b(n, 0$2)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
    # second Maple program:
    A:= (n, k)-> add(combinat[eulerian1](n, j)^k, j=0..max(0, n-1)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    B[n_, k_] := B[n, k] = Sum[(-1)^j*Binomial[n+1, j]*(k-j+1)^n, {j, 0, k+1}];
    A[0, ] = 1; A[n, k_] := Sum[B[n, j]^k, {j, 0, n-1}];
    Table[A[n, d-n], {d, 0, 10}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 11 2021 *)

Formula

A(n,k) = Sum_{j=0..max(0,n-1)} A173018(n,j)^k.

A281699 Sierpinski stellated octahedron numbers: a(n) = 2*(-3*2^(n+1) + 2^(2n+3) + 5).

Original entry on oeis.org

14, 50, 218, 938, 3914, 16010, 64778, 260618, 1045514, 4188170, 16764938, 67084298, 268386314, 1073643530, 4294770698, 17179475978, 68718690314, 274876334090, 1099508482058, 4398040219658, 17592173461514, 70368719011850, 281474926379018, 1125899806179338, 4503599426043914, 18014398106828810
Offset: 0

Views

Author

Steven Beard, Jan 27 2017

Keywords

Comments

Stella octangula with Sierpinski recursion.

Crossrefs

Programs

  • Mathematica
    Table[8 (2^(2 n + 1) + 2) - 6 (2^(n + 1) + 1), {n, 0, 25}] (* or *)
    LinearRecurrence[{7, -14, 8}, {14, 50, 218}, 26] (* or *)
    CoefficientList[Series[2 (7 - 24 x + 32 x^2)/((1 - x) (1 - 2 x) (1 - 4 x)), {x, 0, 25}], x] (* Michael De Vlieger, Jan 28 2017 *)
  • PARI
    Vec(2*(7 - 24*x + 32*x^2) / ((1 - x)*(1 - 2*x)*(1 - 4*x)) + O(x^30)) \\ Colin Barker, Jan 28 2017
    
  • PARI
    a(n) = 16*4^n - 12*2^n + 10 \\ Charles R Greathouse IV, Jan 29 2017

Formula

a(n) = 8*(2^(2*n+1)+2) - 6*(2^(n+1)+1).
From Colin Barker, Jan 28 2017: (Start)
a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3) for n>2.
G.f.: 2*(7 - 24*x + 32*x^2) / ((1 - x)*(1 - 2*x)*(1 - 4*x)).
(End)

A280293 a(0) = 3, a(n+1) = 2*a(n) + periodic sequence of length 2: repeat [-5, 4].

Original entry on oeis.org

3, 1, 6, 7, 18, 31, 66, 127, 258, 511, 1026, 2047, 4098, 8191, 16386, 32767, 65538, 131071, 262146, 524287, 1048578, 2097151, 4194306, 8388607, 16777218, 33554431, 67108866, 134217727, 268435458, 536870911, 1073741826, 2147483647, 4294967298, 8589934591
Offset: 0

Views

Author

Paul Curtz, Dec 31 2016

Keywords

Comments

From 1, the last digit is a periodic sequence of length 4:repeat [1, 6, 7, 8].

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,1,-2},{3,1,6},50] (* Paolo Xausa, Nov 13 2023 *)
  • PARI
    Vec((3-5*x+x^2) / ((1-x)*(1+x)*(1-2*x)) + O(x^40)) \\ Colin Barker, Dec 31 2016

Formula

a(2n) = 4^n + 2. a(2n+1) = 2*4^n - 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n>2.
a(n) = 2^n + periodic sequence of length 2: repeat [2, -1].
a(n) = 2^(n+2) - A280173(n).
a(n+2) = a(n) + 3*2^n, a(0) = 3, a(1) = 1.
G.f.: (3-5*x+x^2) / ((1-x)*(1+x)*(1-2*x)). - Colin Barker, Dec 31 2016

Extensions

More terms from Colin Barker, Dec 31 2016
Showing 1-6 of 6 results.