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

A166754 a(n) = 4*A061547(n+1) - 3*A166753(n).

Original entry on oeis.org

1, 2, 9, 22, 53, 114, 241, 494, 1005, 2026, 4073, 8166, 16357, 32738, 65505, 131038, 262109, 524250, 1048537, 2097110, 4194261, 8388562, 16777169, 33554382, 67108813, 134217674, 268435401, 536870854, 1073741765, 2147483586
Offset: 0

Views

Author

Paul Barry, Oct 21 2009

Keywords

Crossrefs

Programs

  • GAP
    List([0..40], n-> (2^(n+3) + (-1)^n - (4*n+7))/2) # G. C. Greubel, Jun 04 2019
  • Magma
    [(2^(n+3) +(-1)^n -(4*n+7))/2: n in [0..40]]; // G. C. Greubel, Oct 10 2017
    
  • Mathematica
    LinearRecurrence[{3,-1,-3,2}, {1,2,9,22}, 40] (* G. C. Greubel, May 24 2016 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x+4*x^2)/((1+x)*(1-x)^2*(1-2*x))) \\ G. C. Greubel, Oct 10 2017
    
  • Sage
    [(2^(n+3) + (-1)^n - (4*n+7))/2 for n in (0..40)] # G. C. Greubel, Jun 04 2019
    

Formula

G.f.: (1-x+4*x^2)/((1+x)*(1-x)^2*(1-2*x)).
a(n) = (2^(n+3) + (-1)^n - (4*n+7))/2.
a(n) = A000975(n) - 4*A011377(n-2).
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).
E.g.f.: (8*exp(2*x) + exp(-x) - (4*x+7)*exp(x))/2. - G. C. Greubel, Jun 04 2019

A005843 The nonnegative even numbers: a(n) = 2n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 0

Views

Author

Keywords

Comments

-2, -4, -6, -8, -10, -12, -14, ... are the trivial zeros of the Riemann zeta function. - Vivek Suri (vsuri(AT)jhu.edu), Jan 24 2008
If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-2) is the number of 2-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
A134452(a(n)) = 0; A134451(a(n)) = 2 for n > 0. - Reinhard Zumkeller, Oct 27 2007
Omitting the initial zero gives the number of prime divisors with multiplicity of product of terms of n-th row of A077553. - Ray Chandler, Aug 21 2003
A059841(a(n))=1, A000035(a(n))=0. - Reinhard Zumkeller, Sep 29 2008
(APSO) Alternating partial sums of (a-b+c-d+e-f+g...) = (a+b+c+d+e+f+g...) - 2*(b+d+f...), it appears that APSO(A005843) = A052928 = A002378 - 2*(A116471), with A116471=2*A008794. - Eric Desbiaux, Oct 28 2008
A056753(a(n)) = 1. - Reinhard Zumkeller, Aug 23 2009
Twice the nonnegative numbers. - Juri-Stepan Gerasimov, Dec 12 2009
The number of hydrogen atoms in straight-chain (C(n)H(2n+2)), branched (C(n)H(2n+2), n > 3), and cyclic, n-carbon alkanes (C(n)H(2n), n > 2). - Paul Muljadi, Feb 18 2010
For n >= 1; a(n) = the smallest numbers m with the number of steps n of iterations of {r - (smallest prime divisor of r)} needed to reach 0 starting at r = m. See A175126 and A175127. A175126(a(n)) = A175126(A175127(n)) = n. Example (a(4)=8): 8-2=6, 6-2=4, 4-2=2, 2-2=0; iterations has 4 steps and number 8 is the smallest number with such result. - Jaroslav Krizek, Feb 15 2010
For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is not integer. A040001(a(n)) > 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
Union of A179082 and A179083. - Reinhard Zumkeller, Jun 28 2010
a(k) is the (Moore lower bound on and the) order of the (k,4)-cage: the smallest k-regular graph having girth four: the complete bipartite graph with k vertices in each part. - Jason Kimberley, Oct 30 2011
For n > 0: A048272(a(n)) <= 0. - Reinhard Zumkeller, Jan 21 2012
Let n be the number of pancakes that have to be divided equally between n+1 children. a(n) is the minimal number of radial cuts needed to accomplish the task. - Ivan N. Ianakiev, Sep 18 2013
For n > 0, a(n) is the largest number k such that (k!-n)/(k-n) is an integer. - Derek Orr, Jul 02 2014
a(n) when n > 2 is also the number of permutations simultaneously avoiding 213, 231 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl Aug 07 2014
It appears that for n > 2, a(n) = A020482(n) + A002373(n), where all sequences are infinite. This is consistent with Goldbach's conjecture, which states that every even number > 2 can be expressed as the sum of two prime numbers. - Bob Selcoe, Mar 08 2015
Number of partitions of 4n into exactly 2 parts. - Colin Barker, Mar 23 2015
Number of neighbors in von Neumann neighborhood. - Dmitry Zaitsev, Nov 30 2015
Unique solution b( ) of the complementary equation a(n) = a(n-1)^2 - a(n-2)*b(n-1), where a(0) = 1, a(1) = 3, and a( ) and b( ) are increasing complementary sequences. - Clark Kimberling, Nov 21 2017
Also the maximum number of non-attacking bishops on an (n+1) X (n+1) board (n>0). (Cf. A000027 for rooks and queens (n>3), A008794 for kings or A030978 for knights.) - Martin Renner, Jan 26 2020
Integer k is even positive iff phi(2k) > phi(k), where phi is Euler's totient (A000010) [see reference De Koninck & Mercier]. - Bernard Schott, Dec 10 2020
Number of 3-permutations of n elements avoiding the patterns 132, 213, 312 and also number of 3-permutations avoiding the patterns 213, 231, 321. See Bonichon and Sun. - Michel Marcus, Aug 20 2022
a(n) gives the y-value of the integral solution (x,y) of the Pellian equation x^2 - (n^2 + 1)*y^2 = 1. The x-value is given by 2*n^2 + 1 (see Tattersall). - Stefano Spezia, Jul 24 2025

Examples

			G.f. = 2*x + 4*x^2 + 6*x^3 + 8*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 16*x^8 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 28.
  • J.-M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 529a pp. 71 and 257, Ellipses, 2004, Paris.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 256.

Crossrefs

