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

A118239 Engel expansion of cosh(1).

Original entry on oeis.org

1, 2, 12, 30, 56, 90, 132, 182, 240, 306, 380, 462, 552, 650, 756, 870, 992, 1122, 1260, 1406, 1560, 1722, 1892, 2070, 2256, 2450, 2652, 2862, 3080, 3306, 3540, 3782, 4032, 4290, 4556, 4830, 5112, 5402, 5700, 6006, 6320, 6642, 6972, 7310, 7656, 8010, 8372
Offset: 1

Views

Author

Eric W. Weisstein, Apr 17 2006

Keywords

Comments

Differs from A002939 only in first term.
This sequence is also the Pierce expansion of cos(1). - G. C. Greubel, Nov 14 2016

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[(2 n - 2) (2 n - 3), {n, 2, 50}]] (* Bruno Berselli, Aug 04 2015 *)
    Join[{1}, LinearRecurrence[{3,-3,1},{2,12,30},25]] (* G. C. Greubel, Oct 27 2016 *)
    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[Cos[1] , 7!], 50] (* G. C. Greubel, Nov 14 2016 *)
  • PARI
    a(n)=max(4*n^2-10*n+6, 1) \\ Charles R Greathouse IV, Oct 22 2014
    
  • Sage
    A118239 = lambda n: falling_factorial(n*2,2) if n>0 else 1
    print([A118239(n) for n in (0..46)]) # Peter Luschny, Aug 04 2015

Formula

a(n) = A002939(n-1) = 2*(n-1)*(2*n-3) for n>1.
From Colin Barker, Apr 13 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: x*(1 - x + 9*x^2 - x^3)/(1-x)^3. (End)
E.g.f.: -6 + x + 2*(3 - 3*x + 2*x^2)*exp(x). - G. C. Greubel, Oct 27 2016
From Amiram Eldar, May 05 2025: (Start)
Sum_{n>=1} 1/a(n) = log(2) + 1.
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - Pi/4 + log(2)/2. (End)

A068379 Engel expansion of sinh(1/2).

Original entry on oeis.org

2, 24, 80, 168, 288, 440, 624, 840, 1088, 1368, 1680, 2024, 2400, 2808, 3248, 3720, 4224, 4760, 5328, 5928, 6560, 7224, 7920, 8648, 9408, 10200, 11024, 11880, 12768, 13688, 14640, 15624, 16640, 17688, 18768, 19880, 21024, 22200, 23408, 24648, 25920, 27224, 28560
Offset: 1

Views

Author

Benoit Cloitre, Mar 03 2002

Keywords

Comments

Cf. A006784 for Engel expansion definition.
The MathWorld link mentions the closed form of the Engel expansion of sinh(1) = A068377. - Georg Fischer, Nov 22 2020

Examples

			sinh(1/2) = 1/2 + 1/(2*24) + 1/(2*24*80) + 1/(2*24*80*168) + 1/(2*24*80*168*288) + ... = 0.52109530549374736162242562641... = A334367.
		

Crossrefs

Programs

Formula

a(n) = 8*(n*(2*n-3)+1) for n > 1, a(1)=2.
From Colin Barker, Apr 13 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4.
G.f.: 2*x*(1+9*x+7*x^2-x^3)/(1-x)^3. (End)
From Amiram Eldar, May 05 2025: (Start)
Sum_{n>=1} 1/a(n) = (3-log(2))/4.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3/4 - Pi/16 - log(2)/8. (End)
From Elmo R. Oliveira, May 29 2025: (Start)
E.g.f.: 2*(4*exp(x)*(1 - x + 2*x^2) + (x - 4)).
a(n) = 2*A033586(n-1) for n >= 2.
a(n) = 4*A002943(n-1) for n >= 2. (End)

Extensions

Edited, offset 1 and a(1)=2 in programs and b-file by Georg Fischer, Nov 22 2020

A068380 Engel expansion of sinh(1/3).

Original entry on oeis.org

3, 54, 180, 378, 648, 990, 1404, 1890, 2448, 3078, 3780, 4554, 5400, 6318, 7308, 8370, 9504, 10710, 11988, 13338, 14760, 16254, 17820, 19458, 21168, 22950, 24804, 26730, 28728, 30798, 32940, 35154, 37440, 39798, 42228, 44730, 47304, 49950, 52668, 55458, 58320, 61254
Offset: 1

Views

Author

Benoit Cloitre, Mar 03 2002

Keywords

Comments

Cf. A006784 for the definition of the Engel expansion.
The MathWorld link mentions the closed form of the Engel expansion of sinh(1). - Georg Fischer, Nov 22 2020

Examples

			sinh(1/3) = 1/3 + 1/(3*54) + 1/(3*54*180) + 1/(3*54*180*378) + 1/(3*54*180*378*648) + ... = 0.33954055725615013910126061...
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -3, 1}, {3, 54, 180, 378}, 50]
  • PARI
    a(n)=if(n<=1, 3, 18*(n*(2*n-3)+1));
    
  • PARI
    my(x='x+O('x^43)); Vec(3*x*(1+15*x+9*x^2-x^3)/(1-x)^3) \\ Elmo R. Oliveira, May 29 2025

Formula

