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!)
A258049 Position of n in A258047 after deleting the initial 0. 4
1, 2, 4, 5, 7, 9, 11, 14, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 36, 38, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A258047 = (0,1,2,-1,3,6,-7,5,-3,7,...). Remove the initial 0 to get (1,2,-1,3,6,-7,5,6,-3,7,...), and note that (1,2,3,4,...) occupy positions 1,2,4,7,..., (as in A258049) and that (-1,-2,-3,...) occupy positions 3,6,8,... (as in A258050).
LINKS
MATHEMATICA
{a, f} = {{1}, {0}}; Do[tmp = {#, # - Last[a]} &[Min[Complement[#, Intersection[a, #]]&[Last[a] + Complement[#, Intersection[f, #]] &[Range[2 - Last[a], -1]]]]];
If[! IntegerQ[tmp[[1]]], tmp = {Last[a] + #, #} &[NestWhile[# + 1 &, 1, ! (! MemberQ[f, #] && ! MemberQ[a, Last[a] - #]) &]]];
AppendTo[a, tmp[[1]]]; AppendTo[f, tmp[[2]]], {500}];
-1 + Flatten[Position[Sign[f], 1]] (* A258049 *)
-1 + Flatten[Position[Sign[f], -1]] (* A258050 *) (* Peter J. C. Moses, May 14 2015 *)
CROSSREFS
Cf. A258047, A258050 (complement).
Sequence in context: A234369 A056838 A045922 * A057352 A156625 A259280
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 05 2015
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 March 28 16:58 EDT 2024. Contains 371254 sequences. (Running on oeis4.)