(***********************************************************************
This file was generated automatically by the Mathematica front end.
It contains Initialization cells from a Notebook file, which typically
will have the same name as this file except ending in ".nb" instead of
".m".
This file is intended to be loaded into the Mathematica kernel using
the package loading commands Get or Needs. Doing so is equivalent to
using the Evaluate Initialiation Cells menu command in the front end.
DO NOT EDIT THIS FILE. This entire file is regenerated automatically
each time the parent Notebook file is saved in the Mathematica front end.
Any changes you make to this file will be overwritten.
***********************************************************************)
uni[n_,s_] := Join[Append[Table[1,{n-1}],-(n-1)],Table[0,{s-n}]]
Tri[n_] := n(n-1)/2
PtoS[x_List] :=Sum[x[[i-1]]uni[i,Length[x]+1]/Sqrt[Tri[i]],{i,2,Length[x]+1}]
StoP[x_List] :=
Module[{wx = x,an,anser = {}},
Do[an= -wx[[i]] Sqrt[Tri[i]]/(i-1);wx = Drop[wx,-1]-an/Sqrt[Tri[i]];
anser = Prepend[anser,an],{i,Length[x],2,-1}];anser]