a(n)=2*A001477(n). - Juri-Stepan Gerasimov, Dec 12 2009
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), this sequence (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A231200 (boustrophedon transform).

Programs

Formula

G.f.: 2*x/(1-x)^2.
E.g.f.: 2*x*exp(x). - Geoffrey Critzer, Aug 25 2012
G.f. with interpolated zeros: 2x^2/((1-x)^2 * (1+x)^2); e.g.f. with interpolated zeros: x*sinh(x). - Geoffrey Critzer, Aug 25 2012
Inverse binomial transform of A036289, n*2^n. - Joshua Zucker, Jan 13 2006
a(0) = 0, a(1) = 2, a(n) = 2a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
a(n) = Sum_{k=1..n} floor(6n/4^k + 1/2). - Vladimir Shevelev, Jun 04 2009
a(n) = A034856(n+1) - A000124(n) = A000217(n) + A005408(n) - A000124(n) = A005408(n) - 1. - Jaroslav Krizek, Sep 05 2009
a(n) = Sum_{k>=0} A030308(n,k)*A000079(k+1). - Philippe Deléham, Oct 17 2011
Digit sequence 22 read in base n-1. - Jason Kimberley, Oct 30 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Dec 23 2011
a(n) = 2*n = Product_{k=1..2*n-1} 2*sin(Pi*k/(2*n)), n >= 0 (undefined product := 1). See an Oct 09 2013 formula contribution in A000027 with a reference. - Wolfdieter Lang, Oct 10 2013
From Ilya Gutkovskiy, Aug 19 2016: (Start)
Convolution of A007395 and A057427.
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2 = (1/2)*A002162 = (1/10)*A016655. (End)
From Bernard Schott, Dec 10 2020: (Start)
Sum_{n>=1} 1/a(n)^2 = Pi^2/24 = A222171.
Sum_{n>=1} (-1)^(n+1)/a(n)^2 = Pi^2/48 = A245058. (End)

A002522 a(n) = n^2 + 1.

Original entry on oeis.org

1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 101, 122, 145, 170, 197, 226, 257, 290, 325, 362, 401, 442, 485, 530, 577, 626, 677, 730, 785, 842, 901, 962, 1025, 1090, 1157, 1226, 1297, 1370, 1445, 1522, 1601, 1682, 1765, 1850, 1937, 2026, 2117, 2210, 2305, 2402, 2501
Offset: 0

Views

Author

Keywords

Comments

An n X n nonnegative matrix A is primitive (see A070322) iff every element of A^k is > 0 for some power k. If A is primitive then the power which should have all positive entries is <= n^2 - 2n + 2 (Wielandt).
a(n) = Phi_4(n), where Phi_k is the k-th cyclotomic polynomial.
As the positive solution to x=2n+1/x is x=n+sqrt(a(n)), the continued fraction expansion of sqrt(a(n)) is {n; 2n, 2n, 2n, 2n, ...}. - Benoit Cloitre, Dec 07 2001
a(n) is one less than the arithmetic mean of its neighbors: a(n) = (a(n-1) + a(n+1))/2 - 1. E.g., 2 = (1+5)/2 - 1, 5 = (2+10)/2 - 1. - Amarnath Murthy, Jul 29 2003
Equivalently, the continued fraction expansion of sqrt(a(n)) is (n;2n,2n,2n,...). - Franz Vrabec, Jan 23 2006
Number of {12,1*2*,21}-avoiding signed permutations in the hyperoctahedral group.
The number of squares of side 1 which can be drawn without lifting the pencil, starting at one corner of an n X n grid and never visiting an edge twice is n^2-2n+2. - Sébastien Dumortier, Jun 16 2005
Also, numbers m such that m^3 - m^2 is a square, (n*(1 + n^2))^2. - Zak Seidov
1 + 2/2 + 2/5 + 2/10 + ... = Pi*coth Pi [Jolley], see A113319. - Gary W. Adamson, Dec 21 2006
For n >= 1, a(n-1) is the minimal number of choices from an n-set such that at least one particular element has been chosen at least n times or each of the n elements has been chosen at least once. Some games define "matches" this way; e.g., in the classic Parker Brothers, now Hasbro, board game Risk, a(2)=5 is the number of cards of three available types (suits) required to guarantee at least one match of three different types or of three of the same type (ignoring any jokers or wildcards). - Rick L. Shepherd, Nov 18 2007
Positive X values of solutions to the equation X^3 + (X - 1)^2 + X - 2 = Y^2. To prove that X = n^2 + 1: Y^2 = X^3 + (X - 1)^2 + X - 2 = X^3 + X^2 - X - 1 = (X - 1)(X^2 + 2X + 1) = (X - 1)*(X + 1)^2 it means: (X - 1) must be a perfect square, so X = n^2 + 1 and Y = n(n^2 + 2). - Mohamed Bouhamida, Nov 29 2007
{a(k): 0 <= k < 4} = divisors of 10. - Reinhard Zumkeller, Jun 17 2009
Appears in A054413 and A086902 in relation to sequences related to the numerators and denominators of continued fractions convergents to sqrt((2*n)^2/4 + 1), n=1, 2, 3, ... . - Johannes W. Meijer, Jun 12 2010
For n > 0, continued fraction [n,n] = n/a(n); e.g., [5,5] = 5/26. - Gary W. Adamson, Jul 15 2010
The only real solution of the form f(x) = A*x^p with negative p which satisfies f^(m)(x) = f^[-1](x), x >= 0, m >= 1, with f^(m) the m-th derivative and f^[-1] the compositional inverse of f, is obtained for m=2*n, p=p(n)= -(sqrt(a(n))-n) and A=A(n)=(fallfac(p(n),2*n))^(-p(n)/(p(n)+1)), with fallfac(x,k):=Product_{j=0..k-1} (x-j) (falling factorials). See the T. Koshy reference, pp. 263-4 (there are also two solutions for positive p, see the corresponding comment in A087475). - Wolfdieter Lang, Oct 21 2010
n + sqrt(a(n)) = [2*n;2*n,2*n,...] with the regular continued fraction with period 1. This is the even case. For the general case see A087475 with the Schroeder reference and comments. For the odd case see A078370.
a(n-1) counts configurations of non-attacking bishops on a 2 X n strip [Chaiken et al., Ann. Combin. 14 (2010) 419]. - R. J. Mathar, Jun 16 2011
Also numbers k such that 4*k-4 is a square. Hence this sequence is the union of A053755 and A069894. - Arkadiusz Wesolowski, Aug 02 2011
a(n) is also the Moore lower bound on the order, A191595(n), of an (n,5)-cage. - Jason Kimberley, Oct 17 2011
Left edge of the triangle in A195437: a(n+1) = A195437(n,0). - Reinhard Zumkeller, Nov 23 2011
If h (5,17,37,65,101,...) is prime is relatively prime to 6, then h^2-1 is divisible by 24. - Vincenzo Librandi, Apr 14 2014
The identity (4*n^2+2)^2 - (n^2+1)*(4*n)^2 = 4 can be written as A005899(n)^2 - a(n)*A008586(n)^2 = 4. - Vincenzo Librandi, Jun 15 2014
a(n) is also the number of permutations simultaneously avoiding 213 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl, Aug 07 2014
a(n-1) is the maximum number of stages in the Gale-Shapley algorithm for finding a stable matching between two sets of n elements given an ordering of preferences for each element (see Gura et al.). - Melvin Peralta, Feb 07 2016
Because of Fermat's little theorem, a(n) is never divisible by 3. - Altug Alkan, Apr 08 2016
For n > 0, if a(n) points are placed inside an n X n square, it will always be the case that at least two of the points will be a distance of sqrt(2) units apart or less. - Melvin Peralta, Jan 21 2017
Also the limit as q->1^- of the unimodal polynomial (1-q^(n*k+1))/(1-q) after making the simplification k=n. The unimodal polynomial is from O'Hara's proof of unimodality of q-binomials after making the restriction to partitions of size <= 1. See G_1(n,k) from arXiv:1711.11252. As the size restriction s increases, G_s->G_infinity=G: the q-binomials. Then substituting k=n and q=1 yields the central binomial coefficients: A000984. - Bryan T. Ek, Apr 11 2018
a(n) is the smallest number congruent to both 1 (mod n) and 2 (mod n+1). - David James Sycamore, Apr 04 2019
a(n) is the number of permutations of 1,2,...,n+1 with exactly one reduced decomposition. - Richard Stanley, Dec 22 2022
From Klaus Purath, Apr 03 2025: (Start)
The odd prime factors of these terms are always of the form 4*k + 1.
All a(n) = D satisfy the Pell equation (k*x)^2 - D*y^2 = -1. The values for k and the solutions x, y can be calculated using the following algorithm: k = n, x(0) = 1, x(1) = 4*D - 1, y(0) = 1, y(1) = 4*D - 3. The two recurrences are of the form (4*D - 2, -1). The solutions x, y of the Pell equations for n = {1 ... 14} are in OEIS.
It follows from the above that this sequence is a subsequence of A031396. (End)

Examples

			G.f. = 1 + 2*x + 5*x^2 + 10*x^3 + 17*x^4 + 26*x^5 + 37*x^6 + 50*x^7 + 65*x^8 + ...
		

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 120).
  • E. Gura and M. Maschler, Insights into Game Theory: An Alternative Mathematical Experience, Cambridge, 2008; p. 26.
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley and Sons, New York, 2001.

