-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviswanath_s_constant_conjecture.sf
More file actions
40 lines (28 loc) · 1.04 KB
/
Copy pathviswanath_s_constant_conjecture.sf
File metadata and controls
40 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/ruby
# Author: Daniel "Trizen" Șuteu
# Date: 24 February 2018
# https://github.com/trizen
# A new formula for computing Viswanath's constant. (weak conjecture -- incorrect)
# Blandin-Diaz compositional Bernoulli numbers (B^S)_1,n:
# a(0) = 1
# a(n) = -Sum_{k=0..n-1} a(k) / ((n-k+1)!)^2
# Next, we define `t` to be the following sum:
# t = Sum_{k=0..Infinity} 1 / (a(k) * k!)
# From which we extract Viswanath's constant:
# v = (19500 - 3*t)/(10756 - 3*t)
# See also:
# https://oeis.org/A078416
# https://en.wikipedia.org/wiki/Random_Fibonacci_sequence
# https://www.wolframalpha.com/input/?i=Viswanath%27s+constant
# https://www.wolframalpha.com/input/?i=18497.440650652720515613516713415750667794722534171
func a((0)) { 1 }
func a(n) is cached {
-sum(^n, {|k| a(k) / (n - k + 1)!**2 })
}
var t = sum(0..200, {|k|
1 / (a(k) * k!)
})
var v = (19500 - 3*t)/(10756 - 3*t)
say "Viswanath's constant is: #{v} (conjectured)"
__END__
Viswanath's constant is: 1.13198824879430090510505642117075909739291590469 (conjectured)