[Question]
  [
Nice verb there, in the title.
Write a program that given an input string, will "elasticize" this string and output the result. Elasticizing a string is done as follows:
The first character is shown once. 
The second character is shown twice.
The third character is shown thrice,
and so on.
As you can see, the amount of duplications of a certain character is related to the character's index as opposed to its previous occurrences in the string.
You can expect to receive only printable ASCII characters. Based off the following [link](http://web.cs.mun.ca/~michael/c/ascii-table.html), these characters have decimal values 32-126.
Examples: 
`Why: Whhyyy`
`SKype: SKKyyyppppeeeee`
`LobbY: LoobbbbbbbYYYYY` (Note how there are 7 b's since the first b is shown 3 times and the second b is shown 4 times, making a total of 7 b's).
`A and B: A aaannnnddddd BBBBBBB`
Shortest bytes wins :)
  
[Answer]
# [Jelly](http://github.com/DennisMitchell/jelly), 3 bytes
Code:
```
ĖP€
```
Explanation:
```
Ė     # Enumerate.
 P€   # Product of each.
      # Implicit joining of everything.
```
Uses the **Jelly encoding**. [Try it online!](http://jelly.tryitonline.net/#code=xJZQ4oKs&input=&args=TG9iYlk).
[Answer]
# J, 4 bytes
```
#~#\
```
## Usage
```
   f =: #~#\
   f 'Why'
Whhyyy
   f 'SKype'
SKKyyyppppeeeee
   f 'LobbY'
LoobbbbbbbYYYYY
   f 'A and B'
A  aaannnnddddd      BBBBBBB
```
## Explanation
```
#~#\  Input: s
  #\  Computes the length of each prefix of s
      This forms the range [1, 2, ..., len(s)]
#~    For each value in the range, copy the character at the
      corresponding index that many times
      Return the created string
```
[Answer]
## Brainfuck, 15 bytes
```
,[>+[->+<<.>],]
```
Pretty straightforward implementation, shifting the memory space by 1 for each input char. Requires an interpreter that gives 0 on EOF, and 32-bit/arbitrary precision cells for inputs longer than 255 chars.
[Try it online!](http://brainfuck.tryitonline.net/#code=LFs-K1stPis8PC4-XSxd&input=QSBhbmQgQg) (Note: TIO uses 8-bit cells)
[Answer]
## Haskell, 29 bytes
```
concat.zipWith replicate[1..]
```
Usage example: `concat.zipWith replicate[1..] $ "SKype"` -> `"SKKyyyppppeeeee"`. 
`replicate n c` makes n copies of c and `concat` makes a single list out of all the sublists.
[Answer]
# Java, 158 121 bytes
Saved a whopping 37 bytes thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)!
```
interface a{static void main(String[]A){int b=0,B;for(char c:A[0].toCharArray())for(B=b+++2;--B>0;)System.out.print(c);}}
```
As a bonus, this program can handle *all* Unicode characters in the existence, including [the control characters located at the very end of Basic Multilingual Plane](https://en.wikipedia.org/wiki/Specials_(Unicode_block)).
[Answer]
## Perl, 16 bytes
```
s/./$&x$+[0]/ge
```
+1 byte for the `-p` flag.
```
s/./        /    find every character
             g   globally
              e  and replace with the eval'd result of
    $&           the matched string
      x          repeated
       $+[0]     by the index of the character after the match
```
[Answer]
# Python, 39 bytes
```
f=lambda s:s and f(s[:-1])+s[-1]*len(s)
```
Test it on [Ideone](http://ideone.com/ZrxEbz).
[Answer]
## CJam, ~~9~~ ~~8~~ 7 bytes
*Thanks to jimmy23013 for saving 1 byte.*
```
Sl+eee~
```
[Test it here.](http://cjam.aditsu.net/#code=Sl%2Beee~&input=LobbY)
### Explanation
Using the `LobbY` example:
```
                                      Stack:
S    e# Push space.                   [" "]
l    e# Read input.                   [" " "LobbY"]
+    e# Append.                       [" LobbY"]
ee   e# Enumerate.                    [[[0 ' ] [1 'L] [2 'o] [3 'b] [4 'b] [5 'Y]]]
e~   e# Run-length decode.            ["LoobbbbbbbYYYYY"]
```
[Answer]
# MATLAB, 45 bytes
```
g=@(m)sort(m(m>0));@(s)s(g(hankel(1:nnz(s))))
```
Explanation: The key is `hankel`, which produces a Hankel matrix of a given vector. From this matrix, we can extract a vector of indices, which defines which character of the string is at which position in the output. E.g. `hankel(1:4)` produces following matrix:
```
 1  2  3  4
 2  3  4  0
 3  4  0  0
 4  0  0  0
```
From this matrix we can extrac the vector `1,2,2,3,3,3,4,4,4,4,4`. This vector allows us to output the first character of the string *once*, the second one *twice* e.t.c.
[Answer]
# Javascript ES6, 39 bytes
```
x=>x.replace(/./g,(y,i)=>y+y.repeat(i))
```
**Same length, but more fun:**
```
x=>x.replace(i=/./g,y=>y.repeat(i=-~i))
```
**Snippet demo:**
```
f= x=>x.replace(/./g,(y,i)=>y+y.repeat(i))
run.onclick=_=>output.textContent=f(input.value)
```
```
<input id="input" value="SKype">
<button id="run">Go</button>
<pre id="output"></pre>
```
[Answer]
# [APL (dzaima/APL)](https://github.com/dzaima/APL), ~~6~~ 5 bytes
```
⍳∘≢⌿⊢
```
[Try it online!](https://tio.run/##SyzI0U2pSszMTfyf9qhtgsb/R72bH3XMeNS56FHP/kddi/5rcj3qmwqUSVNQz0jNyclX/w8A "APL (dzaima/APL) – Try It Online")
`⍳∘≢` enumeration of the argument... (indices of its length)  
`⌿` replicates the elements of...  
`⊢` the unmodified argument
[Answer]
# APL (8)
```
{⍵/⍨⍳⍴⍵}
```
I.e.:
```
      {⍵/⍨⍳⍴⍵} ¨  'Why' 'SKype' 'LobbY'
┌──────┬───────────────┬───────────────┐
│Whhyyy│SKKyyyppppeeeee│LoobbbbbbbYYYYY│
└──────┴───────────────┴───────────────┘
```
Explanation:
* `⍴⍵`: length of given vector
* `⍳`: numbers 1..N
* `⍵/⍨`: replicate each element in `⍵` N times.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 13 bytes
```
:ImC,0:Ie,Cw\
```
This prints the result to `STDOUT`.
### Explanation
This is a good example of exploiting backtracking to loop.
```
:ImC            C is the Ith character of the Input
    ,
     0:Ie       Unify an implicit variable with an integer between 0 and I
         ,
          Cw    Write C to STDOUT
            \   False, trigger backtracking. It will go back to 0:Ie and unify the implicit
                variable with another integer, until all integers were used. After that, it
                will backtrack to :ImC and unify I and C with the next character.
```
[Answer]
# Javascript ES6, ~~42~~ 41 bytes
```
s=>[,...s].map((e,i)=>e.repeat(i)).join``
```
Example runs:
```
f=s=>[,...s].map((e,i)=>e.repeat(i)).join``
f("Why")   => "Whhyyy"
f("SKype") => "SKKyyyppppeeeee"
f("LobbY") => "LoobbbbbbbYYYYY"
```
[Answer]
# [R](https://www.r-project.org/), ~~83~~ 50 bytes
-23 Thanks to Giuseppe, though he used essentially an entire new method altogether
```
function(s)intToUtf8(rep(utf8ToInt(s),1:nchar(s)))
```
My original post:
```
function(s){r="";for(i in 1:nchar(s))r=paste0(r,strrep(el(strsplit(s,""))[i],i));r}
```
[Try it online!](https://tio.run/##DckxCoAwDAXQq5RMCXTQVelJxEGkxYC05adO4tlrtwcPvacnn01LZpMXgWhNBaxOs5uXfF4HRghCPazFieGtAbFyvHnI6q2NzROJbLp7FVnx9f4D "R – Try It Online")
I feel like there's definitely a better way to do this, but with my new knowledge of a few functions in R, this is my approach.
[Answer]
## PowerShell v2+, 36 bytes
```
-join([char[]]$args[0]|%{"$_"*++$i})
```
Takes input `$args[0]`, explicitly casts it as a `char` array, sends that into a loop `|%{...}`. Each iteration we take the current letter/character `"$_"` and use the `*` overloaded operator to concatenate the string pre-incremented `$i` times. The result of each loop iteration is encapsulated in parens to form an array and then `-join`ed together to form a string. That string is left on the pipeline and output is implicit.
### Examples
```
PS C:\Tools\Scripts\golfing> .\elasticize-a-word.ps1 Why
Whhyyy
PS C:\Tools\Scripts\golfing> .\elasticize-a-word.ps1 SKype
SKKyyyppppeeeee
PS C:\Tools\Scripts\golfing> .\elasticize-a-word.ps1 LobbY
LoobbbbbbbYYYYY
PS C:\Tools\Scripts\golfing> .\elasticize-a-word.ps1 'a b'
a  bbb
```
[Answer]
# MATLAB, 23 bytes
```
@(x)repelem(x,1:nnz(x))
```
Creates an anonymous function `ans` that can be called using `ans('stringtoelacticize')`
[Answer]
## [K](https://en.wikipedia.org/wiki/K_(programming_language))/[Kona](https://github.com/kevinlawler/kona), 14 bytes
```
{,/(1+!#x)#'x}
```
Usage:
```
k){,/(1+!#x)#'x}"A and B"
"A  aaannnnddddd      BBBBBBB"
```
[Answer]
# [Perl 6](http://perl6.org), ~~22 20~~ 19 bytes
```
~~{S:g/(.)/{$0 x$/.to}/}
{S:g[(.)]=$0 x$/.to}~~
{[~] .comb Zx 1..*}
```
### Explanation:
```
{          # implicit parameter $_
  [~]      # string concatenate the following list
    .comb  # the NFG characters from $_
    Z[x]   # zip combined using the string repetition operator
    1 .. * # 1 to infinity
}
```
[Answer]
# VBA, 75 bytes
```
Function e(s):For a=1 To Len(s):e=e &String(a,Mid(s,a,1)):Next:End Function
```
Call as e.g. a user function in a spreadsheet.
=e(A1)
```
┌─────────┬───────────────┐
│   SKype │SKKyyyppppeeeee│
└─────────┴───────────────┘
```
It truncates if you feed it its own output a few times :-).
[Answer]
# Julia, 32 bytes
```
!s=join(split(s[k=1:end],"").^k)
```
Unlike Dennis's solution, this is not recursive. `split` with argument `""` separates the string into an array of strings of length 1. The `[k=1:end]` is a trick to create a range from 1 to the number of characters in the string, and this range is used to concatenate n copies of the n-th character. `join` then recombines the array of strings into a single string, in order.
Usage example: `!"SKype"`
[Answer]
# PHP, 68 bytes
```
<?php foreach(str_split($argv[1])as$i=>$a)echo str_repeat($a,$i+1);
```
[Answer]
## [Retina](https://github.com/m-ender/retina), 22 bytes
Byte count assumes ISO 8859-1 encoding.
```
.
$&$.`$*·
+`(.)·
$1$1
```
[Try it online!](http://retina.tryitonline.net/#code=LgokJiQuYCQqwrcKK2AoLinCtwokMSQx&input=TG9iYlk&debug=on)
Basically, we insert the right amount of `·` as placeholders between the characters (since these extended ASCII characters can't appear in the input), then fill them up with the adjacent character in the second stage.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 2 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ƶJ
```
[Try it online](https://tio.run/##yy9OTMpM/f//2Dav//998pOSKgE) or [verify all test cases](https://tio.run/##yy9OTMpM/V9TVmmvpPCobZKCkn3l/2PbvP7r/A/PqOQK9q4sSOXyyU9KiuRyVEjMS1FwAgA).
**Explanation:**
```
ƶ   # Multiply each character in the (implicit) input-string by its 1-based index
 J  # Join the list of substrings together to a single string
    # (after which the result is output implicitly)
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `s`, 2 bytes
```
Þż
```
[Try it online](https://vyxal.pythonanywhere.com/#WyJzIiwiIiwiw57FvCIsIiIsIldoeSJd), or see a [3 byte flagless version](https://vyxal.pythonanywhere.com/#WyIiLCIiLCLDnsW84oiRIiwiIiwiV2h5Il0=)
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), ~~9~~ 8 bytes
```
⊢/˜1+↕∘≠
```
Anonymous tacit function. [Try it at BQN online!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAg4oqiL8ucMSvihpXiiJjiiaAKCkbCqCAiV2h5IuKAvyJTS3lwZSLigL8iTG9iYlki4oC/IkEgYW5kIEIi)
### Explanation
```
⊢/˜1+↕∘≠
       ≠  Length of argument
     ↕∘   Range
   1+     Add 1 to each, making it an inclusive range from 1 to the length
 /˜       Replicate that many times the elements of
⊢         The original input
```
[Answer]
# [><> (Fish)](https://esolangs.org/wiki/Fish), 33 bytes
```
1:i:0(?^$:?v~~1+00.
.!02o:$;!-1<|
```
[Try the animated version](https://mousetail.github.io/Fish/#eyJ0ZXh0IjoiMTppOjAoP14kOj92fn4xKzAwLlxuLiEwMm86JDshLTE8fCIsImlucHV0IjoiYWJjIiwic3RhY2siOiIiLCJtb2RlIjoibnVtYmVycyJ9)
[![enter image description here](https://i.stack.imgur.com/jyccH.png)](https://i.stack.imgur.com/jyccH.png)
Basically if the counter is 0 skip to the second `:`, otherwise the first `:`. Properly adjust the counters.
[Answer]
## Actually, 7 bytes
```
' +ñ♂πΣ
```
[Try it online!](http://actually.tryitonline.net/#code=JyArw7HimYLPgM6j&input=IldoeSI)
Explanation:
```
' +ñ♂πΣ
' +      prepend a space
   ñ     enumerate ("abc" -> [[0, 'a'], [1, 'b'], [2, 'c']])
    ♂π   map: for each character, repeat it n times
      Σ  concatenate
```
[Answer]
# Pyth - 5 bytes
*1 byte saved thanks to @FryAmTheEggman.*
```
s*VSl
```
[Test Suite](http://pyth.herokuapp.com/?code=s%2aVSl&test_suite=1&test_suite_input=%22Why%22%0A%22SKype%22%0A%22LobbY%22&debug=0).
[Answer]
# Python 3, ~~48~~ 47 bytes
*Thanks to [mego](https://codegolf.stackexchange.com/users/45941/mego) for saving a byte with the `-~i` trick.*
```
lambda s:''.join(c*-~i for i,c in enumerate(s))
```
This is mostly self-explanatory. One thing for those not versed in Python: The `*` operator is overloaded to act like Perl's `x` operator, repeating its string argument the number of times specified by its numeric argument. E.g. `'foo' * 3 == 'foofoofoo'`
]