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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181988 If n is odd, a(n) = (n+1)/2; if n is even, a(n) = a(n/2) + A003602(n). 4
1, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 5, 9, 10, 10, 9, 11, 12, 12, 8, 13, 14, 14, 12, 15, 16, 16, 6, 17, 18, 18, 15, 19, 20, 20, 12, 21, 22, 22, 18, 23, 24, 24, 10, 25, 26, 26, 21, 27, 28, 28, 16, 29, 30, 30, 24, 31, 32, 32, 7, 33, 34, 34, 27, 35, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The original definition was "Interleaved multiples of the positive integers".

This sequence is A_1 where A_k = Interleave(k*counting,A_(k+1)).

Show your friends the first 15 terms and see if they can guess term number 16. (If you want to be fair, you might want to show them A003602 first.) - David Spies, Sep 17 2012

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..8191

FORMULA

a((2*n-1)*2^p) = n*(p+1), p >= 0.

a(n) = A001511(n)*A003602(n). - L. Edson Jeffery, Nov 21 2015. (Follows directly from above formula.) - Antti Karttunen, Jan 19 2016

MAPLE

nmax:=70: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := n*(p+1) od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 21 2013

PROG

(Haskell)

interleave (hdx : tlx) y = hdx : interleave y tlx

oeis003602 = interleave [1..] oeis003602

oeis181988 = interleave [1..] (zipWith (+) oeis003602 oeis181988)

(Python)

from itertools import count

def interleave(A):

    A1=next(A)

    A2=interleave(A)

    while True:

        yield next(A1)

        yield next(A2)

def multiples(k):

    return (k*i for i in count(1))

interleave(multiples(k) for k in count(1))

(Scheme, with memoization-macro definec)

(definec (A181988 n) (if (even? n) (+ (A003602 n) (A181988 (/ n 2))) (A003602 n)))

;; Antti Karttunen, Jan 19 2016

CROSSREFS

Cf. A220466.

Cf. A001511, A003602.

Sequence in context: A134482 A132921 A255232 * A194173 A028825 A132924

Adjacent sequences:  A181985 A181986 A181987 * A181989 A181990 A181991

KEYWORD

easy,nonn

AUTHOR

David Spies, Apr 04 2012

EXTENSIONS

Definition replaced by a formula provided by David Spies, Sep 17 2012.  N. J. A. Sloane, Nov 22 2015

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 February 23 23:15 EST 2018. Contains 299595 sequences. (Running on oeis4.)