The OEIS is supported by the many generous donors to the OEIS Foundation.

A074308
Inverse of permutation in A074307.
4
0, 3, 1, 2, 9, 5, 8, 6, 18, 12, 10, 4, 27, 7, 17, 15, 36, 21, 19, 11, 45, 14, 26, 24, 54, 30, 28, 13, 63, 16, 35, 33, 72, 39, 37, 20, 81, 23, 44, 42, 90, 48, 46, 22, 99, 25, 53, 51, 108, 57, 55, 29, 117, 32, 62, 60, 126, 66, 64, 31, 135, 34, 71, 69, 144, 75, 73, 38, 153, 41, 80
OFFSET
0,2
A permutation of the nonnegative integers.
FORMULA
a(A074307(n)) = n. - R. J. Mathar, Feb 27 2007
MAPLE
A074305 := proc(n) option remember ; local m ; m := floor(n/3) ; if 3*m = n then 2*m ; elif 3*m+1 =n then 4*m+3 ; else 4*m+1 ; fi ; end: A074307 := proc(n) A074305(A074305(n)) ; end: A074308 := proc(n) local a ; a := 0 ; while A074307(a) <> n do a := a+1 ; od ; RETURN(a) ; end: for n from 0 to 70 do printf("%d, ", A074308(n)) ; od ; # R. J. Mathar, Feb 27 2007
MATHEMATICA
A074305[n_] := A074305[n] = Module[{m = Floor[n/3]}, If[3m == n, 2m, If[3m + 1 == n, 4m + 3, 4m + 1]]];
A074307[n_] := A074305[A074305[n]];
A074308[n_] := A074308[n] = Module[{a = 0}, While[A074307[a] != n, a = a+1]; Return[a]];
Table[A074308[n], {n, 0, 70}] (* Jean-François Alcover, Dec 21 2023, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 23 2002
EXTENSIONS
Corrected and extended by R. J. Mathar, Feb 27 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 20 02:41 EDT 2024. Contains 376016 sequences. (Running on oeis4.)