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 11-20 of 53 results. Next

A112739 Array counting nodes in rooted trees of height n in which the root and internal nodes have valency k (and the leaf nodes have valency one).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 5, 2, 1, 1, 5, 10, 7, 2, 1, 1, 6, 17, 22, 9, 2, 1, 1, 7, 26, 53, 46, 11, 2, 1, 1, 8, 37, 106, 161, 94, 13, 2, 1, 1, 9, 50, 187, 426, 485, 190, 15, 2, 1, 1, 10, 65, 302, 937, 1706, 1457, 382, 17, 2, 1, 1, 11, 82, 457, 1814, 4687, 6826, 4373, 766, 19
Offset: 0

Views

Author

Paul Barry, Sep 16 2005

Keywords

Comments

Rows of the square array have g.f. (1+x)/((1-x)(1-kx)). They are the partial sums of the coordination sequences for the infinite tree of valency k. Row sums are A112740.
Rows of the square array are successively: A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, A238275, A238276, A138894, A090843, A199023. - Philippe Deléham, Feb 22 2014

Examples

			As a square array, rows begin
1,1,1,1,1,1,... (A000012)
1,2,2,2,2,2,... (A040000)
1,3,5,7,9,11,... (A005408)
1,4,10,22,46,94,... (A033484)
1,5,17,53,161,485,... (A048473)
1,6,26,106,426,1706,... (A020989)
1,7,37,187,937,4687,... (A057651)
1,8,50,302,1814,10886,... (A061801)
As a number triangle, rows start
1;
1,1;
1,2,1;
1,3,2,1;
1,4,5,2,1;
1,5,10,7,2,1;
		

References

  • L. He, X. Liu and G. Strang, (2003) Trees with Cantor Eigenvalue Distribution. Studies in Applied Mathematics 110 (2), 123-138.
  • L. He, X. Liu and G. Strang, Laplacian eigenvalues of growing trees, Proc. Conf. on Math. Theory of Networks and Systems, Perpignan (2000).

Crossrefs

Formula

As a square array read by antidiagonals, T(n, k)=sum{j=0..k, (2-0^j)*(n-1)^(k-j)}; T(n, k)=(n(n-1)^k-2)/(n-2), n<>2, T(2, n)=2n+1; T(n, k)=sum{j=0..k, (n(n-1)^j-0^j)/(n-1)}, j<>1. As a triangle read by rows, T(n, k)=if(k<=n, sum{j=0..k, (2-0^j)*(n-k-1)^(k-j)}, 0).

A171476 a(n) = 6*a(n-1) - 8*a(n-2) for n > 1, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 28, 120, 496, 2016, 8128, 32640, 130816, 523776, 2096128, 8386560, 33550336, 134209536, 536854528, 2147450880, 8589869056, 34359607296, 137438691328, 549755289600, 2199022206976, 8796090925056, 35184367894528
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Binomial transform of A048473; second binomial transform of A151821; third binomial transform of A010684; fourth binomial transform of A084633 without second term 0; fifth binomial transform of A168589.
Inverse binomial transform of A081625; second inverse binomial transform of A081626; third inverse binomial transform of A081627.
Partial sums of A010036.
Essentially first differences of A006095.
a(n) = A109241(n) converted from binary to decimal. - Robert Price, Jan 19 2016
a(n) is the area enclosed by a Hilbert curve with unit length segments after n iterations, when the start and end points are joined. - Jennifer Buckley, Apr 23 2024

Crossrefs

Cf. A006516 (2^(n-1)*(2^n-1)), A020522 (4^n-2^n), A048473 (2*3^n-1), A151821 (powers of 2, omitting 2 itself), A010684 (repeat 1, 3), A084633 (inverse binomial transform of repeated odd numbers), A168589 ((2-3^n)*(-1)^n), A081625 (2*5^n-3^n), A081626 (2*6^n-4^n), A081627 (2*7^n-5^n), A010036 (sum of 2^n, ..., 2^(n+1)-1), A006095 (Gaussian binomial coefficient [n, 2] for q=2), A171472, A171473.

Programs

  • Magma
    [2*4^n-2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
  • Mathematica
    LinearRecurrence[{6,-8},{1,6},30] (* Harvey P. Dale, Aug 02 2020 *)
  • PARI
    m=23; v=concat([1, 6], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]); v
    

Formula

