All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Sine recurrence (Posted on 2019-01-08)
If a0 = sin2 (π/45) and an+1 = 4an(1 - an) for n >= 0, find the smallest positive integer n such that an = a0

 No Solution Yet Submitted by Danish Ahmed Khan No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 4 of 6 |
1   kill "sineiter.txt"
2   open "sineiter.txt" for output as #2
10   A0=(sin(#pi/45))^2
20   A=A0:N=0
30   print A0
40   for Iter=1 to 100
50     A=4*A*(1-A)
60     N=N+1
70     print N;" ";A;"   ";A-A0
71     print 2,N;" ";A;"   ";A-A0
80   next
200   close #2

The answer seems assuredly to be n=12.

When the above was run with about 195-digit precision it was apparent that the difference from a0 was non-zero through a11. Truncated values are:

` n difference from a0 (truncated) 1 0.014503186401625726583638 2 0.071109986292572172348799 3 0.275948460976246448815520 4 0.802964772033614297376292 5 0.616094982170619018822108 6 0.936607830800248628557973 7 0.215537582635411742461673 8 0.682437331078741175249369 9 0.85480393454011072721991410 0.47768428601953467171888911 0.993916059500697281348468`

At n=12 we get

-0.000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000462

as the difference from a0.

At successive multiples of 12, the rounding error accumulates:

n=24
-0.000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000001895733

n=36
-0.000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000007764925473

etc.

Edited on January 8, 2019, 11:23 am
 Posted by Charlie on 2019-01-08 11:22:15

 Search: Search body:
Forums (0)