Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Padovan-sequence/Mathematica/padovan-sequence.math
Normal file
10
Task/Padovan-sequence/Mathematica/padovan-sequence.math
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
ClearAll[Padovan1,a,p,s]
|
||||
p=N[Surd[((9+Sqrt[69])/18),3]+Surd[((9-Sqrt[69])/18),3],200];
|
||||
s=1.0453567932525329623;
|
||||
Padovan1[nmax_Integer]:=RecurrenceTable[{a[n+1]==a[n-1]+a[n-2],a[0]==1,a[1]==1,a[2]==1},a,{n,0,nmax-1}]
|
||||
Padovan2[nmax_Integer]:=With[{},Floor[p^Range[-1,nmax-2]/s+1/2]]
|
||||
Padovan1[20]
|
||||
Padovan2[20]
|
||||
Padovan1[64]===Padovan2[64]
|
||||
SubstitutionSystem[{"A"->"B","B"->"C","C"->"AB"},"A",10]//Column
|
||||
(StringLength/@SubstitutionSystem[{"A"->"B","B"->"C","C"->"AB"},"A",31])==Padovan2[32]
|
||||
Loading…
Add table
Add a link
Reference in a new issue