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 21-30 of 42 results. Next

A248216 a(n) = 6^n - 2^n.

Original entry on oeis.org

0, 4, 32, 208, 1280, 7744, 46592, 279808, 1679360, 10077184, 60465152, 362795008, 2176778240, 13060685824, 78364147712, 470184951808, 2821109841920, 16926659313664, 101559956406272, 609359739486208, 3656158439014400, 21936950638280704
Offset: 0

Views

Author

Vincenzo Librandi, Oct 04 2014

Keywords

Crossrefs

Sequences of the form k^n - 2^n: A001047 (k=3), A020522 (k=4), A005057 (k=5), this sequence (k=6), A190540 (k=7), A248217 (k=8), A191465 (k=9), A060458 (k=10), A139740 (k=11).

Programs

  • Magma
    [6^n-2^n: n in [0..25]];
    
  • Mathematica
    Table[6^n - 2^n, {n, 0, 25}] (* or *) CoefficientList[Series[4x/((1-2x)(1-6x)), {x, 0, 30}], x]
    LinearRecurrence[{8,-12},{0,4},30] (* Harvey P. Dale, Dec 21 2019 *)
  • Sage
    [2^n*(3^n -1) for n in (0..25)] # G. C. Greubel, Feb 09 2021

Formula

G.f.: 4*x/((1-2*x)*(1-6*x)).
a(n) = 8*a(n-1) - 12*a(n-2).
a(n) = 2^n*(3^n - 1) = A000079(n) * A024023(n).
E.g.f.: exp(6*x) - exp(2*x) = 2*exp(4*x)*sinh(2*x). - G. C. Greubel, Feb 09 2021
a(n) = 4*A016129(n-1). - R. J. Mathar, Mar 10 2022
a(n) = A000400(n) - A000079(n). - Bernard Schott, Mar 27 2022

A094266 LQTL Lean Quaternary Temporal Logic: a terse form of temporal logic created by assigning four descriptors such that false, becoming true, true and becoming false are represented and become a linear sequence. In a branching tree two alternative are open, change or no change. The integer sequence above is the count of the row possibilities of the four states over successive iterations.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 1, 0, 1, 3, 3, 1, 2, 4, 6, 4, 6, 6, 10, 10, 16, 12, 16, 20, 36, 28, 28, 36, 72, 64, 56, 64, 136, 136, 120, 120, 256, 272, 256, 240, 496, 528, 528, 496, 992, 1024, 1056, 1024, 2016, 2016, 2080, 2080, 4096, 4032, 4096, 4160, 8256, 8128, 8128, 8256, 16512
Offset: 0

Views

Author

Robert H Barbour and L. D. Painter, Jun 01 2004

Keywords

Comments

This is a table read by rows of length 4. Every row is formed from the previous one by the circular Pascal triangle-like rule: a, b, c, d -> d+a, a+b, b+c, c+d. Consider a labeled binary tree such that the root has label 0 and every node labeled k has children labeled k and (k+1) mod 4; the n-th row of this sequence counts nodes on the level n+1 with labels 0, 1, 2, 3, while the n-th row of A099423 counts nodes up to level n. - Andrey Zabolotskiy, Jan 06 2023

Crossrefs

Programs

  • Maple
    Algorithm available from Robert H Barbour

Formula

Appears to satisfy a 12-degree linear recurrence. - Ralf Stephan, Dec 04 2004

A095209 a(0) = 1, and for n > 0, a(n) = the least multiple of prime(n) such that the geometric mean of a(0) to a(n) is an integer.

Original entry on oeis.org

1, 4, 54, 3750, 504210, 372027810, 144949074270, 209481995953230, 164735296593157290, 401824316553919068810, 2721846739094340967339230, 5095936579799734140259818030, 48850362989361131638352534231610
Offset: 0

Views

Author

Amarnath Murthy, Jun 08 2004

Keywords

Examples

			(1*4*54*3750)^(1/4) = 30.
		

Crossrefs

