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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002517 Earliest sequence with a(a(n))=3n. 10
0, 2, 3, 6, 5, 12, 9, 8, 21, 18, 11, 30, 15, 14, 39, 36, 17, 48, 27, 20, 57, 24, 23, 66, 63, 26, 75, 54, 29, 84, 33, 32, 93, 90, 35, 102, 45, 38, 111, 42, 41, 120, 117, 44, 129, 108, 47, 138, 51, 50, 147, 144, 53, 156, 81, 56, 165, 60, 59, 174, 171, 62, 183, 72, 65, 192 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

a(3*n+1) = A016789(n), a(3*n+2) = A017197(n). - Reinhard Zumkeller, Jun 04 2015

LINKS

T. D. Noe, Table of n, a(n) for n = 0..1000

Index entries for sequences of the a(a(n)) = 2n family

FORMULA

a(3n)=3*a(n), a(3n+1)=3n+2, a(3n+2)=9n+3

MATHEMATICA

a[n_] := a[n] = Which[ Mod[n, 3] == 0, 3*a[n/3], Mod[n, 3] == 1, n+1, True, 3*(n-1)]; Table[a[n], {n, 0, 65}] (* Jean-Fran├žois Alcover, Sep 24 2012 *)

PROG

(Haskell)

import Data.List (transpose)

a002517 n = a002517_list !! n

a002517_list = 0 : concat

   (transpose [[2, 5 ..], [3, 12 ..], map (* 3) $ tail a002517_list])

-- Reinhard Zumkeller, Jun 04 2015

CROSSREFS

Cf. A002516, A007379, A005843.

Cf. A007494 (sorted), A016789, A017197.

Sequence in context: A001634 A172989 A095113 * A253568 A053570 A129647

Adjacent sequences:  A002514 A002515 A002516 * A002518 A002519 A002520

KEYWORD

nonn,nice,easy

AUTHOR

Colin Mallows

EXTENSIONS

Formula and more terms from Henry Bottomley, Apr 27 2000

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 19 07:51 EST 2019. Contains 320309 sequences. (Running on oeis4.)