cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A213913 Inverse permutation of A213912.

Original entry on oeis.org

1, 6, 2, 9, 5, 7, 23, 84, 3, 13, 47, 10, 27, 88, 44, 17, 51, 8, 92, 21, 24, 96, 132, 85, 105, 114, 4, 64, 36, 14, 60, 32, 48, 141, 73, 11, 56, 194, 28, 255, 155, 89, 137, 175, 45, 124, 69, 18, 270, 449, 52, 146, 78, 280, 199, 190, 93, 225, 180, 22, 129, 251
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 05 2013

Keywords

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a213913 = (+ 1) . fromJust . (`elemIndex` a213912_list)

A335836 a(1) = 1; for n>1, a(n) = floor(a(n-1)^(1/3)) if that number is not already in the sequence, otherwise a(n) = 2*a(n-1).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 3, 6, 12, 24, 48, 96, 192, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 13, 26, 52, 104, 208, 416, 7, 14, 28, 56, 112, 224, 448, 896, 9, 18, 36, 72, 144, 288, 576, 1152, 2304, 4608, 9216, 18432, 36864, 33, 66, 132, 264, 528, 1056, 2112
Offset: 1

Views

Author

Jinyuan Wang, Jun 27 2020

Keywords

Comments

If k is not in this sequence, then none of k^(3^t), k^(3^t)+1, ..., (k+1)^(3^t)-1 belong to the sequence. Because (k+1)^(3^k) > 2*k^(3^k), any m > k^(3^k) is not in the sequence, which is a contradiction to {a(n)} is not bounded above. Therefore, this sequence is a permutation of the natural numbers.

Crossrefs

Programs

  • Mathematica
    Nest[Append[#1, If[FreeQ[#1, #2], #2, 2 #1[[-1]] ]] & @@ {#, Floor[#[[-1]]^(1/3)]} &, {1}, 56] (* Michael De Vlieger, Jun 28 2020 *)
  • PARI
    lista(nn) = {my(k, v=vector(nn)); v[1]=1; for(n=2, nn, if(vecsearch(vecsort(v), k=sqrtnint(v[n-1], 3)), v[n]=2*v[n-1], v[n]=k)); v; }
Showing 1-2 of 2 results.