Programs

Formula

From Antti Karttunen and Peter Munn, May 04 2022: (Start)
The n-th partial product of these terms = A002110(n)^(1+n), i.e., the n-th geometric mean is the n-th power of (n-1)-th primorial.
a(n) = A002110(n) * A307539(n).
a(n) = A057335(A020522(n)). [Found by LODA-miner, follows from the above formulas]
(End)

Extensions

Edited by Don Reble, Jan 06 2007
Starting offset changed from 1 to 0 and the definition accordingly edited by Antti Karttunen, May 04 2022

A014236 Expansion of g.f.: 2*x*(1-x)/((1-2*x)*(1-2*x^2)).

Original entry on oeis.org

0, 2, 2, 8, 12, 32, 56, 128, 240, 512, 992, 2048, 4032, 8192, 16256, 32768, 65280, 131072, 261632, 524288, 1047552, 2097152, 4192256, 8388608, 16773120, 33554432, 67100672, 134217728, 268419072, 536870912, 1073709056, 2147483648, 4294901760, 8589934592
Offset: 0

Views

Author

Paul F. Hudrlik (hudrlik(AT)scs.howard.edu)

Keywords

Comments

Number of symmetric chiral (optically active) isomers possible for organic compounds with n distinct carbon atoms.
A020522 interleaved with A004171 and apparently the number of asymmetric Dyck (n+2)-paths with exactly half of the steps lying between the first and last peaks; e.g. all asymmetric 3-paths (UU*DDU*D and U*DUU*DD) comply so a(1)=2. - David Scambler, Sep 14 2012

Crossrefs

Second differences of A027556.

