login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022998 If n is odd then n else 2n. 44
0, 1, 4, 3, 8, 5, 12, 7, 16, 9, 20, 11, 24, 13, 28, 15, 32, 17, 36, 19, 40, 21, 44, 23, 48, 25, 52, 27, 56, 29, 60, 31, 64, 33, 68, 35, 72, 37, 76, 39, 80, 41, 84, 43, 88, 45, 92, 47, 96, 49, 100, 51, 104, 53, 108, 55, 112, 57, 116, 59, 120, 61, 124, 63, 128, 65, 132, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Also for n>0: numerator of sum{2/(i*(i+1))|1<=i<=n}, denominator=A026741. - Reinhard Zumkeller, Jul 25 2002

For n>2: a(n) = GCD(A143051((n-1)^2),A143051(1+(n-1)^2)) = A050873(A000290(n-1),A002522(n-1)). - Reinhard Zumkeller, Jul 20 2008

Partial sums give the generalized octagonal numbers A001082. - Omar E. Pol, Sep 10 2011

Multiples of 4 and odd numbers interleaved. - Omar E. Pol, Sep 25 2011

The Pisano period lengths modulo m appear to be A066043(m). - R. J. Mathar, Oct 08 2011

The partial sums a(n)/A026741(n+1) given by R. Zumkeller in a comment above are 2*n/(n+1) (telescopic sum), and thus converge to 2. - Wolfdieter Lang, Apr 09 2013

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..10000

Index to sequences with linear recurrences with constant coefficients, signature (0,2,0,-1).

FORMULA

Denominator of (n+1)*(n-1)*(2*n+1)/(2*n) (for n>0).

a(n+1) = lcm(n, n+2)/n + lcm(n, n+2)/(n+2) for all n >= 1 - Asher Auel (asher.auel(AT)reed.edu) Dec 15 2000

Multiplicative with a(2^e)=2^(e+1), a(p^e)=p^e, p>2.

G.f. x(x^2+4x+1)/(1-x^2)^2. - Ralf Stephan, Jun 10 2003

a(n) = 3n/2+n(-1)^n/2 = n(3+(-1)^n)/2. - Paul Barry, Sep 04 2003

a(n) = A059029(n-1)+1 = A043547(n+2)-2.

a(n)a(n+3) = -4 + a(n+1)a(n+2).

a(n) = n*(mod(n+1,2)+1) = n^2 + 2n - 2n*floor((n+1)/2) - William A. Tedeschi, Feb 29 2008

Contribution from Johannes W. Meijer, Jun 18 2009: (Start)

a(n) = denom((n+1)/(2*n)) for n =>1; A026741 (n+1) = numer((n+1)/(2*n)) for n =>1.

(End)

a(n) = 2*a(n-2)-a(n-4).

Dirichlet g.f. zeta(s-1)*(1+2^(1-s)). - R. J. Mathar, Mar 10 2011

a(n) = n * (2 - n mod 2) = n * A000034(n+1). [Reinhard Zumkeller, Mar 31 2012]

MAPLE

A022998 := proc(n) if type(n, 'odd') then n ; else 2*n; end if; end proc: # R. J. Mathar, Mar 10 2011

PROG

(PARI) a(n)=if(n%2, n, 2*n)

(Sage) [n/2*power_mod(2, n, 6) for n in xrange(0, 68)] #A [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Nov 03 2009]

(MAGMA) [((-1)^n+3)*n/2: n in [0..70]]; // Vincenzo Librandi, Sep 17 2011

(Haskell)

a022998 n = a000034 (n + 1) * n

a022998_list = zipWith (*) [0..] $ tail a000034_list

-- Reinhard Zumkeller, Mar 31 2012

CROSSREFS

Cf. A059026.

Column 4 of A195151. - Omar E. Pol, Sep 25 2011

Cf. A000034, A001082 (partial sums).

Sequence in context: A092383 A156028 A021232 * A082895 A086938 A126084

Adjacent sequences:  A022995 A022996 A022997 * A022999 A023000 A023001

KEYWORD

nonn,easy,mult

AUTHOR

N. J. A. Sloane.

EXTENSIONS

More terms from Michael Somos, Aug 07 2000.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 18 09:10 EDT 2013. Contains 225419 sequences.