login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135500 Generating function for Viswanath's constant, using the golden string. 0
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
For each bit of the golden string that is a 1, write seven consecutive bits and for each 0 of the golden string write eight consecutive bits.
Alternate between 0 and 1. Exclude the first seven bits since we are based at zero, just like the golden string. Heads = 1, Tails = 0.
LINKS
S. Findley, Viswanath's curve
FORMULA
Each power of Viswanath's constant (1.131988248...) And V^3 has a corresponding coin flip. Simply take the absolute values of the two possible(+Heads or -Tails) outcomes and choose the flip closest to the value of the power.
EXAMPLE
Bit 1 of the golden string is a 1, so bits 8-14(seven consecutive) are the same. Bit 2 of the golden string is 0, so bits 15-22(eight consecutive) are the same. Odd bits of the golden string mean to write 1 and even bits of the golden string mean to write 0.
PROG
'Visual Basic .NET
Private Structure VISINFO
Public dec, str, terms As String
End Structure
Private Function InputDecimal(ByVal vConstant As String) As VISINFO
On Error Resume Next
Dim i, q As Int32, a, b, c, n, z, v, sum As Decimal, gBit As String
gBit = "" : a = 0 : b = 1 : c = 0 : n = CDec(CDec(vConstant) ^ 3) : z = n
InputDecimal.dec = "" : InputDecimal.terms = "" : InputDecimal.str = ""
For i = 1 To CInt(txtExponent.Text)
If Abs(Abs(a + b) - n) < Abs(Abs(a - b) - n) Then
c = a + b : gBit = "1"
Else
c = a - b : gBit = "0"
End If
a = b : b = c
v = CDec(System.Math.Abs(c) ^ (1 / i))
sum += v : q += 1
InputDecimal.terms &= gBit & " " & CStr(i) & " " & CStr(System.Math.Round(n)) & " " & c.ToString & vbCrLf
InputDecimal.str &= gBit
InputDecimal.dec = ((sum / q) ^ (1 / 3)).ToString
n = n * z
Next
End Function
CROSSREFS
Sequence in context: A011713 A011699 A011710 * A023972 A185016 A103674
KEYWORD
easy,nonn,uned
AUTHOR
Shane Findley, Feb 19 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)