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

A059029 a(n) = n if n is even, 2*n + 1 if n is odd.

Original entry on oeis.org

0, 3, 2, 7, 4, 11, 6, 15, 8, 19, 10, 23, 12, 27, 14, 31, 16, 35, 18, 39, 20, 43, 22, 47, 24, 51, 26, 55, 28, 59, 30, 63, 32, 67, 34, 71, 36, 75, 38, 79, 40, 83, 42, 87, 44, 91, 46, 95, 48, 99, 50, 103, 52, 107, 54, 111, 56, 115, 58, 119, 60, 123, 62, 127, 64, 131, 66, 135
Offset: 0

Views

Author

Asher Auel, Dec 15 2000

Keywords

Comments

a(n-1) = n^k - 1 mod 2*n, n >= 1, for any k >= 2, also for k = n. - Wolfdieter Lang, Dec 21 2011

Crossrefs

a(n) = A022998(n+1) - 1 = A043547(n+3) - 3. Partial sums in A032438.

Programs

  • Magma
    [n+((n+1)/2)*(1-(-1)^n): n in [0..70]]; // Vincenzo Librandi, Aug 14 2011
  • Maple
    B := (n,m) -> lcm(n,m)/n + lcm(n,m)/m - 1: seq(B(m+2,m),m=1..90);
  • Mathematica
    Table[n +(n+1)*(1-(-1)^n)/2, {n,0,70}] (* G. C. Greubel, Nov 08 2018 *)
    Table[If[EvenQ[n],n,2n+1],{n,0,70}] (* or *) LinearRecurrence[{0,2,0,-1},{0,3,2,7},70] (* Harvey P. Dale, Jul 23 2025 *)
  • PARI
    a(n)=if(n%2,2*n+1,n)
    

Formula

G.f.: x*(x^2 + 2*x + 3)/(1 - x^2)^2. - Ralf Stephan, Jun 10 2003
Third main diagonal of A059026: a(n) = B(n+2, n) = lcm(n+2, n)/(n+2) + lcm(n+2, n)/n - 1 for all n >= 1.
a(2*n) + a(2*n+1) = A016945(n). - Paul Curtz, Aug 29 2008
E.g.f.: 2*x*cosh(x) + (1 + x)*sinh(x). - Franck Maminirina Ramaharo, Nov 08 2018

Extensions

New description from Ralf Stephan, Jun 10 2003

A059026 Table B(n,m) read by rows: B(n,m) = LCM(n,m)/n + LCM(n,m)/m - 1 for all 1<=m<=n.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 2, 6, 1, 5, 6, 7, 8, 1, 6, 3, 2, 4, 10, 1, 7, 8, 9, 10, 11, 12, 1, 8, 4, 10, 2, 12, 6, 14, 1, 9, 10, 3, 12, 13, 4, 15, 16, 1, 10, 5, 12, 6, 2, 7, 16, 8, 18, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 12, 6, 4, 3, 16, 2, 18, 4, 6, 10, 22, 1, 13, 14, 15, 16
Offset: 1

Views

Author

Asher Auel, Dec 15 2000

Keywords

Comments

In an n X m box, a ball makes B(n,m) "bounces" starting at one corner until it reaches another corner, only allowed to travel on diagonal grid lines. B(n+2,n) = A022998(n+1) for all n >= 1. B(2n-1,n) = A016777(n) = 3n + 1 for all n >= 1 (central vertical).

Crossrefs

Programs

  • Maple
    B := (n,m) -> lcm(n,m)/n + lcm(n,m)/m - 1: seq(seq(B(n,m), n=1..m),m=1..15);

A059030 Fourth main diagonal of A059026: a(n) = B(n+3,n) = lcm(n+3,n)/(n+3) + lcm(n+3,n)/n - 1 for all n >= 1.

Original entry on oeis.org

4, 6, 2, 10, 12, 4, 16, 18, 6, 22, 24, 8, 28, 30, 10, 34, 36, 12, 40, 42, 14, 46, 48, 16, 52, 54, 18, 58, 60, 20, 64, 66, 22, 70, 72, 24, 76, 78, 26, 82, 84, 28, 88, 90, 30, 94, 96, 32, 100, 102, 34, 106, 108, 36, 112, 114, 38, 118, 120, 40, 124, 126, 42, 130
Offset: 1

Views

Author

Asher Auel, Dec 15 2000

Keywords

Crossrefs

Programs

  • Maple
    B := (n,m) -> lcm(n,m)/n + lcm(n,m)/m - 1: seq(B(m+3,m),m=1..90);

Formula

G.f.: x(2x^3+2x^2+6x+4)/(1-x^3)^2.
Showing 1-3 of 3 results.