previndexinfonext

code guessing, round #87 (completed)

started at ; stage 2 at ; ended at

specification

silly little pixie, me. identify the odd numbers in this very sequence. submissions can be written in any language.

identify thyselves, O ones who're odd
or rather those we keep in company
for it's our friends who make us how we are
beyond our laughs and personalities
another natural number sequence, see
our first is one, alone as always, next
the smallest still in line with the decree
that n is only in if the nth is hexed
here hexed of course in terms of two and kin
for we odd ones as it were let in our friends
to grow what makes us us with what we'll've been
this infinite sequence thus can meet no end
your challenge then (no API requirement)
produce some terms, as many as desired

there are a number of positive integer sequences A for which A(A(i)) is odd for all i. there are also a number of such sequences which are strictly increasing (i < j implies A(i) < A(j)). but there is 1 single such sequence where the value of A(i) is as small as possible for all i. it's this sequence that is our topic today, and it starts with these terms:

1, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 48, 49, 50...

your challenge is to conjure terms of this sequence, OEIS A079905, in some type of way. as any language is allowed, there is no fixed API.

results

  1. 👑 theqwertiest +3 -0 = 3
    1. essaie (was kimapr)
    2. haru~
    3. seshoumara
    4. oleander
    5. kimapr (was essaie)
  2. essaie +3 -1 = 2
    1. haru~ (was theqwertiest)
    2. kimapr
    3. theqwertiest (was haru~)
    4. seshoumara
    5. oleander
  3. kimapr +2 -3 = -1
    1. haru~ (was theqwertiest)
    2. oleander (was haru~)
    3. seshoumara
    4. theqwertiest (was oleander)
    5. essaie
  4. oleander +1 -2 = -1
    1. essaie (was theqwertiest)
    2. kimapr
    3. seshoumara (was haru~)
    4. haru~ (was seshoumara)
    5. theqwertiest (was essaie)
  5. haru~ +0 -1 = -1
    1. essaie (was theqwertiest)
    2. oleander (was kimapr)
    3. kimapr (was seshoumara)
    4. theqwertiest (was oleander)
    5. seshoumara (was essaie)
  6. seshoumara +1 -3 = -2
    1. essaie (was theqwertiest)
    2. kimapr
    3. oleander (was haru~)
    4. theqwertiest (was oleander)
    5. haru~ (was essaie)

entries

you can download all the entries

entry #1

written by theqwertiest
submitted at
0 likes

guesses
comments 0

post a comment


o.lua ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
   times = 93   -- 1 3 5 6 7 9 11 12 13 14
   array = {1, 3, 6}  -- 15 17 19 21 23 24
   for i = 3, times do   -- 25 26 27 28 29
      array[i] = array[i-1] + 1   -- 30 31
               + (array[i] and (array[i-1]
               % 2) or 0)   -- 33 35 37 39
      array[array[i]] = i   -- 41 43 45 47
   end    -- 48 49 50 51 52 53 54 55 56 57
   for i = 1, times do   -- 58 59 60 61 62
      print(array[i]) -- 63 65 67 69 71 73
   end    -- 75 77 79 81 83 85 87 89 91 93

entry #2

written by kimapr
submitted at
0 likes

guesses
comments 0

post a comment


download.txt ASCII text
1
2
3
this submission is too large

please download it from this website: https://github.com/staticallyLinkedGirls482/cg87/raw/refs/heads/master/cg87.tar.zst

entry #3

written by haru~
submitted at
1 like

guesses
comments 0

post a comment


a-valid-submission.png PNG image data, 2480 x 3508, 8-bit/color RGBA, non-interlaced

entry #4

written by seshoumara
submitted at
1 like

guesses
comments 0

post a comment


cg87.snobol4 ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
INIT    NTH_TERM = INPUT
        FOUND    = 0
        ITER     = 0
        MODE     = -1
        COUNTER  = 3

DO      REMDR(ITER, 2) 0        :S(EVEN)        F(ODD)
UNTIL
        FOUND NTH_TERM          :S(END)
        ITER     = ITER + 1     :(DO)

EVEN    LT(MODE, 0)             :S(DROP)        F(INCLUDE)
ODD     OUTPUT   = ITER
        FOUND    = FOUND + 1    :(UNTIL)

DROP    COUNTER  = COUNTER - 1
        GT(COUNTER, 0)          :S(UNTIL)
        MODE     = MODE * -1
        COUNTER  = MODE         :(UNTIL)

INCLUDE OUTPUT   = ITER
        FOUND    = FOUND + 1
        COUNTER  = COUNTER - 1
        GT(COUNTER, 0)          :S(UNTIL)
        MODE     = MODE * -2
        COUNTER  = MODE * -1    :(UNTIL)

END

entry #5

written by oleander
submitted at
0 likes

guesses
comments 0

post a comment


cg87 ASCII text, with no line terminators
1
f(x)={x=1:1,x=2:3,max(join([2...x-1][f([2...x-1])=x],[0]))=0:f(x-1)+1,f(x-1)+1+mod(f(x-1),2)}

entry #6

written by essaie
submitted at
0 likes

guesses
comments 0

post a comment


you are weird ASCII text, with very long lines (2137), with CRLF line terminators
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var entry = function(n) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              O = ((O)=>O(([s,a,b,c])=>!(b&&c.length)?a:s([s,a+c[0],b-1,c.slice(1)]),1,n-1,O(([c,d,e,f])=>f.length>=d?f:c([c,d,e*2,f.concat(new Array(e).fill(1)).concat(new Array(e).fill(2))]),n,2,[2, 2])))((...q)=>q[0](q));
  // FACT: entry(entry(n)) = 2 * n + 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           /*  what is it you're looking for?  */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <- you're missing out on some cool stuff over on that way, btw. check it out for me? i'll call it a favor.
  // Functionally, entry^2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      /*    salvation among the lost?     */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 you're still here. stop it. i can feel your slimy oculi smearing a leer all over my delicate silences.
  if (1 == n) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /*  something precious, desperate,  */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      return 1;
    return n;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 /*     and never as it seems?       */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 // else
  } else {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   /*            i would pity you,     */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          for (i=0,a=1;i<2*n&&a>2;i++,a--) { // even numbrs whose binary representation starts with 11
    nthOdd = (i) => i * 2 + 1;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              /* had i a shred of self awareness. */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             a = 3*2**i;if(O-a==i*a)return i;
    return Math.sqrt(nthOdd)(n);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               /* really, though, there's nothing out here. *\                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   oops */                                                                                                                                                                                                                                                                     } /* else */ { return O; }
  }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           /*   that includes you and me, of course. :)   *\                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   mb */                                                                                                                                                                                                                                                                     while (i<f.length) { b != f[i] ? a += e+d : e; b == q[i] ? e+= 1 : e= 1; b = q[i], i+=+1 }                                                        return 1 + entry(a - entry(entry(a - 1)));
};;