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 10 results.

A114112 a(1)=1, a(2)=2; thereafter a(n) = n+1 if n odd, n-1 if n even.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 13 2005

Keywords

Comments

a(1)=1; for n>1, a(n) is the smallest positive integer not occurring earlier in the sequence such that a(n) does not divide Sum_{k=1..n-1} a(k). - Leroy Quet, Nov 13 2005 (This was the original definition. A simple induction argument shows that this is the same as the present definition. - N. J. A. Sloane, Mar 12 2018)
Define b(1)=2; for n>1, b(n) is the smallest number not yet in the sequence which shares a prime factor with the sum of all preceding terms. Then a simple induction argument shows that the b(n) sequence is the same as the present sequence with the first term omitted. - David James Sycamore, Feb 26 2018
Here are the details of the two induction arguments (Start)
For a(n), let A(n) = a(1)+...+a(n). The claim is that for n>2 a(n)=n+1 if n odd, n-1 if n even.
The induction hypotheses are: for i
For b(n), the argument is very similar, except that the missing numbers when looking for b(n) are slightly different, and (setting B(n) = b(1)+...b(n)), we have B(2i)=(i+1)(2i+1), B(2i+1)=(i+2)(2i+1). - N. J. A. Sloane, Mar 14 2018
When sequence a(n) is increasing, then the Cesàro means sequence c(n) = (a(1)+...+a(n))/n is also increasing, but the converse is false. This sequence is a such an example where c(n) is increasing, while a(n) is not increasing (Arnaudiès et al.). See proof in A354008. - Bernard Schott, May 11 2022

References

  • J. M. Arnaudiès, P. Delezoide et H. Fraysse, Exercices résolus d'Analyse du cours de mathématiques - 2, Dunod, Exercice 10, pp. 14-16.

Crossrefs

All of A014681, A103889, A113981, A114112, A114285 are essentially the same sequence. - N. J. A. Sloane, Mar 12 2018
Cf. A114113 (partial sums).
See A084265 for the partial sums of the b(n) sequence.
About Cesàro mean theorem: A033999, A141310, A237420, A354008.
Cf. A244009.

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[{k = 1, s, t = Table[ a[i], {i, n - 1}]}, s = Plus @@ t; While[ Position[t, k] != {} || Mod[s, k] == 0, k++ ]; k]; Array[a, 72] (* Robert G. Wilson v, Nov 18 2005 *)
  • PARI
    a(n) = if (n<=2, n, if (n%2, n+1, n-1)); \\ Michel Marcus, May 16 2022
    
  • Python
    def A114112(n): return n + (0 if n <= 2 else -1+2*(n%2)) # Chai Wah Wu, May 24 2022

Formula

G.f.: x*(x^4-2*x^3+x^2+x+1)/((1-x)*(1-x^2)). - N. J. A. Sloane, Mar 12 2018
The g.f. for the b(n) sequence is x*(x^3-3*x^2+2*x+2)/((1-x)*(1-x^2)). - Conjectured (correctly) by Colin Barker, Mar 04 2018
E.g.f.: 1 - x + x^2/2 + (x - 1)*cosh(x) + (x + 1)*sinh(x). - Stefano Spezia, Sep 02 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - log(2) (A244009). - Amiram Eldar, Jun 29 2025

Extensions

More terms from Robert G. Wilson v, Nov 18 2005
Entry edited (with simpler definition) by N. J. A. Sloane, Mar 12 2018

A383987 Series expansion of the exponential generating function -tridend(-(1-exp(x))) where tridend(x) = (1 - 3*x - sqrt(1+6*x+x^2)) / (4*x) (A001003).

Original entry on oeis.org

0, 1, -5, 49, -725, 14401, -360005, 10863889, -384415925, 15612336481, -715930020005, 36592369889329, -2062911091119125, 127170577711282561, -8510569547826528005, 614491222512504748369, -47615614242877583230325, 3941408640018910366196641
Offset: 0

Author

Michael De Vlieger, May 16 2025

Keywords

Crossrefs

Composition of A001003 with exp(x)-1.

Programs

  • Mathematica
    nn = 17; f[x_] := (1 + 3*x - Sqrt[1 + 6*x + x^2])/(4*x); Range[0, nn]! * CoefficientList[Series[f[-(1 - Exp[x])], {x, 0, nn}], x]

A383989 Series expansion of the exponential generating function ff6^!(exp(x)-1) where ff6^!(x) = x * (1-3*x-x^2+x^3) / (1+3*x+x^2-x^3).

Original entry on oeis.org

0, 1, -11, 61, -467, 4381, -49091, 643021, -9615827, 161844541, -3026079971, 62243374381, -1396619164787, 33949401567901, -888725861445251, 24926889744928141, -745755560487363347, 23705772035082494461, -797875590555470224931, 28346366547928396344301
Offset: 0

