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!)
A050138 a(1)=2, a(2)=6. For n >= 2, a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 3*n. 3
2, 6, 3, 1, 15, 7, 21, 10, 5, 30, 33, 16, 8, 4, 45, 22, 11, 54, 27, 13, 63, 31, 69, 34, 17, 78, 39, 19, 9, 90, 93, 46, 23, 102, 51, 25, 12, 114, 57, 28, 14, 126, 129, 64, 32, 138, 141, 70, 35, 150, 75, 37, 18, 162, 81, 40, 20, 174, 87, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Does this sequence contain every positive integer exactly once?
Inverse: 4, 1, 3, 14, 9, 2, 6, 13, 29, 8, 17, 37, 20, 41, 5, 12, 25, 53, ..., . - Robert G. Wilson v, Apr 09 2018
LINKS
MAPLE
S:= {0, 2, 6}: A[1]:= 2: A[2]:= 6:
for n from 3 to 100 do
t:= floor(A[n-1]/2);
if member(t, S) then t:= 3*n fi;
A[n]:= t;
S:= S union {t};
od:
seq(A[n], n=1..100); # Robert Israel, Apr 09 2018
MATHEMATICA
f[s_] := Block[{b = Floor[s[[-1]]/2], l = Length@ s}, Append[s, If[MemberQ[s, b], 3l, b]]]; s = {0, 2, 6}; Nest[f, s, 57] (* Robert G. Wilson v, Apr 09 2018 *)
CROSSREFS
Sequence in context: A021042 A136694 A164104 * A108443 A201761 A011042
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
Name corrected by Robert Israel, Apr 09 2018
STATUS
approved

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 18 18:49 EDT 2024. Contains 371781 sequences. (Running on oeis4.)