The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 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 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 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.

Last modified May 26 08:39 EDT 2020. Contains 334620 sequences. (Running on oeis4.)