[Question]
  [
## Challenge
Given a base \$1 < b < 10\$ and an index \$t \ge 1\$, output term \$x\_t\$, defined as follows:
* \$x\_1 = 11\_{10}\$
* \$x\_{i+1}\$ is obtained by converting \$x\_i\$ to base \$b\$ and then reinterpreting its digits in base \$10\$
* Output should be in base \$10\$
A walk through for base 5, term 5 would be:
* \$x\_1 = 11\_{10}\$.
* \$11\_{10} = 21\_{5}\$ so \$x\_2 = 21\_{10}\$.
* \$21\_{10} = 41\_{5}\$ so \$x\_3 = 41\_{10}\$.
* \$41\_{10} = 131\_{5}\$ so \$x\_4 = 131\_{10}\$.
* \$131\_{10} = 1011\_{5}\$ so \$x\_5 = 1011\_{10}\$.
* We output the string `"1011"` or the integer `1011`.
## Test Cases
Note: these are one indexed
```
base 2, term 5 --> 1100100111110011010011100010101000011000101001000100011011011010001111011100010000001000010011100011
base 9, term 70 --> 1202167480887
base 8, term 30 --> 4752456545
base 4, term 13 --> 2123103032103331200023103133211223233322200311320011300320320100312133201303003031113021311200322222332322220300332231220022313031200030333132302313012110123012123010113230200132021023101313232010013102221103203031121232122020233303303303211132313213012222331020133
```
## Notes
* Standard loopholes are not allowed
* Any default I/O method is allowed
* You may use different indexes (such as 0-indexed, 1-indexed, 2-indexed, etc) for \$t\$
* You may output the first \$t\$ terms.
* As this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), **shortest code wins for that language**
  
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 40 bytes
*Thanks to @Neil for saving 5 bytes on this version and 2 bytes on the BigInt version*
Takes input as `(t)(base)`, where \$t\$ is 1-indexed.
```
n=>g=(b,x=11)=>--n?g(b,+x.toString(b)):x
```
[Try it online!](https://tio.run/##VchJCoAwDADAuy9p0IriwQVSH@EL6lYqkogW6e9jrx5nDvvaZ7n9FTTxusmOQmgcqrmIWNeARmsaXWIey8BTuD0lAQxRFqaHz6082aldtRWoHiD7b5O2A5AP "JavaScript (Node.js) ‚Äì Try It Online")
---
# [JavaScript (Node.js)](https://nodejs.org), 48 bytes (BigInt version)
Takes input as `(t)(base)`, where \$t\$ is 1-indexed. Returns a BigInt.
```
n=>g=(b,x=11n)=>--n?g(b,BigInt(x.toString(b))):x
```
[Try it online!](https://tio.run/##ZcjBCoJAEAbge08yP7TSplEJY9Cts0@gpsuGzIQusW@/7VU8ft@n@3XrsPhvMKLvMU2chBvH1B8jWyvgxhh5uOyndy8JFIugbVi85ANQxzSorDqPxayOJrqAzsBhm9cT6L7bMu9tt7YEVUD6Aw "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 5 bytes
```
>IF¬πB
```
[Try it online!](https://tio.run/##yy9OTMpM/f/fztPt0E6n//8tucwNAA "05AB1E ‚Äì Try It Online")
**Explanation**
```
>       # increment <base>
 IF     # <term> times do:
   ¬πB   # convert from base-10 to base-<base>
```
Note that there is no need to explicitly start the sequence at **11**.  
Starting at `base+1` and doing an extra iteration will result in the first iteration giving **11**.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 9 bytes
```
√ÜB=sV n
B
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=xkI9c1YgbgpC&input=MAo5)
```
(Two inputs, U and V)
√Ü            Range [0..U)
 B=          For each, set B (B is preinitialized to 11) to 
   sV          B's previous value converted to base-V
   n           and back to base-10
B            Print out B's final value
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), 7 bytes
```
!¬°odB¬π‚Üí
```
[Try it online!](https://tio.run/##yygtzv6fm18erOP2qKnxv@KhhfkpTod2Pmqb9P///2gNIx0zTR0NSx1zQyBloWMMokx0DE00YwE "Husk ‚Äì Try It Online") This version is 2-indexed; it takes the two inputs \$b\$ and \$t\$ as arguments.
### Explanation
```
!¬°odB¬≤‚Üí¬≤‚Å∞  (Written with explicit arguments; let B and T denote them.)
!       ‚Å∞  Take element T of
 ¬°          the function repeatedly applied to
      ‚Üí¬≤     B + 1:
  o B¬≤       Convert to base B
  od         then convert to decimal.
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 46 bytes
```
bÔí°Nest[FromDigits[#~IntegerDigits~b]&,11,#]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7P@n9pIV@qcUl0W5F@bkumemZJcXRynWeeSWp6alFEH5dUqyajqGhjnKs2v@Aosy8kuhqZeVaXbu0aOXYaGWj2Fg1BweHaq5qUx2TWh2uaiMIZaljZgmiLXSMwLSJjqFRLVftfwA "Wolfram Language (Mathematica) ‚Äì Try It Online")
Call with `f[base][t]`. 0-indexed.
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 67 bytes
```
.+,(\d+)
11,$1*
"$+"{`^\d+
*
)+`(?=_.*,(_+))(\1)*(_*)
$#2*_$.3
,_+
```
[Try it online!](https://tio.run/##DcgrDoAwDABQ32OMiv6ypHwk4SILHQkIDILgOPzgyXcfz3lt3lpWo7Irg7uhCyTU9Nb1LxBgrbTMkcUolJmKs1AIA3a9BOYBLBRaG236AA "Retina ‚Äì Try It Online") Takes comma-separated inputs \$t\$ (0-indexed) and \$b\$. Does all of its calculations in unary so times out for large numbers. Explanation:
```
.+,(\d+)
11,$1*
```
Initialise \$x\_0=11\$ and convert \$b\$ to unary.
```
"$+"{`
```
Repeat \$t\$ times.
```
^\d+
*
```
Convert \$x\_i\$ to unary.
```
)+`(?=_.*,(_+))(\1)*(_*)
$#2*_$.3
```
Convert to base \$b\$.
```
,_+
```
Delete \$b\$ from the output.
[Answer]
# [Python 2](https://docs.python.org/2/), 71 bytes
```
def f(b,n):h=lambda x:x and x%b+10*h(x/b);return n and h(f(b,n-1))or 11
```
[Try it online!](https://tio.run/##K6gsycjPM/r/PyU1TSFNI0knT9MqwzYnMTcpJVGhwqpCITEvRaFCNUnb0EArQ6NCP0nTuii1pLQoTyEPLJWhAdaka6ipmV@kYGj4v6AoM68EaJKpjokmF4xjoWNkieCZ6Bgaaf4HAA "Python 2 ‚Äì Try It Online")
0-indexed.
[Answer]
# [Clojure](https://clojure.org/), 109 bytes
*Credit to MilkyWay90 for removing 10 bytes by spotting unnecessary spaces*
*Credit to Embodiment of Ignorance for another byte from another unnecessary space*
**Golfed**
```
(defn f([b t](f b t 11))([b t v](if(= t 1)v(f b(dec t)(read-string(.(new BigInteger(str v))(toString b)))))))
```
**Ungolfed**
```
(defn f
  ([base term] (f base term 11))
  ([base term value] (if (= term 1)
                      value
                      (f base (dec term) (read-string (. (new BigInteger (str value)) (toString base)))))))
```
I think the main place bytes could be saved is the expression for... *reradixing?* whatever that would be called. Specifically:
```
(read-string (. (new BigInteger (str value)) (toString base)))
```
[Answer]
# [Perl 6](http://perl6.org/), 28 bytes
```
{(11,+*.base($^b)...*)[$^t]}
```
[Try it online!](https://tio.run/##FcjRCoIwAEDRX7nIkM1sOC01SH8kFBTck6GoLzL27csez1mnbS7D9yS2NMFJY9Jbosdhn6ToR6W1TtRH9Efng2MfTqKrU66haXFWir@Ou1E@wmOXjXfOkxdVRk2R8cAUbfgB "Perl 6 ‚Äì Try It Online")
The index into the sequence is zero-based.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~8~~ 7 bytes
```
‚Äòb¬≥·∏å$‚Å¥¬°
```
[Try it online!](https://tio.run/##ARwA4/9qZWxsef//4oCYYsKz4biMJOKBtMKh////Nf80 "Jelly ‚Äì Try It Online")
A full program that takes \$b\$ as first argument and 1-indexed \$t\$ as its second argument. Returns the integer for the relevant term (and implicitly prints). Uses the observation by @Emigna regarding starting with \$b + 1\$. 
### Explanation
```
‚Äòb¬≥·∏å$‚Å¥¬° | Main link: first argument b, second argument t
‚Äò       | b + 1
    $‚Å¥¬° | Repeat the following t times
 b¬≥     | Convert to base b
   ·∏å    | Convert back from decimal to integer
```
[Answer]
# [K (ngn/k)](https://gitlab.com/n9n/k), 13 bytes
```
{y(10/x\)/11}
```
[Try it online!](https://tio.run/##y9bNS8/7/z/NqrpSw9BAvyJGU9/QsPZ/WrSFtZFl7H8A "K (ngn/k) ‚Äì Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 8 bytes
```
uijGQTEh
```
[Try it online!](https://tio.run/##K6gsyfj/vzQzyz0wxBXIMuUyBQA "Pyth ‚Äì Try It Online")
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 87 bytes
```
n=>m=>{int g=11;for(var s="";m-->0;g=int.Parse(s),s="")for(;g>0;g/=n)s=g%n+s;return g;}
```
Saved 5 bytes thanks to @KevinCruijssen
[Try it online!](https://tio.run/##VYoxC8IwEIV3f0UoCDls1Dq1nJfRycHNuYQ0ZOgVcqmL@NtjuggOD977vufEOInltrK7Rs7tr9RYO1FhsjPZd50qUNfhtCT9GpMSahqcjbFnDFTt8TEm8Vqg3QxsNwybPBGDUNjzQTD5vCZWAT8Fd88Us79H9nrSA@huAPiHPehLX2H5Ag "C# (Visual C# Interactive Compiler) ‚Äì Try It Online")
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 270 bytes
```
++<<++<,+++<-[----->-<]<,,[<-----[->++++++++++<]++>[-<+>],]<[>>>>>>[<<<[->>+<<]>>>>>]<<[[>+<-]>>[-[<++++++++++>-]>+>]<[<<]>>[-<<+>>>+<]>>[-[<-[>>+>>]>>[+[-<<+>>]>[-<]<[>]>++>>>]<<<<<-]+>[-<+<+>>]<<[->>+<<]>>>]<[-]<[[-<+>]<<]<]<[->>+<<]<-]>>>>[>>]<<[>-[-----<+>]<----.<<]
```
[Try it online!](https://tio.run/##VU/BqgIwDPuVd@/iyXcL/ZHSgwqCCB4Ev3@m3VAMdCxdknbn5@n2uL4u9znNSNUwHQgUHEyOEWwWcPuAaeYBmudIhjeCpFSupOxGiocoRAPBr9/VkpfRUgUpqYxbCCWqUcz2Y5aqRsloK1tArjVa8TNdUqjWjmqVd7/2PopeFt@/bV1dDpLM@f93fAM "brainfuck ‚Äì Try It Online")
0-indexed. The number of iterations is assumed to be at most 255.
## Explanation
The tape is laid out as follows:
```
num_iterations 0 0 base digit0 0 digit1 0 digit2 ...
```
Each digit is actually stored as that digit plus 1, with 0 reserved for "no more digits". During the base conversion, the digits currently being worked on are moved one cell to the right, and the base is moved to the left of the current working area.
```
++<<++              Initialize initial value 11
<,+++<-[----->-<]   Get single digit as base and subtract 48 to get actual number
<,,[<-----[->++++++++++<]++>[-<+>],]   Read multiple digits as number of iterations
<                   Go to cell containing number of iterations
[                   For each iteration:
  >>>>>>              Go to tens digit cell
  [<<<[->>+<<]>>>>>]  Move base to just before most significant digit
  <<                  Return to most significant digit
  [                   For each digit in number starting at the left (right on tape):
    [>+<-]            Move digit one cell to right (to tell where current digit is later)
    >>[-[<++++++++++>-]>+>]  Multiply each other digit by 10 and move left
    <[<<]>>           Return to base
    [-<<+>>>+<]       Copy base to just before digit (again) and just before next digit to right (left on tape)
    >>[               For each digit at least as significant as this digit:
      -[<-[>>+>>]>>[+[-<<+>>]  Compute "digit" divmod base
      >[-<]<[>]>++    While computing this: add quotient to next digit; initialize digit to "1" (0) first if "0" (null)
      >>>]<<<<<-]     End of divmod routine
      +>[-<+<+>>]     Leave modulo as current digit and restore base
      <<[->>+<<]      Move base to next position
      >>>
    ]
    <[-]<             Delete (now useless) copy of base
    [[-<+>]<<]<       Move digits back to original cells
  ]                   Repeat entire routine for each digit
  <[->>+<<]           Move base to original position
  <-                  Decrement iteration count
]
>>>>[>>]<<[>-[-----<+>]<----.<<]  Output by adding 47 to each cell containing a digit
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 14 bytes
```
‚âî11Œ∂Ôº¶ÔºÆ‚âî‚çòÔº©Œ∂Ôº©Œ∑Œ∂Œ∂
```
[Try it online!](https://tio.run/##S85ILErOT8z5/9@xuDgzPU9DydBQSUehStOaKy2/SEHDM6@gtMSvNDcptUhDU1MBqsgpsTg1uKQoMy9dwzmxuESjSlNHAczI0NSEaA4ASoLErf//N@Ey@q9blgMA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Takes inputs as \$t\$ (0-indexed) and \$b\$. Explanation:
```
‚âî11Œ∂
```
\$x\_0=11\$.
```
Ôº¶ÔºÆ
```
Loop \$b\$ times.
```
‚âî‚çòÔº©Œ∂Ôº©Œ∑Œ∂
```
Calculate \$x\_i\$.
```
Œ∂
```
Output \$x\_t\$.
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 50 bytes
```
(b,n)->x=11;for(i=2,n,x=fromdigits(digits(x,b)));x
```
[Try it online!](https://tio.run/##LcfRCoMgGIbhW/noyB9@YdZiG2E3Eh7YhiE4E9eBu3pXo6P3eZPNXi6pOmhUMXMkORat1ODWLLxuOXLRLq/vl1/89hFnCs9ENJRqUwpfYSFHpOzjtrM5psHThiAcwxIxpqln9GZHe/bBuF0O3BndH1eG6oyh@gM "Pari/GP ‚Äì Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 59 bytes
```
f(t,b){t=t?c(f(t-1,b),b):11;}c(n,b){n=n?c(n/b,b)*10+n%b:0;}
```
[Try it online!](https://tio.run/##FclBCoAgEEDRfccQgrGUFGqTSBdpkxOGi4YId@LZbYK/eXzUF2JrEbIKsmSfNwSGtkxutdZVBPoneeJJU2AM1ozUh9W42u4jEcjSPW@iHEH0505CRZjVIqXravsA "C (gcc) ‚Äì Try It Online")
[Answer]
# [Groovy](http://groovy-lang.org/), 45 bytes
```
a,b,c=11->a--?f(a,b,a.toString(c as int,b)):c
```
[Try it online!](https://tio.run/##Sy/Kzy@r/J9mW/0/USdJJ9nW0FDXLlFX1z5NA8RP1CvJDy4pysxL10hWSCxWyMwr0UnS1LRK/l/LxVUAFC/JyVNI0zDVMdVE4lromGv@BwA "Groovy ‚Äì Try It Online")
Port of @Arnauld's answer
[Answer]
# [PHP](https://php.net/), ~~83~~ 75 bytes
```
function c($b,$t,$v=11){return $t==1?$v:c($b,$t-1,base_convert($v,10,$b));}
```
[Try it online!](https://tio.run/##7VPBjtowED3HXzGKciCrwHrGyYaWpnvooYeVupfeaFRBagTSNkGJ4bLi2@mMbXb7BT01GHv83sx7E0Yc98frp8cj77tT37nD0EM3y7ZF5ors3CDmr6N1p7GHzDUNPmbnj5GeY7HdTPZnN/RnO7pZdi5QF9k2z1eXq7q/U9/t5OALp0yqeXuUkiKgApwdf0MF8/lnQNRaljxyxIsW1F88GG46BCENY7IvfSvxD8Ytghh8P0TfWgdj0oQPdbnUy2UdMpYxw4SMsq6orB6qsgp0GWk0niYkg9poQ7wbw3pae8QwgkSGJCKGDaIhacRwTLJQQEIjIStokUHhGUNRkkKWYA05fQZHXMOcnJIvhsZbc5r2IGvyb0E@kF08hWNzI@/rG0Rf4JvgkOWkSPqSHqSOxIY/LK3jIvRK/PUuvjcuZQGj7u6VyjoZNjSwVsm6KoBXKu5pWzBAEfgHsw6GPOtai@PfQw4UD9kI9T7dgPN00TD@f6xhrGmr2pVSu2G0m24PszjhzQQ@yuFVJdlop9OL47FvA7/WbRH4Nbb5SiWHHVfespomctT68sR2@wHS56cffcq5F5XYF/6fvTPfBgfPTwv4ymcKC7gpLfh26CdnN79g2AUqCgt3k7tc/wA "PHP ‚Äì Try It Online")
This one will only work work with "small" numbers (e.g. not test cases 1 and 4)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 10 bytes
0-indexed. Takes `t` as the first input, `b` as the second.
```
_√¨V √¨}gB√¨C
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=X%2bxWIOx9Z0LsQw&input=MjkKOA)
[Answer]
# [Gaia](https://github.com/splcurran/Gaia), 8 bytes
```
Bd
11@‚Üë‚Çì
```
[Try it online!](https://tio.run/##S0/MTPz/3ymFy9DQ4VHbxEdNk///N7LksgAA "Gaia ‚Äì Try It Online")
Takes 0-based `iterations` then `base`.
```
Bd		| helper function: convert to Base b (implicit) then convert to base 10
		| main function:
11		| push 11
  @		| push # of iterations
   ‚Üë‚Çì		| do the above function (helper function) that many times as a monad
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 39 bytes
Zero-indexed.
```
->b,n,x=11{n.times{x=x.to_s(b).to_i};x}
```
[Try it online!](https://tio.run/##KypNqvyfZhvzX9cuSSdPp8LW0LA6T68kMze1uLrCtkKvJD@@WCNJE0Rn1lpX1P4vKC0pVkiL1kotS8zRUInXjP0fbaRjEssVbaljZhmrnJeZnMoVbaJjaBT7L7@gJDM/r/i/bh4A "Ruby ‚Äì Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-Mbigint -pa`, 65 bytes
```
$\=11;map{$p=$\;$\%=0+"@F";$\=($p%"@F").$\while$p/=0+"@F"}2..<>}{
```
[Try it online!](https://tio.run/##K0gtyjH9/18lxtbQ0Do3saBapcBWJcZaJUbV1kBbycFNCci01VApUAWxNfVUYsozMnNSVQr0odK1Rnp6Nna11f//m3IZ/csvKMnMzyv@r@trqmdgaACkkzLTM/NK/usWJAIA "Perl 5 ‚Äì Try It Online")
[Answer]
# [GolfScript](http://www.golfscript.com/golfscript/), 16 bytes
```
11\~{base""*~}+*
```
[Try it online!](https://tio.run/##S8/PSStOLsosKPn/39Awpq46KbE4VUlJq65WW@v/fxMFUwA "GolfScript ‚Äì Try It Online")
The input is `t` (0-indexed) and then `b`.
```
11                 # x_1
  \~               # Parse the inputs to integers
    {base""*~}+    # Add b to the beginning of this block to get {b base""*~}
  {b base""*~}     # This block goes from x_n to x_(n+1)
   b base          # Convert to base b
         ""*       # Join the digits with "" between them
            ~      # Parse it to an integer
               *   # Execute this block t times
```
]