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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074308 Inverse of permutation in A074307. 4

%I #18 Dec 21 2023 07:43:23

%S 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,

%T 28,13,63,16,35,33,72,39,37,20,81,23,44,42,90,48,46,22,99,25,53,51,

%U 108,57,55,29,117,32,62,60,126,66,64,31,135,34,71,69,144,75,73,38,153,41,80

%N Inverse of permutation in A074307.

%C A permutation of the nonnegative integers.

%H G. Venturini, <a href="https://doi.org/10.1002/sapm1992863185">Iterates of number-theoretic functions with periodic rational coefficients (Generalization of the 3x+1 problem)</a>, Stud. Appl. Math., 86 (1992), 185-218.

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%H <a href="/index/Rec#order_24">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,-1).

%F a(A074307(n)) = n. - _R. J. Mathar_, Feb 27 2007

%p 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

%t A074305[n_] := A074305[n] = Module[{m = Floor[n/3]}, If[3m == n, 2m, If[3m + 1 == n, 4m + 3, 4m + 1]]];

%t A074307[n_] := A074305[A074305[n]];

%t A074308[n_] := A074308[n] = Module[{a = 0}, While[A074307[a] != n, a = a+1]; Return[a]];

%t Table[A074308[n], {n, 0, 70}] (* _Jean-François Alcover_, Dec 21 2023, after _R. J. Mathar_ *)

%Y Cf. A074305, A074306, A074307.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Sep 23 2002

%E Corrected and extended by _R. J. Mathar_, Feb 27 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 16:52 EDT 2024. Contains 371962 sequences. (Running on oeis4.)