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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080512 a(n) = n if n is odd, a(n) = 3*n/2 if n is even. 33
1, 3, 3, 6, 5, 9, 7, 12, 9, 15, 11, 18, 13, 21, 15, 24, 17, 27, 19, 30, 21, 33, 23, 36, 25, 39, 27, 42, 29, 45, 31, 48, 33, 51, 35, 54, 37, 57, 39, 60, 41, 63, 43, 66, 45, 69, 47, 72, 49, 75, 51, 78, 53, 81, 55, 84, 57, 87, 59, 90, 61, 93, 63, 96, 65, 99, 67, 102 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Multiplicative with a(2^e) = 3*2^(e-1), a(p^e) = p^e otherwise. - Christian G. Bower, May 17 2005

First differences of the generalized heptagonal numbers A085787. - Omar E. Pol, Sep 10 2011

Last term in n-th row of A080511.

Also A005408 and positive terms of A008585 interleaved. - Omar E. Pol, May 28 2012

a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized heptagonal numbers. - Omar E. Pol, Jul 27 2018

LINKS

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

FORMULA

a(n) = n if n is odd, a(n) = 3*n/2 if n is even.

G.f.: (1+3*x+x^2)/((1-x^2)^2); a(n)=n*(5+(-1)^n)/4. - Paul Barry, Sep 04 2003

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

Equals A126988 * (1, 1, 0, 0, 0,...) - Gary W. Adamson, Apr 17 2007

MATHEMATICA

Table[If[EvenQ[n], 3n/2, n], {n, 68}] (* Jayanta Basu, May 20 2013 *)

PROG

(MAGMA) [n*(5+(-1)^n)/4: n in [1..60]]; // Vincenzo Librandi, Sep 11 2011

(Haskell)

import Data.List (transpose)

a080512 n = if m == 0 then 3 * n' else n  where (n', m) = divMod n 2

a080512_list = concat $ transpose [[1, 3 ..], [3, 6 ..]]

-- Reinhard Zumkeller, Apr 06 2015

CROSSREFS

Cf. A080511, A008619, A126988.

Cf. A064455, A085787.

Sequence in context: A295220 A280167 A257143 * A225441 A102245 A038167

Adjacent sequences:  A080509 A080510 A080511 * A080513 A080514 A080515

KEYWORD

nonn,easy,mult

AUTHOR

Amarnath Murthy, Mar 20 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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 22:16 EDT 2018. Contains 316404 sequences. (Running on oeis4.)