Crossrefs

Left edge of A055096.
Cf. A059100, A117950, A087475, A117951, A114949, A117619 (sequences of form n^2 + K).
a(n+1) = A101220(n, n+1, 3).
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), this sequence (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A002496 (primes).
Cf. A254858.
Subsequence of A031396.

Programs

Formula

O.g.f.: (1-x+2*x^2)/((1-x)^3). - Eric Werley, Jun 27 2011
Sequences of the form a(n) = n^2 + K with offset 0 have o.g.f. (K - 2*K*x + K*x^2 + x + x^2)/(1-x)^3 and recurrence a(n) = 3*a(n-1) - 3*a(n-2) + a*(n-3). - R. J. Mathar, Apr 28 2008
For n > 0: a(n-1) = A143053(A000290(n)) - 1. - Reinhard Zumkeller, Jul 20 2008
A143053(a(n)) = A000290(n+1). - Reinhard Zumkeller, Jul 20 2008
a(n)*a(n-2) = (n-1)^4 + 4. - Reinhard Zumkeller, Feb 12 2009
a(n) = A156798(n)/A087475(n). - Reinhard Zumkeller, Feb 16 2009
From Reinhard Zumkeller, Mar 08 2010: (Start)
a(n) = A170949(A002061(n+1));
A170949(a(n)) = A132411(n+1);
A170950(a(n)) = A002061(n+1). (End)
For n > 1, a(n)^2 + (a(n) + 1)^2 + ... + (a(n) + n - 2)^2 + (a(n) + n - 1 + a(n) + n)^2 = (n+1) *(6*n^4 + 18*n^3 + 26*n^2 + 19*n + 6) / 6 = (a(n) + n)^2 + ... + (a(n) + 2*n)^2. - Charlie Marion, Jan 10 2011
From Eric Werley, Jun 27 2011: (Start)
a(n) = 2*a(n-1) - a(n-2) + 2.
a(n) = a(n-1) + 2*n - 1. (End)
a(n) = (n-1)^2 + 2(n-1) + 2 = 122 read in base n-1 (for n > 3). - Jason Kimberley, Oct 20 2011
a(n)*a(n+1) = a(n*(n+1) + 1) so a(1)*a(2) = a(3). More generally, a(n)*a(n+k) = a(n*(n+k) + 1) + k^2 - 1. - Jon Perry, Aug 01 2012
a(n) = (n!)^2* [x^n] BesselI(0, 2*sqrt(x))*(1+x). - Peter Luschny, Aug 25 2012
a(n) = A070216(n,1) for n > 0. - Reinhard Zumkeller, Nov 11 2012
E.g.f.: exp(x)*(1 + x + x^2). - Geoffrey Critzer, Aug 30 2013
a(n) = A254858(n-2,3) for n > 2. - Reinhard Zumkeller, Feb 09 2015
Sum_{n>=0} (-1)^n / a(n) = (1+Pi/sinh(Pi))/2 = 0.636014527491... = A367976 . - Vaclav Kotesovec, Feb 14 2015
Sum_{n>=0} 1/a(n) = (1 + Pi*coth(Pi))/2 = 2.076674... = A113319. - Vaclav Kotesovec, Apr 10 2016
4*a(n) = A001105(n-1) + A001105(n+1). - Bruno Berselli, Jul 03 2017
From Amiram Eldar, Jan 20 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi)*sinh(sqrt(2)*Pi).
Product_{n>=1} (1 - 1/a(n)) = Pi*csch(Pi). (End)
Sum_{n>=0} a(n)/n! = 3*e. - Davide Rotondo, Feb 16 2025

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A027383 a(2*n) = 3*2^n - 2; a(2*n+1) = 2^(n+2) - 2.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 22, 30, 46, 62, 94, 126, 190, 254, 382, 510, 766, 1022, 1534, 2046, 3070, 4094, 6142, 8190, 12286, 16382, 24574, 32766, 49150, 65534, 98302, 131070, 196606, 262142, 393214, 524286, 786430, 1048574, 1572862, 2097150, 3145726, 4194302, 6291454
Offset: 0

Views

Author

Keywords

Comments

