Base Spectrum is a working code name for a density plot of a base representation of a number or a sequence of numbers.

Base 2 spectrum may be called binary spectrum, e.g.

Binary spectrum of the natural sequence:

```   require 'viewmat trig plot'

viewmat |: #:i.128```

Sierpinski Triangle fractal (, ,.~)^:n ,1 is also a Binary Spectrum of the Sloane's A001317

It is defined as "Pascal's triangle mod 2 converted to decimal"

```   #. |.2|!/~i.16
1 3 5 15 17 51 85 255 257 771 1285 3855 4369 13107 21845 65535```

and can be obtained by recursive formula a(n+1) = a(n) XOR 2a(n)

`   viewmat #:(~:/&.#:@, +:)^:(<32) 1`

Other binary spectra:

`   viewmat |: #: *: i.128         NB. squares`

`   viewmat |: #: %: i.128         NB. square roots`

`   viewmat |: #: 2^. 1+i.128      NB. log2 x`

`   viewmat |: #:  ^. 1+i.128      NB. ln x`

`   viewmat |: #: ^ 1r32*i.128     NB. exp x`

`   viewmat |: #: cosh 1r32*i:128  NB. cosh x`

`   viewmat |: #: sinh 1r32*i:128  NB. sinh x`

`   viewmat |: #: tan 1r16*i.128   NB. tan x`

Base 3 spectrum may be called ternary spectrum.

Here is some derivations of ternary spectrum of the natural sequence.

`   viewmat +./\|:1=(6#3)#:i.3^6   NB. Cantor comb`

`   viewmat +/\|:1=(6#3)#:i.3^6   NB. Cantor city`

Same in 3D:

`   'wire;boxed 0;viewpoint 2 _1 1.2'plot +/\|:1=(6#3)#:i.3^6`