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);

A059031 Fifth main diagonal of A059026: a(n) = B(n+4,n) = lcm(n+4,n)/(n+4) + lcm(n+4,n)/n - 1 for all n >= 1.

Original entry on oeis.org

5, 3, 9, 2, 13, 7, 17, 4, 21, 11, 25, 6, 29, 15, 33, 8, 37, 19, 41, 10, 45, 23, 49, 12, 53, 27, 57, 14, 61, 31, 65, 16, 69, 35, 73, 18, 77, 39, 81, 20, 85, 43, 89, 22, 93, 47, 97, 24, 101, 51, 105, 26, 109, 55, 113, 28, 117, 59, 121, 30, 125, 63, 129, 32, 133, 67
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+4,m),m=1..90);
  • Mathematica
    LinearRecurrence[{0,0,0,2,0,0,0,-1},{5,3,9,2,13,7,17,4},70] (* Harvey P. Dale, Aug 19 2019 *)

Formula

a(2n+1) = 4n+5, a(4n+2) = 4n+3, a(4n+4) = 4n+2. - Ralf Stephan, Jun 10 2005
G.f.: -x*(-5-3*x-9*x^2-2*x^3-3*x^4-x^5+x^6) / ( (x-1)^2*(1+x)^2*(x^2+1)^2 ). - R. J. Mathar, Sep 20 2011
Showing 1-3 of 3 results.