Programs

  • GAP
    a:=[0,2,2];; for n in [4..30] do a[n]:=2*a[n-1]+2*a[n-2]-4*a[n-3]; od; a; # G. C. Greubel, Jun 22 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0] cat Coefficients(R!( 2*x*(1-x)/((1-2*x)*(1-2*x^2)) )); // G. C. Greubel, Jun 22 2019
    
  • Maple
    f := n -> if n mod 2 = 0 then 2^n-2^(n/2) else 2^n; fi;
  • Mathematica
    CoefficientList[Series[2x (1-x)/((1-2x)(1-2x^2)),{x,0,30}],x] (* or *) LinearRecurrence[{2,2,-4},{0,2,2},30] (* Harvey P. Dale, Dec 04 2018 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(2*x*(1-x)/((1-2*x)*(1-2*x^2)))) \\ G. C. Greubel, Jun 22 2019
    
  • Sage
    (2*x*(1-x)/((1-2*x)*(1-2*x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 22 2019
    

Formula

a(n) = 2*A007179(n). - R. J. Mathar, Nov 14 2011
From G. C. Greubel, Jun 22 2019: (Start)
a(n) = 2^((n - 2)/2)*(2^((n + 2)/2) - 1 - (-1)^n).
E.g.f.: exp(2*x) - cosh(sqrt(2)*x). (End)

Extensions

G.f. corrected by Olivier Gérard, Nov 13 2011

A037870 a(n) = (1/2)*Sum{|d(i)-e(i)|}, where Sum{d(i)*2^i} is base 2 representation of n and e(i) are digits d(i) in nonincreasing order, for i=0,1,...,m.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 2
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the minimum number of bit swap operations that needs to be performed to pack all the bits of n to the right. - Philippe Beaudoin, Aug 20 2014
a(n) = 0 if A243109(n) = n; 1 + a(A243109(n)) otherwise. - Philippe Beaudoin, Aug 20 2014
The index of the k-th record of this sequence is A020522(k) and corresponds to k ones followed by k zeros. - Philippe Beaudoin, Aug 20 2014

Crossrefs

Programs

  • Maple
    a:= proc(n) local L,m;
    L:= convert(n,base,2);
    m:= convert(L,`+`);
    m - convert(L[1..m],`+`);
    end proc:
    seq(a(n),n=1..100); # Robert Israel, Aug 20 2014
  • Mathematica
    A037870[n_] := Total[Abs[# - Sort[#]]/2] & [IntegerDigits[n, 2]];
    Array[A037870, 100] (* Paolo Xausa, Mar 07 2025 *)
  • PARI
    a(n) = {d = binary(n); e = vecsort(d); sum(i=1, #d, abs(d[i]-e[i]))/2;} \\ Michel Marcus, Aug 20 2014

Extensions

Definition swapped with A037879. - R. J. Mathar, Oct 19 2015

A045678 Number of 2n-bead balanced binary necklaces which are equivalent to their reversed complement, but not equivalent to their reverse and complement.

Original entry on oeis.org

0, 0, 0, 2, 4, 12, 26, 56, 116, 240, 492, 992, 2010, 4032, 8120, 16256, 32628, 65280, 130800, 261632, 523756, 1047552, 2096096, 4192256, 8386522, 16773120, 33550272, 67100672, 134209464, 268419072, 536854400, 1073709056, 2147450740
Offset: 0

Views

Author

Keywords

Comments

The number of 2n-bead balanced binary necklaces which are equivalent to their reversed complement is A011782(n) and those which are equivalent to their reverse, complement and reversed complement is A045674(n). - Andrew Howroyd, Sep 28 2017

Crossrefs

Programs

  • Mathematica
    (* b = A011782, c = A045674 *)
    b[0] = 1; b[n_] := 2^(n - 1);
    c[0] = 1; c[n_] := c[n] = If[EvenQ[n], 2^(n/2-1) + c[n/2], 2^((n-1)/2)];
    a[n_] := b[n] - c[n];
    Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)

Formula

a(2n+1) = A020522(n) = 4^n - 2^n. - Max Alekseyev, Jan 13 2006
a(n) = A011782(n) - A045674(n). - Andrew Howroyd, Sep 28 2017

A174718 Triangle T(n, k, q) = (1-q^n)*( binomial(n, k) - 1 ) + 1, with q = 2, read by rows.

Original entry on oeis.org

1, 1, 1, 1, -2, 1, 1, -13, -13, 1, 1, -44, -74, -44, 1, 1, -123, -278, -278, -123, 1, 1, -314, -881, -1196, -881, -314, 1, 1, -761, -2539, -4317, -4317, -2539, -761, 1, 1, -1784, -6884, -14024, -17594, -14024, -6884, -1784, 1, 1, -4087, -17884, -42412, -63874, -63874, -42412, -17884, -4087, 1
Offset: 0

Views

Author

Roger L. Bagula, Mar 28 2010

Keywords

Comments

The row sums of this class of sequences, for varying q, is given by Sum_{k=0..n} T(n, k, q) = q^n * (n+1) + 2^n * (1 - q^n). - G. C. Greubel, Feb 09 2021

Examples

			Triangle begins as:
  1;
  1,     1;
  1,    -2,      1;
  1,   -13,    -13,      1;
  1,   -44,    -74,    -44,      1;
  1,  -123,   -278,   -278,   -123,      1;
  1,  -314,   -881,  -1196,   -881,   -314,      1;
  1,  -761,  -2539,  -4317,  -4317,  -2539,   -761,      1;
  1, -1784,  -6884, -14024, -17594, -14024,  -6884,  -1784,     1;
  1, -4087, -17884, -42412, -63874, -63874, -42412, -17884, -4087, 1;
		

Crossrefs

Cf. A000012 (q=1), this sequence (q=2), A174719 (q=3), A174720 (q=4).

Programs

  • Magma
    T:= func< n,k,q | 1 + (1-q^n)*(Binomial(n,k) -1) >;
    [T(n,k,2): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 09 2021
  • Mathematica
    T[n_, k_, q_]:= 1 +(1-q^n)*(Binomial[n, k] -1);
    Table[T[n,k,2], {n,0,12}, {k,0,n}]//Flatten
  • Sage
    def T(n,k,q): return 1 + (1-q^n)*(binomial(n,k) - 1)
    flatten([[T(n,k,2) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 09 2021
    

Formula

T(n, k, q) = (1-q^n)*( binomial(n, k) - 1 ) + 1, with q=2.
Sum_{k=0..n} T(n, k, 2) = 2^n *(n + 2 - 2^n) = A001787(n+1) - A020522(n). - G. C. Greubel, Feb 09 2021

Extensions

Edited by G. C. Greubel, Feb 09 2021

A216649 Triangle T(n,k) in which n-th row lists in increasing order all positive integers with a representation as totally balanced 2n digit binary string such that all consecutive totally balanced substrings are in nondecreasing order; n>=1, 1<=k<=A000081(n+1).

Original entry on oeis.org

2, 10, 12, 42, 44, 52, 56, 170, 172, 180, 184, 204, 212, 216, 232, 240, 682, 684, 692, 696, 716, 724, 728, 744, 752, 820, 824, 852, 856, 872, 880, 920, 936, 944, 976, 992, 2730, 2732, 2740, 2744, 2764, 2772, 2776, 2792, 2800, 2868, 2872, 2900, 2904, 2920, 2928
Offset: 1

Views

Author

Alois P. Heinz, Sep 12 2012

Keywords

Comments

There is a simple bijection between the elements of row n and the rooted trees with n+1 nodes. The tree has a root node. Each matching pair (1,0) in the binary string representation encodes an additional node, the totally balanced substrings encode lists of subtrees.

Examples

			172 is element of row 4, the binary string representation (with totally balanced substrings enclosed in parentheses) is (10)(10)(1(10)0).  The encoded rooted tree is:
.    o
.   /|\
.  o o o
.      |
.      o
Triangle T(n,k) begins:
2;
10,     12;
42,     44,   52,   56;
170,   172,  180,  184,  204,  212,  216,  232,  240;
682,   684,  692,  696,  716,  724,  728,  744,  752,  820,  824, ...
2730, 2732, 2740, 2744, 2764, 2772, 2776, 2792, 2800, 2868, 2872, ...
Triangle T(n,k) in binary:
10;
1010,       1100;
101010,     101100,     110100,     111000;
10101010,   10101100,   10110100,   10111000,   11001100,   11010100, ...
1010101010, 1010101100, 1010110100, 1010111000, 1011001100, 1011010100, ...
		

Crossrefs

First column gives: A020988.
Last elements of rows give: A020522.
Row lengths are: A000081(n+1).
Subsequence of A014486, A031443.

Programs

  • Maple
    F:= proc(n) option remember; `if`(n=1, [10], sort(map(h->
          parse(cat(1, sort(h)[], 0)), g(n-1, n-1)))) end:
    g:= proc(n, i) option remember; `if`(i=1, [[10$n]], [seq(seq(seq(
          [seq (F(i)[w[t]-t+1], t=1..j),v[]], w=combinat[choose](
          [$1..nops(F(i))+j-1], j)), v=g(n-i*j, i-1)), j=0..n/i)])
        end:
    b:= proc(n) local h, i, r; h, r:= n/10, 0; for i from 0
          while h>1 do r:= r+2^i*irem(h, 10, 'h') od; r
        end:
    T:= proc(n) option remember; map(b, F(n+1))[] end:
    seq(T(n), n=1..6);

Formula

T(n,k) = A216648(n+1,k)/2 - 2^(2*n).

A248337 a(n) = 6^n - 4^n.

Original entry on oeis.org

0, 2, 20, 152, 1040, 6752, 42560, 263552, 1614080, 9815552, 59417600, 358602752, 2160005120, 12993585152, 78095728640, 469111242752, 2816814940160, 16909479575552, 101491237191680, 609084862103552, 3655058928435200, 21932552593866752, 131604111656222720, 789659854309425152, 4738099863344906240, 28429162130022858752
Offset: 0

Views

Author

Vincenzo Librandi, Oct 05 2014

Keywords

Crossrefs

Cf. sequences of the form k^n - 4^n: -A000302 (k=0), -A024036 (k=1), -A020522 (k=2), -A005061 (k=3), A005060 (k=5), this sequence (k=6), A190542 (k=7), A059409 (k=8), A118004 (k=9), A248338 (k=10), A139742 (k=11), 8*A016159 (k=12).

Programs

  • Magma
    [6^n-4^n: n in [0..30]];
    
  • Mathematica
    Table[6^n - 4^n, {n,0,30}]
    CoefficientList[Series[(2 x)/((1-4 x)(1-6 x)), {x, 0, 30}], x]
    LinearRecurrence[{10,-24},{0,2},30] (* Harvey P. Dale, Aug 18 2024 *)
  • PARI
    vector(20,n,6^(n-1)-4^(n-1)) \\ Derek Orr, Oct 05 2014
    
  • SageMath
    A248337=BinaryRecurrenceSequence(10,-24,0,2)
    [A248337(n) for n in range(31)] # G. C. Greubel, Nov 11 2024

Formula

G.f.: 2*x/((1-4*x)*(1-6*x)).
a(n) = 10*a(n-1) - 24*a(n-2).
a(n) = 2^n*(3^n-2^n) = A000079(n) * A001047(n) = A000400(n) - A000302(n).
a(n) = 2*A081199(n). - Bruno Berselli, Oct 05 2014
E.g.f.: 2*exp(5*x)*sinh(x). - G. C. Greubel, Nov 11 2024

Extensions

More terms added by G. C. Greubel, Nov 11 2024

A055891 CIK (necklace, indistinct, unlabeled) transform of powers of 2.

Original entry on oeis.org

1, 2, 7, 20, 64, 200, 686, 2324, 8194, 29084, 104860, 381116, 1398148, 5161592, 19173958, 71580752, 268435474, 1010572832, 3817749138, 14467230668, 54975581488, 209430687944, 799644820114, 3059510251700, 11728124035248
Offset: 0

Views

Author

Christian G. Bower, Jun 09 2000

Keywords

Comments

From Petros Hadjicostas, Dec 06 2017: (Start)
The g.f. is clear from J. Arndt's PARI program below.
The CIK transform of sequence (a(n): n>=1} with g.f. A(x) = Sum_{n>=1} a(n)*x^n has g.f. CIK(A(x)) = 1 - Sum_{n>=1} (phi(n)/n)*log(1-A(x^n)). Sometimes, the constant 1 is dropped from the formula. Here, A(x) = 2*x/(1-2*x).
To find the auxiliary sequence (c(n): n>=1} used in the formula a(n) = (1/n)*Sum_{d|n} phi(n/d)*c(d), we use the formula C(x) = Sum_{n>=1} c(n)*x^n = x*(dA(x)/dx)/(1-A(x)). Here, C(x) = 2*x/((1-4*x)*(1-2*x)), from which we can prove that c(n) = 2^n*(2^n-1) = A020522(n).
(End)

Crossrefs

Programs

  • Mathematica
    {1}~Join~Table[(1/n) DivisorSum[n, EulerPhi[n/#] *2^#*(2^# - 1) &], {n, 24}] (* Michael De Vlieger, Dec 06 2017 *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    f(x)=sum(n=1,N, 2^n*x^n );
    gf = 1 + sum(n=1,N, eulerphi(n)/n*log(1/(1-f(x^n)))  );
    v = Vec(gf)
    /* Joerg Arndt, Jan 21 2013 */

Formula

From Petros Hadjicostas, Dec 06 2017: (Start)
a(n) = (1/n)*Sum_{d|n} phi(n/d)*2^d*(2^d-1) = (1/n)*Sum_{d|n} phi(n/d)*A020522(d) for n >= 1.
G.f.: 1 - Sum_{n>=1} (phi(n)/n)*log((1-4*x^n)/(1-2*x^n)).
(End)
Previous Showing 21-30 of 42 results. Next