login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059029 a(n) = n if n is even, 2*n + 1 if n is odd. 9
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
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
LINKS
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
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 *)
PROG
(PARI) a(n)=if(n%2, 2*n+1, n)
(Magma) [n+((n+1)/2)*(1-(-1)^n): n in [0..70]]; // Vincenzo Librandi, Aug 14 2011
CROSSREFS
a(n) = A022998(n+1) - 1 = A043547(n+3) - 3. Partial sums in A032438.
Sequence in context: A318462 A273926 A304882 * A360968 A056434 A143292
KEYWORD
nonn,easy,changed
AUTHOR
Asher Auel, Dec 15 2000
EXTENSIONS
New description from Ralf Stephan, Jun 10 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 26 13:34 EST 2024. Contains 370352 sequences. (Running on oeis4.)