Number of balanced strings of length n: let d(S) = #(1's) - #(0's), # == count in S, then S is balanced if every substring T of S has -2 <= d(T) <= 2.
Number of "fold lines" seen when a rectangular piece of paper is folded n+1 times along alternate orthogonal directions and then unfolded. - Quim Castellsaguer (qcastell(AT)pie.xtec.es), Dec 30 1999
Also the number of binary strings with the property that, when scanning from left to right, once the first 1 is seen in position j, there must be a 1 in positions j+2, j+4, ... until the end of the string. (Positions j+1, j+3, ... can be occupied by 0 or 1.) - Jeffrey Shallit, Sep 02 2002
a(n-1) is also the Moore lower bound on the order of a (3,n)-cage. - Eric W. Weisstein, May 20 2003 and Jason Kimberley, Oct 30 2011
Partial sums of A016116. - Hieronymus Fischer, Sep 15 2007
Equals row sums of triangle A152201. - Gary W. Adamson, Nov 29 2008
From John P. McSorley, Sep 28 2010: (Start)
a(n) = DPE(n+1) is the total number of k-double-palindromes of n up to cyclic equivalence. See sequence A180918 for the definitions of a k-double-palindrome of n and of cyclic equivalence. Sequence A180918 is the 'DPE(n,k)' triangle read by rows where DPE(n,k) is the number of k-double-palindromes of n up to cyclic equivalence. For example, we have a(4) = DPE(5) = DPE(5,1) + DPE(5,2) + DPE(5,3) + DPE(5,4) + DPE(5,5) = 0 + 2 + 2 + 1 + 1 = 6.
The 6 double-palindromes of 5 up to cyclic equivalence are 14, 23, 113, 122, 1112, 11111. They come from cyclic equivalence classes {14,41}, {23,32}, {113,311,131}, {122,212,221}, {1112,2111,1211,1121}, and {11111}. Hence a(n)=DPE(n+1) is the total number of cyclic equivalence classes of n containing at least one double-palindrome.
(End)
From Herbert Eberle, Oct 02 2015: (Start)
For n > 0, there is a red-black tree of height n with a(n-1) internal nodes and none with less.
In order a red-black tree of given height has minimal number of nodes, it has exactly 1 path with strictly alternating red and black nodes. All nodes outside this height defining path are black.
Consider:
mrbt5 R
/ \
/ \
/ \
/ B
/ / \
mrbt4 B / B
/ \ B E E
/ B E E
mrbt3 R E E
/ \
/ B
mrbt2 B E E
/ E
mrbt1 R
E E
(Red nodes shown as R, blacks as B, externals as E.)
Red-black trees mrbt1, mrbt2, mrbt3, mrbt4, mrbt5 of respective heights h = 1, 2, 3, 4, 5; all minimal in the number of internal nodes, namely 1, 2, 4, 6, 10.
Recursion (let n = h-1): a(-1) = 0, a(n) = a(n-1) + 2^floor(n/2), n >= 0.
(End)
Also the number of strings of length n with the digits 1 and 2 with the property that the sum of the digits of all substrings of uneven length is not divisible by 3. An example with length 8 is 21221121. - Herbert Kociemba, Apr 29 2017
a(n-2) is the number of achiral n-bead necklaces or bracelets using exactly two colors. For n=4, the four arrangements are AAAB, AABB, ABAB, and ABBB. - Robert A. Russell, Sep 26 2018
Partial sums of powers of 2 repeated 2 times, like A200672 where is 3 times. - Yuchun Ji, Nov 16 2018
Also the number of binary words of length n with cuts-resistance <= 2, where, for the operation of shortening all runs by one, cuts-resistance is the number of applications required to reach an empty word. Explicitly, these are words whose sequence of run-lengths, all of which are 1 or 2, has no odd-length run of 1's sandwiched between two 2's. - Gus Wiseman, Nov 28 2019
Also the number of up-down paths with n steps such that the height difference between the highest and lowest points is at most 2. - Jeremy Dover, Jun 17 2020
Also the number of non-singleton integer compositions of n + 2 with no odd part other than the first or last. Including singletons gives A052955. This is an unsorted (or ordered) version of A351003. The version without even (instead of odd) interior parts is A001911, complement A232580. Note that A000045(n-1) counts compositions without odd parts, with non-singleton case A077896, and A052952/A074331 count non-singleton compositions without even parts. Also the number of compositions y of n + 1 such that y_i = y_{i+1} for all even i. - Gus Wiseman, Feb 19 2022

Examples

			After 3 folds one sees 4 fold lines.
Example: a(3) = 6 because the strings 001, 010, 100, 011, 101, 110 have the property.
Binary: 1, 10, 100, 110, 1010, 1110, 10110, 11110, 101110, 111110, 1011110, 1111110, 10111110, 11111110, 101111110, 111111110, 1011111110, 1111111110, 10111111110, ... - _Jason Kimberley_, Nov 02 2011
Example: Partial sums of powers of 2 repeated 2 times:
a(3) = 1+1+2 = 4;
a(4) = 1+1+2+2 = 6;
a(5) = 1+1+2+2+4 = 10.
_Yuchun Ji_, Nov 16 2018
		

References

  • John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010. [John P. McSorley, Sep 28 2010]

