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

A005578 a(2*n) = 2*a(2*n-1), a(2*n+1) = 2*a(2*n)-1.

Original entry on oeis.org

1, 1, 2, 3, 6, 11, 22, 43, 86, 171, 342, 683, 1366, 2731, 5462, 10923, 21846, 43691, 87382, 174763, 349526, 699051, 1398102, 2796203, 5592406, 11184811, 22369622, 44739243, 89478486, 178956971, 357913942, 715827883, 1431655766, 2863311531, 5726623062, 11453246123
Offset: 0

Views

Author

Keywords

Comments

Might be called the "Arima sequence" after Yoriyuki Arima who in 1769 constructed this sequence as the number of moves of the outer ring in the optimal solution for the Chinese Rings puzzle (baguenaudier). - Andreas M. Hinz, Feb 15 2017
Let u(k), v(k), w(k) be the 3 sequences defined by u(1)=1, v(1)=0, w(1)=0 and u(k+1) = u(k) + v(k), v(k+1) = u(k) + w(k), w(k+1) = v(k) + w(k); let M(k) = Max(u(k), v(k), w(k)); then a(n) = M(n). - Benoit Cloitre, Mar 25 2002
Unimodal analog of Fibonacci numbers: a(n+1) = Sum_{k=0..n/2} A071922(n-k, n-2*k). Based on the observation that F_{n+1} = Sum_{k} binomial (n-k, k). - Michele Dondi (bik.mido(AT)tiscalinet.it), Jun 30 2002
Numbers n at which the length of the symmetric signed digit expansion of n with q=2 (i.e., the length of the representation of n in the (-1,0,1)2 number system) increases. - _Ralf Stephan, Jun 30 2003
Row sums of Riordan array (1/(1-x), x/(1-2*x^2)). - Paul Barry, Apr 24 2005
For n > 0, record-values of A107910: a(n) = A107910(A023548(n)). - Reinhard Zumkeller, May 28 2005
2^(n+1) = 2*a(n) + 2*A001045(n) + A000975(n-1); e.g., 2^6 = 64 = 2*a(5) + 2*A001045(5) + 2*A000975(4) = 2*11 + 2*11 + 2*10. Let a(n), A001045(n) and A000975(n-1) = the legs of a triangle (a, b, c). Then a(n-1), A001045(n-1) and A000975(n-2) = (S-c), (S-b), (S-a), where S = the triangle semiperimeter. Example: a(5), A001045(5) and A000975(4) = triangle (a, b, c) = (11, 11, 10). Then a(4), A001045(4), A000975(3) = (S-c), (S-b), (S-a) = (6, 5, 5). - Gary W. Adamson, Dec 24 2007
a(n) is the number of length-n binary representations of a nonnegative integer that is divisible by 3. The initial digits are allowed to be 0's. a(4) = 6 because we have 0000, 0011, 0110, 1001, 1100, 1111. - Geoffrey Critzer, Jan 13 2014
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [1, 0, 1; 0, 1, 1; 1, 1, 0] or of the 3 X 3 matrix [1, 1, 0; 1, 0, 1; 0, 1, 1]. - R. J. Mathar, Feb 04 2014
With 0 prefixed, this sequence is an autosequence of the first kind because the sequence of first differences A001045 is. Its companion is A052950. - Paul Curtz, Dec 18 2018, edited by M. F. Hasler, Dec 21 2018
Apparently, the sequence gives the distinct values taken by A129761, the first differences of fibbinary numbers. - Rémy Sigrist, Oct 26 2019
The sequence with offset 1 can be generated in three steps starting with A158780. First, put in alternate signs (1, -1, 1, -2, 2, -4, ...) and take the inverse; getting (1, 1, 0, 1, 1, 2, 3, 5, 8, 13, 21, ...). Take the invert transform of the latter, resulting in the sequence. It follows from the inverti transform being 1, 1, 0, 1, 1, 2, 3, ... that (for example), a(9) = 171 = (1, 1, 0, 1, 1, 2, 3, 5, 8) dot (86, 43, 0, 11, 6, 6, 6, 5, 8) = (86 + 43 + 0 + 11 + 6 + 6 + 6 + 5 + 8). A similar procedure is shown in the Aug 08 2019 comment of A006356. - Gary W. Adamson, Feb 04 2022

