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

Home > Numbers > Sequences
A chain of powers (Posted on 2016-12-22) Difficulty: 3 of 5
Let f1(n)=(nn)mod7
Let f2(n)=((f1(n))n)mod7
Let f3(n)=((f2(n))n)mod7
etc

Evaluate f7(n) for n=1,2....9
Comment upon your results.

No Solution Yet Submitted by Ady TZIDON    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer observations Comment 1 of 1
 n    f1(n) thru f7(n)

 1      1 1 1 1 1 1 1
 2      4 2 4 2 4 2 4
 3      6 6 6 6 6 6 6
 4      4 4 4 4 4 4 4
 5      3 5 3 5 3 5 3
 6      1 1 1 1 1 1 1
 7      0 0 0 0 0 0 0
 8      1 1 1 1 1 1 1
 9      1 1 1 1 1 1 1
10      4 4 4 4 4 4 4
11      2 4 2 4 2 4 2
12      1 1 1 1 1 1 1
13      6 6 6 6 6 6 6
14      0 0 0 0 0 0 0
15      1 1 1 1 1 1 1
16      2 2 2 2 2 2 2
17      5 3 5 3 5 3 5
18      1 1 1 1 1 1 1
19      5 5 5 5 5 5 5
20      1 1 1 1 1 1 1
21      0 0 0 0 0 0 0
22      1 1 1 1 1 1 1
23      4 2 4 2 4 2 4
24      1 1 1 1 1 1 1
25      4 4 4 4 4 4 4
26      4 2 4 2 4 2 4
27      6 6 6 6 6 6 6
28      0 0 0 0 0 0 0
29      1 1 1 1 1 1 1
30      1 1 1 1 1 1 1

I don't see a pattern to f7(n). Within a given n, the cycle length is only 1 or 2 going from fx(n) to f(x+1)(n). As a result f7 matches f1, which is n^n mod 7.

Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For n = 1 To 30
  f1 = 1
  For i = 1 To n
    f1 = f1 * n Mod 7
  Next
  f2 = 1
  For i = 1 To n
    f2 = f2 * f1 Mod 7
  Next
  f3 = 1
  For i = 1 To n
    f3 = f3 * f2 Mod 7
  Next
  f4 = 1
  For i = 1 To n
    f4 = f4 * f3 Mod 7
  Next
  f5 = 1
  For i = 1 To n
    f5 = f5 * f4 Mod 7
  Next
  f6 = 1
  For i = 1 To n
    f6 = f6 * f5 Mod 7
  Next
  f7 = 1
  For i = 1 To n
    f7 = f7 * f6 Mod 7
  Next
  Text1.Text = Text1.Text & mform(n, "#0") & "     " & Str(f1) & Str(f2) & Str(f3) & Str(f4) & Str(f5) & Str(f6) & Str(f7) & crlf
 Next
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

Function mform$(x, t$)
  a$ = Format$(x, t$)
  If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
  mform$ = a$
End Function


  Posted by Charlie on 2016-12-22 09:37:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (12)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information