a(n) = Sum_{k=1..2^n-1} k.
a(n) = 2*4^n - 2^n.
G.f.: 1/((1-2*x)*(1-4*x)).
a(n) = A006516(n+1).
a(n) = 4*a(n-1) + 2^n for n > 0, a(0)=1. - Vincenzo Librandi, Jul 17 2011
a(n) = Sum_{k=0..n} 2^(n+k). - Bruno Berselli, Aug 07 2013
a(n) = A020522(n+1)/2. - Hussam al-Homsi, Jun 06 2021
E.g.f.: exp(2*x)*(2*exp(2*x) - 1). - Stefano Spezia, Dec 10 2021

A198480 a(n) = 2*7^n - 1.

Original entry on oeis.org

1, 13, 97, 685, 4801, 33613, 235297, 1647085, 11529601, 80707213, 564950497, 3954653485, 27682574401, 193778020813, 1356446145697, 9495123019885, 66465861139201, 465261027974413, 3256827195820897, 22797790370746285
Offset: 0

Views

Author

Vincenzo Librandi, Oct 27 2011

Keywords

Crossrefs

Programs

Formula

a(n) = 7*a(n-1)+6, n>0.
G.f.: (1+5*x)/((1-x)*(1-7*x)). - Vincenzo Librandi, Jul 06 2012
a(n) = 8*a(n-1) -7*a(n-2). - Vincenzo Librandi, Jul 06 2012

A048471 Array T read by diagonals: T(k,n) = 2^(k-1) * (3^n - 1) + 1.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 14, 9, 5, 1, 41, 27, 17, 9, 1, 122, 81, 53, 33, 17, 1, 365, 243, 161, 105, 65, 33, 1, 1094, 729, 485, 321, 209, 129, 65, 1, 3281, 2187, 1457, 969, 641, 417, 257, 129, 1, 9842, 6561, 4373, 2913, 1937, 1281, 833, 513
Offset: 0

Views

Author

Keywords

Examples

			Diagonals (each starting on row 1): {1}; {2,1}; {5,3,1}; ...
		

Crossrefs

Row 1 = (1, 2, 5, 14, 41, ...) = A007051.
Row 2 = (1, 3, 9, 27, 81, ...) = A000244.
Other rows: A048473 (k=2), A036543 (k=3), A036545 (k=4), A036546 (k=5), A036547 (k=6), A036548 (k=7), A036549 (k=8).
Diagonal is A036551, antidiagonal sums are A036550.

Formula

n-th difference of (T(k, n), T(k, n-1), ..., T(k, 0)) is 2^(n+k-1), for n=1, 2, 3, ...; k=0, 1, 2, ...

Extensions

Simpler definition from Ralf Stephan, Feb 17 2004

A060188 A column and diagonal of A060187.

Original entry on oeis.org

1, 6, 23, 76, 237, 722, 2179, 6552, 19673, 59038, 177135, 531428, 1594309, 4782954, 14348891, 43046704, 129140145, 387420470, 1162261447, 3486784380, 10460353181, 31381059586, 94143178803, 282429536456, 847288609417
Offset: 2

Views

Author

N. J. A. Sloane, Mar 20 2001

Keywords

Comments

Sums of rows of the numerators and of the denominators of the redundant Stern-Brocot structure A152975/A152976: a(n+2) = Sum_{k=2^n..(2^(n+1) -1)} A152975(k) = Sum_{k=2^n..(2^(n+1) -1)} A152976(k). - Reinhard Zumkeller, Dec 22 2008

Crossrefs

Cf. A048473, A060187 (first differences).

Programs

Formula

a(n) = 3^(n-1) - n = A061980(n-1, 2). - Henry Bottomley, May 24 2001
From Paul Barry, Jun 24 2003: (Start)
With offset 0, this is 3^(n+1) - n - 2.
Partial sums of A048473. (End)
From Colin Barker, Dec 19 2012: (Start)
a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3).
G.f.: x^2*(1 + x)/((1-x)^2*(1-3*x)). (End)
E.g.f.: (exp(3*x) - 3*x*exp(x) - 1)/3. - Wolfdieter Lang, Apr 17 2017

Extensions

More terms from Vladeta Jovovic, Mar 20 2001

A119725 Triangular array read by rows: T(n,1) = T(n,n) = 1, T(n,k) = 3*T(n-1,k-1) + 2*T(n-1,k).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 13, 17, 1, 1, 29, 73, 53, 1, 1, 61, 233, 325, 161, 1, 1, 125, 649, 1349, 1297, 485, 1, 1, 253, 1673, 4645, 6641, 4861, 1457, 1, 1, 509, 4105, 14309, 27217, 29645, 17497, 4373, 1, 1, 1021, 9737, 40933, 97361, 140941, 123929, 61237, 13121, 1
Offset: 1