a(n) = 18*(n*(2*n-3)+1) for n > 1, a(1)=3. - Ralf Stephan, Sep 03 2003
From Colin Barker, Apr 13 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4.
G.f.: 3*x*(x^3-9*x^2-15*x-1)/(x-1)^3. (End)
From Amiram Eldar, May 05 2025: (Start)
Sum_{n>=1} 1/a(n) = (4-log(2))/9.
Sum_{n>=1} (-1)^(n+1)/a(n) = 4/9 - Pi/36 - log(2)/18. (End)
From Elmo R. Oliveira, May 29 2025: (Start)
E.g.f.: 3*(6*exp(x)*(1 - x + 2*x^2) + (x - 6)).
a(n) = 9*A002943(n-1) for n >= 2. (End)

Extensions

Edited, offset 1 and a(1)=3 by Georg Fischer, Nov 23 2020
More terms from Elmo R. Oliveira, May 29 2025

A280187 Numbers n such that 2 * (1^n + 2^n + 3^n + ... + n^n) is not 0 (mod n), but 2 * (1^d + 2^d + 3^d + ... + d^d) is 0 (mod d) for each other d | n.

Original entry on oeis.org

6, 20, 110, 272, 506, 812, 2162, 2756, 3422, 4970, 6806, 7832, 11342, 12656, 17030, 18632, 22052, 27722, 29756, 31862, 36290, 38612, 51302, 54056, 56882, 62750, 65792, 68906, 72092, 85556, 96410, 100172, 120062, 124256, 128522
Offset: 1

Views

Author

Keywords

Crossrefs

Primitive elements of A228870.
Subsequence of A002943. Also a subsequence of A028689, A036689, A053198, A068377, A079143, A128672, A220211 and other sequences ...- Paolo P. Lava, Jan 10 2017

Programs

  • PARI
    has(n)=my(f=factor(n)[,1]); for(i=1,#f, if(n%(f[i]-1)==0 && f[i]>2, return(1))); 0
    is(n)=if(n%2, return(0)); if(n%3==0, return(n==6)); if(n%20==0, return(n==20)); if(!has(n), return(0)); my(f=factor(n)[,1]); for(i=1,#f, if(has(n/f[i]), return(0))); 1 \\ Charles R Greathouse IV, Dec 28 2016

A098931 a(0) = 1, a(n) = 1 + 2*3 + 4*5 + 6*7 + ... + (2n)*(2n+1) for n > 0.

Original entry on oeis.org

1, 7, 27, 69, 141, 251, 407, 617, 889, 1231, 1651, 2157, 2757, 3459, 4271, 5201, 6257, 7447, 8779, 10261, 11901, 13707, 15687, 17849, 20201, 22751, 25507, 28477, 31669, 35091, 38751, 42657, 46817, 51239, 55931, 60901, 66157, 71707, 77559, 83721
Offset: 0

Views

Author

Miklos Kristof, Oct 20 2004

Keywords

Comments

If a(n) = a0, a1, a2, a3, ... then Sum(a(n))= a0, a0+a1, a0+a1+a2, a0+a1+a2+a3, ...

Examples

			a(0) = 1;
a(1) = 1 + 2*3 = 7;
a(2) = 1 + 2*3 + 4*5 = 27, etc.
		

Crossrefs

Cf. A068377.

Programs

Formula

a(n) = 1 + 3*n^2 + n*(5 + 4*n^2)/3.
G.f.: (1 + 3*x + 5*x^2 - x^3)/(1-x)^4.
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Vincenzo Librandi, Jul 28 2015
From Robert Israel, Jul 28 2015: (Start)
E.g.f.: (1+6*x+7*x^2+(4/3)*x^3)*exp(x).
a(n) = 1 + Sum(A068377(i),i=1..n+1). (End)

Extensions

Edited and extended by Robert G. Wilson v, Oct 23 2004

A226940 a(0)=0; if a(n-1) is odd, a(n) = n + a(n-1), otherwise a(n) = n - a(n-1).

Original entry on oeis.org

0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42, -30, 43, 57, 72, -56, 73, 91, 110, -90, 111, 133, 156, -132, 157, 183, 210, -182, 211, 241, 272, -240, 273, 307, 342, -306, 343, 381, 420, -380, 421, 463, 506, -462, 507, 553, 600, -552, 601, 651, 702, -650, 703, 757
Offset: 0

Views

Author

Enrico Santilli, Jun 23 2013

Keywords

Crossrefs

Cf. A081348 (second bisection); A002939, A054554, A054569, A068377.

Programs

  • Magma
    [IsZero(n) select 0 else IsOdd(Self(n)) select n+Self(n) else n-Self(n): n in [0..60]]; // Bruno Berselli, Jul 01 2013
    
  • Mathematica
    LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42}, 60] (* Bruno Berselli, Jul 01 2013 *)
  • Maxima
    makelist(coeff(taylor(x*(1+3*x+6*x^2-2*x^3+4*x^4+4*x^5+2*x^6-6*x^7+3*x^8+x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3), x, 0, n), x, n), n, 0, 60); /* Bruno Berselli, Jul 01 2013 */

Formula

G.f.: x*(1 +3*x +6*x^2 -2*x^3 +4*x^4 +4*x^5 +2*x^6 -6*x^7 +3*x^8 +x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3). [Bruno Berselli, Jul 01 2013]
a(n) = 3*a(n-4) -3*a(n-8) +a(n-12). [Bruno Berselli, Jul 01 2013]
a(4n) = -A002939(n), a(4n+1) = A054569(n+1), a(4n+2) = A054554(n+2), a(4n+3) = A068377(n+2). [Bruno Berselli, Jul 02 2013]

Extensions

More terms from Bruno Berselli, Jul 01 2013
Showing 1-6 of 6 results.