References

  • R. K. Guy, Graphs and the strong law of small numbers. Graph theory, combinatorics and applications. Vol. 2 (Kalamazoo, MI, 1988), 597-614, Wiley-Intersci. Publ., Wiley, New York, 1991.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections: A007583 and A047849.
Cf. also A000975, A001045 (first differences), A129761.
Cf. A006356.

Programs

  • GAP
    List([0..40],n->(2^(n+1)+3+(-1)^n)/6); # Muniru A Asiru, Dec 22 2018
    
  • Magma
    [(2^(n+1)+3+(-1)^n)/6: n in [0..40]]; // Vincenzo Librandi, Aug 14 2011
    
  • Maple
    A005578:=-(-1+z+z^2)/((z-1)*(2*z-1)*(z+1)); # Simon Plouffe in his 1992 dissertation
    with(combstruct):ZL0:=S=Prod(Sequence(Prod(a, Sequence(b))), a):ZL1:=Prod(begin_blockP, Z, end_blockP):ZL2:=Prod(begin_blockLR, Z, Sequence(Prod(mu_length, Z), card>=1), end_blockLR): ZL3:=Prod(begin_blockRL, Sequence(Prod(mu_length, Z), card>=1), Z, end_blockRL):Q:=subs([a=Union(ZL3), b=ZL3], ZL0), begin_blockP=Epsilon, end_blockP=Epsilon, begin_blockLR=Epsilon, end_blockLR=Epsilon, begin_blockRL=Epsilon, end_blockRL=Epsilon, mu_length=Epsilon:temp15:=draw([S, {Q}, unlabelled], size=15):seq(count([S, {Q}, unlabelled], size=n), n=2..34); # Zerinvary Lajos, Mar 08 2008
  • Mathematica
    a=0; Table[a=2^n-a;(a/2+1)/2,{n,5!}] (* Vladimir Joseph Stephan Orlovsky, Nov 22 2009 *)
    LinearRecurrence[{2,1,-2}, {1,1,2}, 40] (* G. C. Greubel, Aug 26 2019 *)
  • PARI
    a(n)=(2^(n+1)+3+(-1)^n)/6 \\ Charles R Greathouse IV, Mar 22 2016
    
  • Python
    print([1+2**n//3 for n in range(40)])  # Gennady Eremin, Feb 05 2022
  • Sage
    [(2^(n+1)+3+(-1)^n)/6 for n in (0..40)] # G. C. Greubel, Aug 26 2019
    

Formula

a(n) = ceiling(2^n/3).
a(n) = 1 + floor((2^n)/3) (proof by mathematical induction).
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
From Paul Barry, Jul 20 2003: (Start)
a(n) = A001045(n) + A000035(n+1), where A000035 = (0, 1, 0, 1, ...).
G.f.: (1 - x - x^2)/((1-x^2)*(1-2*x)). [Guy, 1988];
E.g.f.: (exp(2*x) - exp(-x))/3 + cosh(x) = (2*exp(2*x) + 3*exp(x) + exp(-x))/6. (End)
The 30 listed terms are given by a(0)=1, a(1)=1 and, for n > 1, by a(n) = a(n-1) + a(n-2) + Sum_{i=0..n-4} Fibonacci(i)*a(n-4-i). - John W. Layman, Jan 07 2000
a(n) = (2^(n+1) + 3 + (-1)^n)/6. - Vladeta Jovovic, Jul 02 2002
Binomial transform of A001045(n-1)(-1)^n + 0^n/2. - Paul Barry, Apr 28 2004
a(n) = (1 + A001045(n+1))/2. - Paul Barry, Apr 28 2004
a(n) = Sum_{k=0..n} (-1)^k*Sum_{j=0..n-k} (if((j-k) mod 2)=0, binomial(n-k, j), 0). - Paul Barry, Jan 25 2005
Let M = the 6 X 6 adjacency matrix of a benzene ring, (reference): [0,1,0,0,0,1; 1,0,1,0,0,0; 0,1,0,1,0,0; 0,0,1,0,1,0; 0,0,0,1,0,1; 1,0,0,0,1,0]. Then a(n) = leftmost nonzero term of M^n * [1,0,0,0,0,0]. E.g.: a(6) = 22 since M^6 * [1,0,0,0,0,0] = [22,0,21,0,21,0]. - Gary W. Adamson, Jun 14 2006
Starting (1, 2, 3, 6, 11, 22, ...), = row sums of triangle A135229. - Gary W. Adamson, Nov 23 2007
Let T = the 3 X 3 matrix [1,1,0; 1,0,1; 0,1,1]. Then T^n * [1,0,0] = [A005578(n), A001045(n), A000975(n-1)]. - Gary W. Adamson, Dec 24 2007
a(n) = 1 + 2^(n-1) - a(n-1) = a(n-1) + 2*a(n-2) - 1 = a(n-2) + 2^(n-2). - Paul Curtz, Jan 31 2009
a(n) = A023105(n+1) - 1. - Carl Joshua Quines, Jul 17 2019

Extensions

Edited by N. J. A. Sloane, Jun 20 2015

A309597 a(n) is the A325907(n)-th triangular number.

Original entry on oeis.org

6, 666, 5656566, 555665666566566, 5555555666655656666556566566566, 555555555555555666666665555665666666666555566566666556566566566
Offset: 1

Views

Author

Seiichi Manyama, Sep 14 2019

Keywords

Comments

a(n) decimal expansion includes A141023(n-1) 5's and A052950(n) 6's in digits.
All terms are elements of A213516.

Examples

			a(1) =               6 =               6 +        0 +    0 * 10^1.
a(2) =             666 =             556 +       10 +    1 * 10^2.
a(3) =         5656566 =         5555556 +     1010 +   10 * 10^4.
a(4) = 555665666566566 = 555555555555556 + 11011010 + 1101 * 10^8.
------------------------------------------------------------------
a(2) =                                 6 6 6. (            3 6's)
                                       - -
a(3) =                           5 65 65  66. ( 3 5's and  4 6's)
                                 - -- --
a(4) =                  555 6656 6656   6566. ( 6 5's and  9 6's)
                        --- ---- ----
a(5) = 5555555 66665565 66665565    66566566. (15 5's and 16 6's)
       ------- -------- --------
		

Crossrefs

Programs

  • Ruby
    def A325907(n)
      a = [3]
      (2..n).each{|i|
        j = 10 ** (2 ** (i - 2))
        a << (j + 3) * (j - 1) / 3 - a[-1]
      }
      a
    end
    def A309597(n)
      A325907(n).map{|i| i * (i + 1) / 2}
    end
    p A309597(10)

Formula

a(n) = A000217(A325907(n)).
a(n) = A093142(2^n - 1) + A325493(n-1) + A325910(n-1) * 10^(2^(n-1)).

A178616 Triangle by columns, odd columns of Pascal's triangle A007318, otherwise (1, 0, 0, 0, ...).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 0, 1, 0, 4, 0, 4, 1, 0, 5, 0, 10, 0, 1, 0, 6, 0, 20, 0, 6, 1, 0, 7, 0, 35, 0, 21, 0, 1, 0, 8, 0, 56, 0, 56, 0, 8, 0, 1, 0, 9, 0, 84, 0, 126, 0, 36, 0, 1, 0, 10, 0, 120, 0, 252, 0, 120, 0, 10, 1
Offset: 0

Views

Author

Gary W. Adamson, May 30 2010

Keywords

Comments

Row sums = a variant of A052950, starting (1, 1, 3, 4, 9, 16, 33, ...); whereas A052950 starts (2, 1, 3, 4, 9, ...).
Column 1 of the inverse of A178616 is a signed variant of A065619 prefaced with a 0; where A065619 = (1, 2, 3, 8, 25, 96, 427, ...).

Examples

			First few rows of the triangle:
  1,
  0,  1;
  0,  2, 1;
  0,  3, 0,   1
  0,  4, 0,   4, 1;
  0,  5, 0,  10, 0,   1;
  0,  6, 0,  20, 0,   6, 1;
  0,  7, 0,  35, 0,  21, 0,   1;
  0,  8, 0,  56, 0,  56, 0,   8, 1;
  0,  9, 0,  84, 0, 126, 0,  36, 0,  1;
  0, 10, 0, 120, 0, 252, 0, 120, 0, 10, 1;
  0, 11, 0, 165, 0, 462, 0, 330, 0, 55, 0, 1;
  ...
		

Crossrefs

Formula

Triangle, odd columns of Pascal's triangle; (1, 0, 0, 0, ...) as even columns k.
Alternatively, (since A178616 + A162169 - Identity matrix) = Pascal's triangle,
we can begin with Pascal's triangle, subtract A162169, then add the Identity
matrix to obtain A178616.

A088014 Expansion of e.g.f.: cosh(sqrt(2)*x)*(1+exp(x)).

Original entry on oeis.org

2, 1, 5, 7, 21, 41, 107, 239, 593, 1393, 3395, 8119, 19665, 47321, 114371, 275807, 666113, 1607521, 3881411, 9369319, 22620561, 54608393, 131838371, 318281039, 768402497, 1855077841, 4478562275, 10812186007, 26102942481, 63018038201
Offset: 0

Views

Author

Paul Barry, Sep 18 2003

Keywords

Crossrefs

Cf. A052950.
Cf. A002315.

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((x-2)*(2*x-1)*(1+x)/((2*x^2-1)*(x^2+2*x-1)))); // G. C. Greubel, Aug 16 2018
  • Mathematica
    With[{nn=30},CoefficientList[Series[Cosh[Sqrt[2]x](1+Exp[x]),{x,0,nn}],x]Range[0,nn]!] (* or *) LinearRecurrence[{2,3,-4,-2},{2,1,5,7},30] (* Harvey P. Dale, Jul 31 2012 *)
  • PARI
    x='x+O('x^50); Vec((x-2)*(2*x-1)*(1+x)/((2*x^2-1)*(x^2+2*x-1))) \\ G. C. Greubel, Aug 16 2018
    

Formula

G.f.: (x-2)*(2*x-1)*(1+x) / ( (2*x^2-1)*(x^2+2*x-1) ).
E.g.f.: cosh(sqrt(2)*x)*(1+exp(x)).
a(n) = ((sqrt(2))^n + (-sqrt(2))^n + (1+sqrt(2))^n + (1-sqrt(2))^n)/2.
a(0)=2, a(1)=1, a(2)=5, a(3)=7, a(n) = 2*a(n-1) + 3*a(n-2) - 4*a(n-3) - 2*a(n-4). - Harvey P. Dale, Jul 31 2012

A178746 Binary counter with intermittent bits. Starting at zero the counter attempts to increment by 1 at each step but each bit in the counter alternately accepts and rejects requests to toggle.

Original entry on oeis.org

0, 1, 3, 6, 6, 7, 13, 12, 12, 13, 15, 26, 26, 27, 25, 24, 24, 25, 27, 30, 30, 31, 53, 52, 52, 53, 55, 50, 50, 51, 49, 48, 48, 49, 51, 54, 54, 55, 61, 60, 60, 61, 63, 106, 106, 107, 105, 104
Offset: 0

Views

Author

David Scambler, Jun 08 2010

Keywords

Comments

A simple scatter plot reveals a self-similar structure that resembles flying geese.
Ignoring the initial zero term, split the sequence into rows of increasing binary magnitude such that the terms in row m satisfy 2^m <= a(n) < 2^(m+1).
0: 1,
1: 3,
2: 6,6,7,
3: 13,12,12,13,15,
4: 26,26,27,25,24,24,25,27,30,30,31,
5: 53,52,52,53,55,50,50,51,49,48,48,49,51,54,54,55,61,60,60,61,63,
Then,
Row m starts at n = A005578(m+1) in the original sequence
The first term in row m is A081254(m)
The last term in row m is 2^(m+1)-1
The number of terms in row m is A001045(m+1)
The number of distinct terms in row m is A005578(m)
The number of ascending runs in row m is A005578(m)
The number of non-ascending runs in row m is A005578(m)
The number of descending runs in row m is A052950(m)
The number of non-descending runs in row m is A005578(m-1)
The sum of terms in row m is A178747(m)
The total number of '1' bits in the terms of row n is A178748(m)

Examples

			0 -> low bit toggles -> 1 -> should be 2 but low bit does not toggle -> 3 -> should be 4 but 2nd-lowest bit does not toggle -> 6 -> should be 7 but low bit does not toggle -> 6 -> low bit toggles -> 7
		

Crossrefs

Cf. A178747 sum of terms in rows of a(n), A178748 total number of '1' bits in the terms of rows of a(n).

Programs

  • PARI
    seq(n)={my(a=vector(n+1), f=0, p=0); for(i=2, #a, my(b=bitxor(p+1,p)); f=bitxor(f,b); p=bitxor(p, bitand(b,f)); a[i]=p); a} \\ Andrew Howroyd, Mar 03 2020

Formula

If n is a power of 2, a(n) = n*3/2. Lim(a(n)/n) = 3/2.
Showing 1-5 of 5 results.