Views

Author

Zerinvary Lajos, Jun 14 2006

Keywords

Comments

Second column is like A036563.
Second diagonal is A048473.

Examples

			Triangle begins:
  1;
  1,    1;
  1,    5,    1;
  1,   13,   17,     1;
  1,   29,   73,    53,     1;
  1,   61,  233,   325,   161,      1;
  1,  125,  649,  1349,  1297,    485,      1;
  1,  253, 1673,  4645,  6641,   4861,   1457,     1;
  1,  509, 4105, 14309, 27217,  29645,  17497,  4373,     1;
  1, 1021, 9737, 40933, 97361, 140941, 123929, 61237, 13121, 1;
		

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k eq 1 or k eq n then return 1;
      else return 3*T(n-1,k-1) + 2*T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    T:= proc(n, k) option remember;
          if k=1 and k=n then 1
        else 3*T(n-1, k-1) + 2*T(n-1, k)
          fi
        end:
    seq(seq(T(n, k), k=1..n), n=1..12); # G. C. Greubel, Nov 18 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, 3*T[n-1, k-1] + 2*T[n-1, k]]; Table[T[n,k], {n,10}, {k,n}]//Flatten (* G. C. Greubel, Nov 18 2019 *)
  • PARI
    T(n,k) = if(k==1 || k==n, 1, 3*T(n-1,k-1) + 2*T(n-1,k)); \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==1 or k==n): return 1
        else: return 3*T(n-1, k-1) + 2*T(n-1, k)
    [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 18 2019

Extensions

Edited by Don Reble, Jul 24 2006

A171884 Lexicographically earliest injective nonnegative sequence a(n) satisfying |a(n+1) - a(n)| = n for all n.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 64, 40, 65, 39, 66, 38, 67, 37, 68, 36, 69, 35, 70, 34, 71, 33, 72, 32, 73, 31, 74, 30, 75, 29, 76, 28, 77, 27, 78, 26, 79, 133, 188, 132, 189, 131, 190, 130, 191, 129, 192, 128, 193, 127, 194
Offset: 1

Views

Author

Robert Munafo, Mar 11 2010

Keywords

Comments

The map n -> a(n) is an injective map to the nonnegative integers, i.e., no two terms are identical.
Appears not to contain numbers from the following sets (grouped intentionally): {4, 5}, {14, 15, 16, 17, 18, 19}, {44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61}, etc. The numbers of terms in these groups appears to be A008776. - Paul Raff, Mar 15 2010 [This is correct: by the formula below, a(2*3^k+1...2*3^(k+1)) take all the values in the range [3^(k+1)-1, 5*3^k-2] U [7*3^k-1, 3^(k+2)-2], so the numbers not appearing are those in the range [5*3^k-1, 7*3^k-2] for some k. - Jianing Song, Oct 07 2022]
The first 23 terms are shared with Recamán's sequence A005132, but from then on they are different. - Philippe Deléham, Mar 01 2013, Omar E. Pol, Jul 01 2013
From M. F. Hasler, May 09 2013: (Start)
It appears that the starting points of the gaps (4, 14, 44, 134, 404, 1214, ...) are given by A181655(2n) = A198643(n-1), and thus the ending points (5, 19, 61, ...) by A181655(2n) + A048473(n-1).
The first differences have signs (grouped intentionally): +++, -, +++, -+-+-+-+- (5 times "-"), +++, -+...+- (17 times "-"), +++, ... where the number of minus signs is again given by A048473 = A008776-1. (End)
A correspondent, Dennis Reichard, conjectures that (i) a(n) <= 3.5*n for all n and (ii) the sequence covers 2/3 of all natural numbers. - N. J. A. Sloane, Jun 30 2018 [(i) is true: the indices of records for a(n)/n are n = 1, 2, 3, 4, 6, 7, and 2*3^k+2 for k >= 1, with record values 0, 1/2, 1, 1, 3/2, 7/6, 13/7, and (7*3^k-1)/(2*3^k+2) for k >= 1, so a(n) <= 3.5*n. (ii) needs further justification: the lower natural density is lim_{k->+oo} #{terms <= 7*3^k-2}/(7*3^k-2) = lim_{k->+oo} (4*3^k-1)/(7*3^k-2) = 4/7, and the upper natural density is lim_{k->+oo} #{terms <= 5*3^k-2}/(5*3^k-2) = lim_{k->+oo} (4*3^k-1)/(5*3^k-2) = 4/5. - Jianing Song, Oct 07 2022]

Examples

			We begin with 0, 0+1=1, 1+2=3. 3-3=0 cannot be the next term because 0 is already in the sequence so we go to 3+3=6. The next could be 6-4=2 or 6+4=10 but we choose 2 because it is smaller.
		

Crossrefs

Cf. A005132, which allows duplicate values.
Cf. also A118201, in which every value of a(n) and of |a(n+1)-a(n)| occurs exactly once, but does not ensure that the latter is strictly increasing.

Programs

  • Mathematica
    A171884[{}, , ] := {};
    A171884[L_List, max_Integer, True] := If[Length[L] == max, L, With[{n = Length[L]},
      If[Last[L] - n < 1 || MemberQ[L, Last[L] - n],
        If[MemberQ[L, Last[L] + n],
           A171884[Drop[L, -1], max, False],
           A171884[Append[L, Last[L] + n], max, True]],
        A171884[Append[L, Last[L] - n], max, True]]]]
    A171884[L_List, max_Integer, False] := With[{n = Length[L]},
      If[MemberQ[L, Last[L] + n],
         A171884[Drop[L, -1], max, False],
         A171884[Append[L, Last[L] + n], max, True]]]
    A171884[{0}, 200, True] (* Paul Raff, Mar 15 2010 *)
  • PARI
    A171884_upto(N,a=0,t=2)=vector(N,k, a+=if(!bitand(k,1), k-1, t-=1, 1-k, t=k-1)) \\ or:
    A171884_upto(N,a)=vector(N,k,a+=if(bitand(k,1)&&k\2!=3^valuation(k-(k>1),3),1-k,k-1)) \\ M. F. Hasler, Apr 05 2019
    a(n) = if(n<=2, n-1, my(k=logint((n-1)\2, 3), r=n-2*3^k); if(r%2, 5*3^k-1-(r+1)/2, 7*3^k-2+r/2)) \\ Jianing Song, Oct 07 2022

Formula

a(n+1) = a(n) +- n with - iff n is even but not n = 2 + 2*3^k. (Cf. comment from May 09 2013.) - M. F. Hasler, Apr 05 2019
a(2*3^k + 2*r - 1) = 5*3^k - 1 - r, a(2*3^k + 2*r) = 7*3^k - 2 + r, for k >= 0 and 1 <= r <= 2*3^k. - Jianing Song, Oct 07 2022

Extensions

Definition edited by M. F. Hasler, Apr 01 2019

A198643 a(n) = 5*3^n-1.

Original entry on oeis.org

4, 14, 44, 134, 404, 1214, 3644, 10934, 32804, 98414, 295244, 885734, 2657204, 7971614, 23914844, 71744534, 215233604, 645700814, 1937102444, 5811307334, 17433922004, 52301766014, 156905298044, 470715894134, 1412147682404, 4236443047214
Offset: 0

Views

Author

Vincenzo Librandi, Oct 28 2011

Keywords

Crossrefs

Programs

  • Magma
    [5*3^n-1: n in [0..30]];
    
  • Mathematica
    5*3^Range[0, 30] - 1 (* or *)
    NestList[3*# + 2 &, 4, 30] (* Paolo Xausa, Aug 28 2024 *)
  • PARI
    a(n)=5*3^n-1 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = 3*a(n-1)+2 = 2*A060816(n+1).
G.f.: ( 4-2*x ) / ( (3*x-1)*(x-1) ). - R. J. Mathar, Nov 17 2011

A080960 Third binomial transform of A010685 (period 2: repeat 1,4).

Original entry on oeis.org

1, 7, 34, 148, 616, 2512, 10144, 40768, 163456, 654592, 2619904, 10482688, 41936896, 167759872, 671064064, 2684305408, 10737319936, 42949476352, 171798298624, 687193980928, 2748777496576, 10995113132032, 43980458819584
Offset: 0

Views

Author

Paul Barry, Mar 03 2003

Keywords

Crossrefs

Programs

  • Magma
    binomtf:=func< V | [ &+[ Binomial(i-1, k-1)*V[k]: k in [1..i] ]: i in [1..#V] ] >; binomtf(binomtf(binomtf(&cat[ [1, 4]: n in [1..12] ]))); // Klaus Brockhaus, Nov 26 2009
    
  • Mathematica
    RecurrenceTable[{a[0]==1,a[n]==4a[n-1]+3*2^(n-1)},a,{n,30}] (* or *) LinearRecurrence[{6,-8},{1,7},30] (* Harvey P. Dale, Nov 12 2012 *)
    CoefficientList[Series[(1+x)/((1-2x)(1-4x)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 06 2013 *)
  • Sage
    [2^(n-1)*(5*2^n -3) for n in (0..30)] # G. C. Greubel, Nov 23 2021

Formula

a(n) = 4*a(n-1) + 3*2^(n-1).
a(n) = (5/2)*4^n - (3/2)*2^n.
G.f.: (1+x)/((1-2*x)*(1-4*x)). - Klaus Brockhaus, Nov 26 2009
a(n) = 6*a(n-1) - 8*a(n-2), a(0)=1, a(1)=7. - Harvey P. Dale, Nov 12 2012
E.g.f.: exp(2*x)*(5*exp(2*x) - 3)/2. - G. C. Greubel, Nov 23 2021

Extensions

Definition corrected, edited by Klaus Brockhaus, Nov 26 2009

A096252 Array read by rows, starting with n=0: row n lists A057077(n+1)*8^(n+1)/2, A057077(n+2)*8^(n+1)/2, A057077(n+1)*8^(n+1).

Original entry on oeis.org

4, -4, 8, -32, -32, -64, -256, 256, -512, 2048, 2048, 4096, 16384, -16384, 32768, -131072, -131072, -262144, -1048576, 1048576, -2097152, 8388608, 8388608, 16777216, 67108864, -67108864, 134217728, -536870912, -536870912, -1073741824
Offset: 0

Views

Author

Creighton Dement, Jul 31 2004

Keywords

Comments

a(n) = ves( ('i + 'ii' + 'ij' + 'ik')^n ) a(n) = ves( ('j + 'jj' + 'ji' + 'jk')^n ) a(n) = ves( ('k + 'kk' + 'ki' + 'kj')^n ).
The elements x = 'i + 'ii' + 'ij' + 'ik'; y = 'j + 'jj' + 'ji' + 'jk'; and z = 'k + 'kk' + 'ki' + 'kj' are elements of the ring generated from the quaternion factor space Q X Q / {(1,1), (-1,-1)}. Each is represented by a gray shaded area of "Floret's cube". The elements x/2, y/2, z/2 are members of a group, itself a subset of the real algebra generated from Q X Q / {(1,1), (-1,-1)}, which is isomorphic to Q X C_3 (order 24).
This sequence is the term-wise sum of three sequences: a(n) = ves(x^n) = jes(x^n) + les(x^n) + tes(x^n), where jes(x^n)=(1, -6, 8, -24, 16, 0, -64, 384, -512, 1536, -1024, 0, 4096, -24576, 32768, -98304, ...), les(x^n)=(3, 0, 0, 0, -48, 0 -192, 0, 0, 0, 3072, 0, 12288, 0, 0, 0, ...), tes(x^n)=(0, 2, 0, -8, 0, -64, 0, -128, 0, 512, 0, 4096, 0, 8192, 0, -32768, ...). Concerning "les"- notice that if (..., s, 0, 0, 0, t, ...), then t = -16s and if (..., s, 0, t, ...), then t = 4s.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[4(1-x-2x^2-4x^3)/(1-4x^2+16x^4),{x,0,40}],x] (* or *) LinearRecurrence[ {0,4,0,-16},{4,-4,8,-32},40] (* Harvey P. Dale, Feb 15 2024 *)
  • Sage
    [(-1)^(floor((floor(n/3)+((n%3)%2)+1)/2)) * 8^(floor(n/3)+1) / 2^(((n+1)^2)%3) for n in range(30)]
    # Danny Rorabaugh, May 13 2016

Formula

a(n)= 4*a(n-2)-16*a(n-4). G.f.: 4*(1-x-2*x^2-4*x^3)/(1-4*x^2+16*x^4). - R. J. Mathar, Nov 26 2008
a(n) = (-1)^(floor((floor(n/3)+((n mod 3) mod 2)+1)/2)) * 8^(floor(n/3)+1) / 2^(((n+1)^2) mod 3). - Danny Rorabaugh, May 13 2016
a(n) = 4*(-1)^floor((n+1)/2)*A138230(n). - R. J. Mathar, May 21 2019

Extensions

Edited with clearer definition by Omar E. Pol, Dec 29 2008
Previous Showing 11-20 of 53 results. Next