Crossrefs

Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), this sequence (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A000066 (actual order of a (3,g)-cage).
Bisections are A033484 (even) and A000918 (odd).
a(n) = A305540(n+2,2), the second column of the triangle.
Numbers whose binary expansion is a balanced word are A330029.
Binary words counted by cuts-resistance are A319421 or A329860.
The complementary compositions are counted by A274230(n-1) + 1, with bisections A060867 (even) and A134057 (odd).
Cf. A000346, A000984, A001405, A001700, A011782 (compositions).
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Haskell
    import Data.List (transpose)
    a027383 n = a027383_list !! n
    a027383_list = concat $ transpose [a033484_list, drop 2 a000918_list]
    -- Reinhard Zumkeller, Jun 17 2015
    
  • Magma
    [2^Floor((n+2)/2)+2^Floor((n+1)/2)-2: n in [0..50]]; // Vincenzo Librandi, Aug 16 2011
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=2*a[n-2]+2 od: seq(a[n], n=1..41); # Zerinvary Lajos, Mar 16 2008
  • Mathematica
    a[n_?EvenQ] := 3*2^(n/2)-2; a[n_?OddQ] := 2^(2+(n-1)/2)-2; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 21 2011, after Quim Castellsaguer *)
    LinearRecurrence[{1, 2, -2}, {1, 2, 4}, 41] (* Robert G. Wilson v, Oct 06 2014 *)
    Table[Length[Select[Tuples[{0,1},n],And[Max@@Length/@Split[#]<=2,!MatchQ[Length/@Split[#],{_,2,ins:1..,2,_}/;OddQ[Plus[ins]]]]&]],{n,0,15}] (* Gus Wiseman, Nov 28 2019 *)
  • PARI
    a(n)=2^(n\2+1)+2^((n+1)\2)-2 \\ Charles R Greathouse IV, Oct 21 2011
    
  • Python
    def a(n): return 2**((n+2)//2) + 2**((n+1)//2) - 2
    print([a(n) for n in range(43)]) # Michael S. Branicky, Feb 19 2022

Formula

a(0)=1, a(1)=2; thereafter a(n+2) = 2*a(n) + 2.
a(2n) = 3*2^n - 2 = A033484(n);
a(2n-1) = 2^(n+1) - 2 = A000918(n+1).
G.f.: (1 + x)/((1 - x)*(1 - 2*x^2)). - David Callan, Jul 22 2008
a(n) = Sum_{k=0..n} 2^min(k, n-k).
a(n) = 2^floor((n+2)/2) + 2^floor((n+1)/2) - 2. - Quim Castellsaguer (qcastell(AT)pie.xtec.es)
a(n) = 2^(n/2)*(3 + 2*sqrt(2) + (3-2*sqrt(2))*(-1)^n)/2 - 2. - Paul Barry, Apr 23 2004
a(n) = A132340(A052955(n)). - Reinhard Zumkeller, Aug 20 2007
a(n) = A052955(n+1) - 1. - Hieronymus Fischer, Sep 15 2007
a(n) = A132666(a(n+1)) - 1. - Hieronymus Fischer, Sep 15 2007
a(n) = A132666(a(n-1)+1) for n > 0. - Hieronymus Fischer, Sep 15 2007
A132666(a(n)) = a(n-1) + 1 for n > 0. - Hieronymus Fischer, Sep 15 2007
G.f.: (1 + x)/((1 - x)*(1 - 2*x^2)). - David Callan, Jul 22 2008
a(n) = 2*( (a(n-2)+1) mod (a(n-1)+1) ), n > 1. - Pierre Charland, Dec 12 2010
a(n) = A136252(n-1) + 1, for n > 0. - Jason Kimberley, Nov 01 2011
G.f.: (1+x*R(0))/(1-x), where R(k) = 1 + 2*x/( 1 - x/(x + 1/R(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 16 2013
a(n) = 2^((2*n + 3*(1-(-1)^n))/4)*3^((1+(-1)^n)/2) - 2. - Luce ETIENNE, Sep 01 2014
a(n) = a(n-1) + 2^floor((n-1)/2) for n>0, a(0)=1. - Yuchun Ji, Nov 23 2018
E.g.f.: 3*cosh(sqrt(2)*x) - 2*cosh(x) + 2*sqrt(2)*sinh(sqrt(2)*x) - 2*sinh(x). - Stefano Spezia, Apr 06 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 24 2000
Replaced definition with a simpler one. - N. J. A. Sloane, Jul 09 2022

A083329 a(0) = 1; for n > 0, a(n) = 3*2^(n-1) - 1.

Original entry on oeis.org

1, 2, 5, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 12287, 24575, 49151, 98303, 196607, 393215, 786431, 1572863, 3145727, 6291455, 12582911, 25165823, 50331647, 100663295, 201326591, 402653183, 805306367, 1610612735, 3221225471, 6442450943
Offset: 0

Views

Author

Paul Barry, Apr 27 2003

Keywords

Comments

Apart from leading term (which should really be 3/2), same as A055010.
Binomial transform of A040001. Inverse binomial transform of A053156.
a(n) = A105728(n+1,2). - Reinhard Zumkeller, Apr 18 2005
Row sums of triangle A133567. - Gary W. Adamson, Sep 16 2007
Row sums of triangle A135226. - Gary W. Adamson, Nov 23 2007
a(n) = number of partitions Pi of [n+1] (in standard increasing form) such that the permutation Flatten[Pi] avoids the patterns 2-1-3 and 3-1-2. Example: a(3)=11 counts all 15 partitions of [4] except 13/24, 13/2/4 which contain a 2-1-3 and 14/23, 14/2/3 which contain a 3-1-2. Here "standard increasing form" means the entries are increasing in each block and the blocks are arranged in increasing order of their first entries. - David Callan, Jul 22 2008
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 42, 138, 162, 168, lead to this sequence. For the central square these vectors lead to the companion sequence A003945. - Johannes W. Meijer, Aug 15 2010
The binary representation of a(n) has n+1 digits, where all digits are 1's except digit n-1. For example: a(4) = 23 = 10111 (2). - Omar E. Pol, Dec 02 2012
Row sums of triangle A209561. - Reinhard Zumkeller, Dec 26 2012
If a Stern's sequence based enumeration system of positive irreducible fractions is considered (for example, A007305/A047679, A162909/A162910, A071766/A229742, A245325/A245326, ...), and if it is organized by blocks or levels (n) with 2^n terms (n >= 0), and the fractions, term by term, are summed at each level n, then the resulting sequence of integers is a(n) + 1/2, apart from leading term (which should be 1/2). - Yosu Yurramendi, May 23 2015
For n >= 2, A083329(n) in binary representation is a string [101..1], also 10 followed with (n-1) 1's. For n >= 3, A036563(n) in binary representation is a string [1..101], also (n-2) 1's followed with 01. Thus A083329(n) is a reflection of the binary representation of A036563(n+1). Example: A083329(5) = 101111 in binary, A036563(6) = 111101 in binary. - Ctibor O. Zizka, Nov 06 2018
For n > 0, a(n) is the minimum number of turns in (n+1)-dimensional Euclidean space needed to visit all 2^(n+1) vertices of the (n+1)-cube (e.g., {0,1}^(n+1)) and return to the starting point, moving along straight-line segments between turns (turns may occur elsewhere in R^(n+1)). - Marco Ripà, Aug 14 2025

Examples

			a(0) = (3*2^0 - 2 + 0^0)/2 = 2/2 = 1 (use 0^0=1).
		

Crossrefs

Essentially the same as A055010 and A052940.
Cf. A007505 (primes).
Cf. A266550 (independence number of the n-Mycielski graph).

Programs

  • Haskell
    a083329 n = a083329_list !! n
    a083329_list = 1 : iterate ((+ 1) . (* 2)) 2
    -- Reinhard Zumkeller, Dec 26 2012, Feb 22 2012
    
  • Magma
    [1] cat [3*2^(n-1)-1: n in [1..40]]; // Vincenzo Librandi, Jan 01 2016
  • Maple
    seq(ceil((2^i+2^(i+1)-2)/2), i=0..31); # Zerinvary Lajos, Oct 02 2007
  • Mathematica
    a[1] = 2; a[n_] := 2a[n - 1] + 1; Table[ a[n], {n, 31}] (* Robert G. Wilson v, May 04 2004 *)
    Join[{1}, LinearRecurrence[{3, -2}, {2, 5}, 40]] (* Vincenzo Librandi, Jan 01 2016 *)
  • PARI
    a(n)=(3*2^n-2+0^n)/2 \\ Charles R Greathouse IV, Sep 24 2015
    

Formula

a(n) = (3*2^n - 2 + 0^n)/2.
G.f.: (1-x+x^2)/((1-x)*(1-2*x)). [corrected by Martin Griffiths, Dec 01 2009]
E.g.f.: (3*exp(2*x) - 2*exp(x) + exp(0))/2.
a(0) = 1, a(n) = sum of all previous terms + n. - Amarnath Murthy, Jun 20 2004
a(n) = 3*a(n-1) - 2*a(n-2) for n > 2, a(0)=1, a(1)=2, a(2)=5. - Philippe Deléham, Nov 29 2013
From Bob Selcoe, Apr 25 2014: (Start)
a(n) = (...((((((1)+1)*2+1)*2+1)*2+1)*2+1)...), with n+1 1's, n >= 0.
a(n) = 2*a(n-1) + 1, n >= 2.
a(n) = 2^n + 2^(n-1) - 1, n >= 2. (End)
a(n) = A086893(n) + A061547(n+1), n > 0. - Yosu Yurramendi, Jan 16 2017

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

Original entry on oeis.org

1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, -1365, 2731, -5461, 10923, -21845, 43691, -87381, 174763, -349525, 699051, -1398101, 2796203, -5592405, 11184811, -22369621, 44739243, -89478485, 178956971, -357913941, 715827883, -1431655765, 2863311531, -5726623061
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

a(n+1) is the reflection of a(n) through a(n-1) on the numberline. - Floor van Lamoen, Aug 31 2004
If a zero is added as the (new) a(0) in front, the sequence represents the inverse binomial transform of A001045. Partial sums are in A077898. - R. J. Mathar, Aug 30 2008
a(n) = A077953(2*n+3). - Reinhard Zumkeller, Oct 07 2008
Related to the Fibonacci sequence by an INVERT transform: if A(x) = 1+x^2*g(x) is the generating function of the a(n) prefixed with 1, 0, then 1/A(x) = 2+(x+1)/(x^2-x+1) is the generating function of 1, 0, -1, 1, -2, 3, ..., the signed Fibonacci sequence A000045 prefixed with 1. - Gary W. Adamson, Jan 07 2011
Also: Gaussian binomial coefficients [n+1,1], or q-integers, for q=-2, diagonal k=1 in the triangular (or column r=1 in the square) array A015109. - M. F. Hasler, Nov 04 2012
With a leading zero, 0, 1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, ... we obtain the Lucas U(-1,-2) sequence. - R. J. Mathar, Jan 08 2013
Let m = a(n). Then 18*m^2 - 12*m + 1 = A000225(2n+3). - Roderick MacPhee, Jan 17 2013

Examples

			G.f. = 1 - x + 3*x^2 - 5*x^3 + 11*x^4 - 21*x^5 + 43*x^6 - 85*x^7 + ...
		

Crossrefs

Cf. A001045 (unsigned version).
Cf. A014983, A014985, A014986. - Zerinvary Lajos, Dec 16 2008

Programs

Formula

G.f.: 1/(1+x-2*x^2).
a(n) = (1-(-2)^(n+1))/3. - Vladeta Jovovic, Apr 17 2003
a(n) = Sum_{k=0..n} (-2)^k. - Paul Barry, May 26 2003
a(n+1) - a(n) = A122803(n). - R. J. Mathar, Aug 30 2008
a(n) = Sum_{k=0..n} A112555(n,k)*(-2)^k. - Philippe Deléham, Sep 11 2009
a(n) = A082247(n+1) - 1. - Philippe Deléham, Oct 07 2009
G.f.: Q(0)/(3*x), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k + 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k - 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k-1 + 2*x)/( x*(4*k+1 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
E.g.f.: (2*exp(-2*x) + exp(x))/3. - Ilya Gutkovskiy, Nov 12 2016
a(n) = A086893(n+2) - A061547(n+3), n >= 0. - Yosu Yurramendi, Jan 16 2017
a(n) = (-1)^n*A001045(n+1). - M. F. Hasler, Feb 13 2020
a(n) - a(n-1) = a(n-1) - a(n+1) = (-2)^n, a(n+1) = - a(n) + 2*a(n-1) = 1 - 2*a(n). - Michael Somos, Feb 22 2023

A051890 a(n) = 2*(n^2 - n + 1).

Original entry on oeis.org

2, 2, 6, 14, 26, 42, 62, 86, 114, 146, 182, 222, 266, 314, 366, 422, 482, 546, 614, 686, 762, 842, 926, 1014, 1106, 1202, 1302, 1406, 1514, 1626, 1742, 1862, 1986, 2114, 2246, 2382, 2522, 2666, 2814, 2966, 3122, 3282, 3446, 3614, 3786, 3962
Offset: 0

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), Apr 30 2000

Keywords

Comments

Draw n ellipses in the plane (n > 0); sequence gives maximum number of regions into which the plane is divided (cf. A014206, A386480).
Least k such that Z(k,2) <= Z(n,3) where Z(m,s) = Sum_{i>=m} 1/i^s = zeta(s) - Sum_{i=1..m-1} 1/i^s. - Benoit Cloitre, Nov 29 2002
For n > 2, third diagonal of A154685. - Vincenzo Librandi, Aug 06 2010
a(k) is also the Moore lower bound A198300(k,6) on the order A054760(k,6) of a (k,6)-cage. Equality is achieved if and only if there exists a finite projective plane of order k - 1. A sufficient condition for this is that k - 1 be a prime power. - Jason Kimberley, Oct 17 2011 and Jan 01 2013
From Jess Tauber, May 20 2013: (Start)
For neutron shell filling in spherical atomic nuclei, this sequence shows numerical differences between filled spin-split suborbitals sharing all quantum numbers except the principal quantum number n, and here all n's must differ by 1. Only a small handful of exceptions exist.
This sequence consists of summed pairs of every other doubled triangular number. It also can be created by taking differences between nuclear magic numbers from the harmonic oscillator (HO)(doubled tetrahedral) set and the spin-orbit (SO) set (2,6,14,28,50,82,126,184,...), with either set being larger. So SO-HO: 2-0=2, 6-0=6, 14-0=14, 28-2=26, 50-8=42, 82-20=62, 126-40=86, 184-70=114, and HO-SO: 2-0=2, 8-2=6, 20-6=14, 40-14=26, 70-28=42, 112-50=62, 168-82=86, 240-126=114. From the perspective of idealized HO periodic structure, with suborbitals in order from largest to smallest spin, alternating by parity, the HO-SO set is spaced two period analogs PLUS one suborbital, while the SO-HO set is spaced two period analogs MINUS one suborbital. (End)
The known values of f(k,6) and F(k,6) in Brown (1967), Table 1, closely match this sequence. - N. J. A. Sloane, Jul 09 2015
Numbers k such that 2*k - 3 is a square. - Bruno Berselli, Nov 08 2017
Numbers written 222 in number base B, including binary with 'digit' 2: 222(2)=14, 222(3)=26, ... - Ron Knott, Nov 14 2017

Crossrefs

Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), this sequence (g=6), A188377 (g=7).

Programs

Formula

a(n) = 4*binomial(n, 2) + 2. - Francois Jooste (phukraut(AT)hotmail.com), Mar 05 2003
For n > 2, nearest integer to (Sum_{k>=n} 1/k^3)/(Sum_{k>=n} 1/k^5). - Benoit Cloitre, Jun 12 2003
a(n) = 2*A002061(n). - Jonathan Vos Post, Jun 19 2005
a(n) = 4*n + a(n-1) - 4 for n > 0, a(0)=2. - Vincenzo Librandi, Aug 06 2010
a(n) = 2*(n^2 - n +1) = 2*(n-1)^2 + 2(n-1) + 2 = 222 read in base n-1 (for n > 3). - Jason Kimberley, Oct 20 2011
G.f.: 2*(1 - 2*x + 3*x^2)/(1 - x)^3. - Colin Barker, Jan 10 2012
a(n) = A001844(n-1) + 1 = A046092(n-1) + 2. - Jaroslav Krizek, Dec 27 2013
E.g.f.: 2*(x^2 + 1)*exp(x). - G. C. Greubel, Jul 14 2017

A062318 Numbers of the form 3^m - 1 or 2*3^m - 1; i.e., the union of sequences A048473 and A024023.

Original entry on oeis.org

0, 1, 2, 5, 8, 17, 26, 53, 80, 161, 242, 485, 728, 1457, 2186, 4373, 6560, 13121, 19682, 39365, 59048, 118097, 177146, 354293, 531440, 1062881, 1594322, 3188645, 4782968, 9565937, 14348906, 28697813, 43046720, 86093441, 129140162
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 05 2001

Keywords

Comments

WARNING: The offset of this sequence has been changed from 0 to 1 without correcting the formulas and programs, many of them correspond to the original indexing a(0)=0, a(1)=1, ... - M. F. Hasler, Oct 06 2014
Numbers n such that no entry in n-th row of Pascal's triangle is divisible by 3, i.e., such that A062296(n) = 0.
The base 3 representation of these numbers is 222...222 or 122...222.
a(n+1) is the smallest number with ternary digit sum = n: A053735(a(n+1)) = n and A053735(m) <> n for m < a(n+1). - Reinhard Zumkeller, Sep 15 2006
A138002(a(n)) = 0. - Reinhard Zumkeller, Feb 26 2008
Also, number of terms in S(n), where S(n) is defined in A114482. - N. J. A. Sloane, Nov 13 2014
a(n+1) is also the Moore lower bound on the order of a (4,g)-cage. - Jason Kimberley, Oct 30 2011

Examples

			The first rows in Pascal's triangle with no multiples of 3 are:
row 0: 1;
row 1: 1, 1;
row 2: 1, 2,  1;
row 5: 1, 5, 10, 10,  5,  1;
row 8: 1, 8, 28, 56, 70, 56, 28, 8, 1;
		

Crossrefs

Cf. A062296, A024023, A048473, A114482. Pairwise sums of A052993.
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), this sequence (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A037233 (actual order of a (4,g)-cage).
Smallest number whose base b sum of digits is n: A000225 (b=2), this sequence (b=3), A180516 (b=4), A181287 (b=5), A181288 (b=6), A181303 (b=7), A165804 (b=8), A140576 (b=9), A051885 (b=10).

Programs

  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else Self(n-1)+3*Self(n-2) -3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Apr 20 2012
    
  • Maple
    A062318 :=proc(n)
        if n mod 2 = 1 then
            3^((n-1)/2)-1
        else
            2*3^(n/2-1)-1
        fi
    end proc:
    seq(A062318(n), n=1..37); # Emeric Deutsch, Feb 03 2005, offset updated
  • Mathematica
    CoefficientList[Series[x^2*(1+x)/((1-x)*(1-3*x^2)),{x,0,40}],x] (* Vincenzo Librandi, Apr 20 2012 *)
    A062318[n_]:= (1/3)*(Boole[n==0] -3 +3^(n/2)*(2*Mod[n+1,2] +Sqrt[3] *Mod[n, 2]));
    Table[A062318[n], {n, 50}] (* G. C. Greubel, Apr 17 2023 *)
  • PARI
    a(n)=3^(n\2)<M. F. Hasler, Oct 06 2014
    
  • SageMath
    def A062318(n): return (1/3)*(int(n==0) - 3 + 2*((n+1)%2)*3^(n/2) + (n%2)*3^((n+1)/2))
    [A062318(n) for n in range(1,41)] # G. C. Greubel, Apr 17 2023

Formula

a(n) = 2*3^(n/2-1)-1 if n is even; a(n) = 3^(n/2-1/2)-1 if n is odd. - Emeric Deutsch, Feb 03 2005, offset updated.
From Paul Curtz, Feb 21 2008: (Start)
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3).
Partial sums of A108411. (End)
G.f.: x^2*(1+x)/((1-x)*(1-3*x^2)). - Colin Barker, Apr 02 2012
a(2n+1) = 3*a(2n-1) + 2; a(2n) = ( a(2n-1) + a(2n+1) )/2. See A060647 for case where a(1)= 1. - Richard R. Forberg, Nov 30 2013
a(n) = 2^((1+(-1)^n)/2) * 3^((2*n-3-(-1)^n)/4) - 1. - Luce ETIENNE, Aug 29 2014
a(n) = A052993(n-1) + A052993(n-2). - R. J. Mathar, Sep 10 2021
E.g.f.: (1 - 3*cosh(x) + 2*cosh(sqrt(3)*x) - 3*sinh(x) + sqrt(3)*sinh(sqrt(3)*x))/3. - Stefano Spezia, Apr 06 2022
a(n) = (1/3)*([n=0] - 3 + (1+(-1)^n)*3^(n/2) + ((1-(-1)^n)/2)*3^((n+1)/2)). - G. C. Greubel, Apr 17 2023

Extensions

More terms from Emeric Deutsch, Feb 03 2005
Entry revised by N. J. A. Sloane, Jul 29 2011

A020725 Integers >= 2. a(n) = n+1.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1

Views

Author

Keywords

Comments

This sequence is closed under multiplication by any integer k > 0. The primitive elements of the sequence (those not divisible by any smaller element) are the primes, A000040. - Franklin T. Adams-Watters, May 22 2006
Possible sums of the final scores of completed Chicago Bears football games. 1 point only is an impossible score in American football. But with the safety 2 and the field goal 3, we can construct the set of integers greater than 1. We can prove this by noting that if a score is even, we can build it with a series of safeties. Of course the other allowed scorings of 3, 6, and 1 after a touchdown, could also be used. Now if a score is odd it is of the form 2k+3. So for any odd number 2m+1, we subtract 3 (or 1 field goal) from it to make it even and divide by 2 to get the number of safeties we need to add back to the field goal. Symbolically, let the odd number be 2m+1; then (2m+1 - 3)/2 = m-1 safeties are needed. Add this to 3 and you will have the number. For example, say we want a score of 99. 99 = 2m+1 and m = 49. So m-1 = 48 safeties + 1 field goal = 99 points. - Cino Hilliard, Feb 03 2006
Possible nonnegative values of (a*b-c*d) where a,b,c and d are distinct positive integers and a+b=c+d. All positive values >=2 are possible: for even values 2n take a=m+n, b=m-n+1, c=m+n+1, d=m-n, where m>n; for odd values 2n+1 take a=m+n, b=m-n, c=m+n+1, d=m-n-1, where m>n+1. Elementary algebra shows that the values 0 and 1 are not possible without violating the assumption that a,b,c and d are distinct. - John Grint, Sep 26 2011
Also numbers n such that a semiprime is equal to the sum of n primes. Bachraoui proved that there is a prime between 2n and 3n for every n > 1, so every n > 1 is in this sequence since any number in that range is the sum of n integers each of which is either 2 or 3. - Charles R Greathouse IV, Oct 27 2011
From Jason Kimberley, Oct 30 2011: (Start)
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: this sequence (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7).
Digit string 12 read in base n-1 (for n>3 or by extending notation). (End)
Positive integers whose number of divisors is not 1. - Omar E. Pol, Aug 11 2012
Positive integers where the number of parts function on the set of 2-ary partitions is equidistributed mod 2. - Tom Edgar, Apr 26 2016
This sequence is also the Pierce Expansion of 1/exp(1). - G. C. Greubel, Nov 15 2016
Natural numbers with at least one prime factor. - Michal Bozon, Apr 24 2017
a(n) is the reciprocal of the Integral_{x=0..1} x^n dx. - Felix Huber, Aug 19 2023

Crossrefs

Column 1 of A210976.

Programs

  • Mathematica
    Range[2,100] (* Harvey P. Dale, Aug 31 2015 *)
    PierceExp[A_, n_] := Join[Array[1 &, Floor[A]], First@Transpose@ NestList[{Floor[1/Expand[1 - #[[1]] #[[2]]]], Expand[1 - #[[1]] #[[2]]]} &, {Floor[1/(A - Floor[A])], A - Floor[A]}, n - 1]]; PierceExp[N[1/E , 7!], 50] (* G. C. Greubel, Nov 14 2016 *)
  • PARI
    a(n)=n+1 \\ Charles R Greathouse IV, Aug 23 2011

Formula

From Franklin T. Adams-Watters, May 22 2006: (Start)
O.g.f.: (2*x - x^2)/(1 - x)^2.
E.g.f.: (1 + x)*exp(x)-1.
Dirichlet g.f.: zeta(s) + zeta(s-1).
a(n) = n + 1 for n>0. (End)

Extensions

Edited by Jon E. Schoenfield, Sep 20 2013

A086893 a(n) is the index of F(n+1) at the unique occurrence of the ordered pair of reversed consecutive terms (F(n+1),F(n)) in Stern's diatomic sequence A002487, where F(k) denotes the k-th term of the Fibonacci sequence A000045.

Original entry on oeis.org

1, 3, 5, 13, 21, 53, 85, 213, 341, 853, 1365, 3413, 5461, 13653, 21845, 54613, 87381, 218453, 349525, 873813, 1398101, 3495253, 5592405, 13981013, 22369621, 55924053, 89478485, 223696213, 357913941, 894784853, 1431655765, 3579139413
Offset: 1

Views

Author

John W. Layman, Sep 18 2003

Keywords

Comments

If the Fibonacci pairs are kept in the natural order (F(n),F(n+1)), it appears that the first term of the pair occurs in A002487 at the index given by A061547(n).
Equals row sums of triangle A177954. - Gary W. Adamson, May 15 2010
Starting at n=3, begin subtracting from (2^(n-1)-1)/2^(n-1): 3/4 - 1/2 = 1/4 with 1+4=5=a(3); 7/8 - 1/4 = 5/8 with 5+8=13=a(4); 15/16 - 5/8 = 5/16 with 5+16=21= a(5); 31/32 - 5/16 = 21/32 with 21+32=53=a(6); 63/64 - 21/32 = 21/64 with 21+64=85=a(7) and so on. For n odd in the first fraction (2^(n-1)-1)/2^(n-1), the result approaches 1/3, and for n even in the first fraction, the result approaches 2/3. - J. M. Bergot, May 08 2015
Also, the decimal representation of the x-axis, from the left edge to the origin, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 678", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. See A283641. - Robert Price, Mar 12 2017

Examples

			A002487 begins 0,1,1,2,1,3,2,... with offset 0. Thus a(1)=1 since (F(2),F(1)) = (1,1) occurs at term 1 of A002487. Similarly, a(2)=3 and a(3)=5, since (F(3),F(2))=(2,1) occurs at term 3 and (F(4),F(3))=(3,2) at term 5 of A002487.
		

Crossrefs

Interleaving of A002450\{0} and A072197.
Positive terms of A096773 in ascending order.
Partial sums of A158302.

Programs

  • Magma
    [2^(n-1)*(3-(-1)^n/3)-1/3: n in [0..35]]; // Vincenzo Librandi, May 09 2015
    
  • Mathematica
    f[n_] := Module[{a = 1, b = 0, m = n}, While[m > 0, If[OddQ@ m, b = a + b, a = a + b]; m = Floor[m/2]]; b]; a = Table[f[n], {n, 0, 10^6}]; b = Reverse /@ Partition[Map[Fibonacci, Range[Ceiling@ Log[GoldenRatio, Max@ a] + 1]], 2, 1]; Map[If[Length@ # > 0, #[[1, 1]] - 1, 0] &@ SequencePosition[a, #] &, b] (* Michael De Vlieger, Mar 15 2017, Version 10.1, after Jean-François Alcover at A002487 *)
  • PARI
    a(n)=if(n%2,2^(n+1),2^(n+1)+2^(n-1))\3 \\ Charles R Greathouse IV, May 08 2015
    
  • Python
    def A086893(n): return (1<Chai Wah Wu, Apr 29 2024

Formula

It appears that a(n)=(4^((n+1)/2)-1)/3 if n is odd and a(n)=(a(n-1)+a(n+1))/2 if n is even.
G.f.: (1+2*x-2*x^2)/((1-x)*(1-4*x^2)); a(n) = 2^(n-1)(3-(-1)^n/3)-1/3 (offset 0); a(n) = Sum{k=0..n+1, 4^floor(k/2)/2} (offset 0); a(2n) = A002450(n+1) (offset 0); a(2n+1) = A072197(n) (offset 0). - Paul Barry, May 21 2004
a(n+2) = 4*a(n) + 1, a(1) = 1, a(2) = 3, n > 0. - Yosu Yurramendi, Mar 07 2017
a(n+1) = a(n) + A158302(n), a(1) = 1, n > 0. - Yosu Yurramendi, Mar 07 2017

Extensions

More terms from Paul Barry, May 21 2004
Showing 1-10 of 33 results. Next