Author

Michael De Vlieger, May 16 2025

Keywords

Programs

  • Mathematica
    nn = 19; f[x_] := x*(1 - 3*x - x^2 + x^3)/(1 + 3*x + x^2 - x^3);
    Range[0, nn]! * CoefficientList[Series[f[-(1 - Exp[x])], {x, 0, nn}], x]

A383992 Series expansion of the exponential generating function exp(arbustive(x)) - 1 where arbustive(x) = (log(1+x) - x^2) / (1+x).

Original entry on oeis.org

0, 1, -4, 3, 40, -330, 1626, -3150, -54592, 1060920, -13022280, 127171440, -889086648, -283184616, 179750627616, -4895777544840, 99124001788800, -1721513264431680, 25736021675994816, -292896125040673728, 639149345262276480, 106178474282318726400
Offset: 0

Author

Michael De Vlieger, May 16 2025

Keywords

Programs

  • Mathematica
    nn = 21; f[x_] := Exp[x] - 1;
    Range[0, nn]! * CoefficientList[Series[f[(Log[1 + x] - x^2)/(1 + x)], {x, 0, nn}], x]

A383985 Series expansion of the exponential generating function LambertW(1-exp(x)), see A000169.

Original entry on oeis.org

0, 1, -1, 4, -23, 181, -1812, 22037, -315569, 5201602, -97009833, 2019669961, -46432870222, 1168383075471, -31939474693297, 942565598033196, -29866348653695203, 1011335905644178273, -36446897413531401020, 1392821757824071815641, -56259101478392975833333
Offset: 0

Author

Michael De Vlieger, May 16 2025

Keywords

Crossrefs

Composition of A000169 with signs and 1-exp(x).

Programs

  • Mathematica
    nn = 20; f[x_] := -Sum[k^(k - 1)*(1 - Exp[x])^k/k!, {k, nn}];
    Range[0, nn]! * CoefficientList[Series[f[x], {x, 0, nn}], x]

A383986 Expansion of the exponential generating function sqrt(4*exp(x) - exp(2*x) - 2) - 1.

Original entry on oeis.org

0, 1, -1, 1, -13, 61, -601, 5881, -73333, 1021861, -16334401, 290146561, -5707536253, 122821558861, -2873553719401, 72586328036041, -1969306486088773, 57106504958139061, -1762735601974347601, 57705363524117482321, -1996916624448159410893
Offset: 0

Author

Michael De Vlieger, May 16 2025

Keywords

Programs

  • Mathematica
    nn = 20; f[x_] := -1 + Sqrt[1 + 2 x - x^2];
    Range[0, nn]! * CoefficientList[Series[f[-(1 - Exp[x])], {x, 0, nn}], x]

A383988 Series expansion of the exponential generating function -postLie(1-exp(x)) where postLie(x) = -log((1 + sqrt(1-4*x)) / 2) (given by A006963).

Original entry on oeis.org

0, 1, -2, 12, -110, 1380, -22022, 426972, -9747950, 256176660, -7617417302, 252851339532, -9268406209790, 371843710214340, -16206868062692582, 762569209601624892, -38525315595630383630, 2079964082064837282420, -119513562475103977951862
Offset: 0

Author

Michael De Vlieger, May 16 2025

Keywords

Comments

The series -postLie(-x) is the inverse for the substitution of the series comTrias(x), given by the suspension of the Koszul dual of comTrias. - Bérénice Delcroix-Oger, May 28 2025

Crossrefs

Cf. A002050, A006531, A084099, A097388, A101851, A114285, A225883, A383985, A383986, A383987, A383989. Composition of -A006963(-x) and exp(x)-1.

Programs

  • Mathematica
    nn = 18; f[x_] := Log[(1 + Sqrt[1 + 4*x])/2];
    Range[0, nn]! * CoefficientList[Series[f[-(1 - Exp[x])], {x, 0, nn}], x]

A114284 Riordan array ((1-3*x)/(1-x), x).

Original entry on oeis.org

1, -2, 1, -2, -2, 1, -2, -2, -2, 1, -2, -2, -2, -2, 1, -2, -2, -2, -2, -2, 1, -2, -2, -2, -2, -2, -2, 1, -2, -2, -2, -2, -2, -2, -2, 1, -2, -2, -2, -2, -2, -2, -2, -2, 1, -2, -2, -2, -2, -2, -2, -2, -2, -2, 1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 1
Offset: 0

Author

Paul Barry, Nov 20 2005

Keywords

Comments

Inverse of A114283. Row sums are 1-2n. Diagonal sums are A114285. Sequence array of 3*0^n-2.

Examples

			Triangle begins:
  1;
  -2,1;
  -2,-2,1;
  -2,-2,-2,1;
  -2,-2,-2,-2,1;
		

Programs

  • Mathematica
    Table[-2 - 3 Floor[1/2 (-1 + Sqrt[1 + 8 x])] + 3 Floor[1/2 (-1 + Sqrt[9 + 8 x])], {x, 0, 65}] (* Jackson Xier, Oct 07 2011 *)

Formula

T(n, k) = if(k<=n, 3*0^(n-k)-2, 0).
a(n) = -3*floor((1/2)*sqrt(8*n+1)-1/2)+3*floor((1/2)*sqrt(8*n+9)-1/2)-2. - Jackson Xier, Oct 07 2011

A243860 a(n) = 2^(n+1) - (n-1)^2.

Original entry on oeis.org

1, 4, 7, 12, 23, 48, 103, 220, 463, 960, 1967, 3996, 8071, 16240, 32599, 65340, 130847, 261888, 523999, 1048252, 2096791, 4193904, 8388167, 16776732, 33553903, 67108288, 134217103, 268434780, 536870183, 1073741040, 2147482807, 4294966396, 8589933631, 17179868160, 34359737279, 68719475580
Offset: 0

Author

Juri-Stepan Gerasimov, Jun 12 2014

Keywords

Comments

Sequences of the form (k-1)^m - m^(k+1):
k\m | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
-----------------------------------------------------------------------
0 | 1 | -2 | -1 | -4 | -3 | -6 | -5 |
1 | 1 | -1 | -4 | -9 | -16 | -25 | -36 |
2 | 1 | 0 | -7 | -26 | -63 | -124 | -215 |
3 | 1 | 1 | -12 | -73 | -240 | -593 | -1232 |
4 | 1 | 2 | -23 | -216 | -943 | -2882 | -7047 |
5 | 1 | 3 | -43 | -665 | -3840 | -14601 | -42560 |
6 | 1 | 4 | -103 | -2062 | -15759 | -75000 | -264311 |
7 | 1 | 5 | -220 | -6345 | -64240 | -382849 | -1632960 |
8 | 1 | 6 | -463 | -19340 | -259743 | -1936318 | -9960047 |
9 | 1 | 7 | -960 | -58537 | -1044480 | -9732857 | -60204032 |
10 | 1 | 8 | -1967 | -176418 | -4187743 | -48769076 | -362265615 |
11 | 1 | 9 | -3996 | -530441 | -16767216 | -244040625 | -2175782336 |

Examples

			1 = 2^(0+1) - (0-1)^2, 4 = 2^(1+1) - (1-1)^2, 7 = 2^(2+1) - (2-1)^2.
		

Crossrefs

Sequences of the form (k-1)^m - m^(k+1): A000012 (m = 0), A023444 (m = 1), (-1)*(this sequence) for m = 2, A114285 (k = 0),(A000007-A000290) for k = 1, A024001 (k = 2), A024014 (k = 3), A024028 (k = 4), A024042 (k = 5), A024056 (k = 6), A024070 (k = 7), A024084 (k = 8), A024098 (k = 9), A024112 (k = 10), A024126 (k = 11).

Programs

  • Magma
    [2^(n+1) - (n-1)^2: n in [0..35]];
    
  • Maple
    A243860:=n->2^(n + 1) - (n - 1)^2; seq(A243860(n), n=0..30); # Wesley Ivan Hurt, Jun 12 2014
  • Mathematica
    Table[2^(n + 1) - (n - 1)^2, {n, 0, 30}] (* Wesley Ivan Hurt, Jun 12 2014 *)
    LinearRecurrence[{5,-9,7,-2},{1,4,7,12},40] (* Harvey P. Dale, Nov 29 2015 *)
  • PARI
    Vec((6*x^3-4*x^2-x+1)/((x-1)^3*(2*x-1)) + O(x^100)) \\ Colin Barker, Jun 12 2014

Formula

a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4). - Colin Barker, Jun 12 2014
G.f.: (6*x^3-4*x^2-x+1) / ((x-1)^3*(2*x-1)). - Colin Barker, Jun 12 2014

A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).

Original entry on oeis.org

-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0

Author

Keywords

Comments

a(n) is a fifth-order linear recurrence whose main interest is that it is related to (at least) eight other sequences (see the formula section).

Crossrefs

After -1, subsequence of A035106, A198442 and A214297.

Programs

  • Mathematica
    a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
  • PARI
    a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = (n + 1)*(n - 1 + (n mod 2)).
a(n) = n * A109613(n-1) for n>0.
a(n) = -A114285(n) * A109613(n).
a(n) = A002378(n) - A193356(n).
a(n) = A289296(-n).
a(n) = n^2 - (-1)^n * A093178(n).
a(2*k) = A000466(k).
G.f.: (1-3*x-3*x^2-3*x^3)/((-1+x)^3*(1+x)^2).
Showing 1-10 of 10 results.