I got stuck in solving this question. Can you help me?

Find a positive integer n such that phi(n) = phi (n+1) = phi (n+2).

Results 1 to 12 of 12

- September 4th 2006, 12:16 PM #1

- Joined
- Sep 2006
- Posts
- 83

- September 4th 2006, 01:02 PM #2

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- September 4th 2006, 01:03 PM #3

- Joined
- Nov 2005
- From
- New York City
- Posts
- 10,616
- Thanks
- 10

- September 4th 2006, 01:08 PM #4

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- September 4th 2006, 04:54 PM #5

- Joined
- Nov 2005
- From
- New York City
- Posts
- 10,616
- Thanks
- 10

- September 4th 2006, 08:59 PM #6

- Joined
- Sep 2006
- Posts
- 83

- September 4th 2006, 09:44 PM #7

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- September 5th 2006, 05:26 AM #8

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

Originally Posted by**beta12**

1. Google for Euler Totient function and look through the hits.

2. Write some code to conduct a search:

Define the EulerTotient function

Code:function EulerTotient(m) ## ## Euler Totient function using the formula from ## Hardy and Wright 5th Ed, p53. ## ## CB 2006 ## ff=factor1(m);..find prime factors and multiplicities ff=ff(:,1); ..extract the distinct prime factors ll=length(ff); prd=m; ..this next bit is for the benefit of causual readers ..the vectorised method is prd=prd*prod(1-1/ff'); for idx=1 to ll prd=prd*(1-1/ff(idx)); end ..for rv=round(prd,0); return rv endfunction

Code:> >.. load the EulerTotient definition > >load "D:\user\temp\EulerTotient.e"; > >.. test it > >EulerTotient(7^2) 42 > >.. set up a search between lo and hi > >function search(lo,hi) $ rv=[]; $ lst=EulerTotient(lo); $ for idx=lo+1 to hi $ nxt=EulerTotient(idx); $ if nxt==lst $ nxtnxt=EulerTotient(idx+1); $ if nxtnxt==nxt $ rv=rv|idx-1; $ endif $ endif $ lst=nxt; $ end ..for $ $ return rv $endfunction > >.. run the search and time it > >t=time;search(10,10000),time-t 5186 6.031 >

RonL

- September 5th 2006, 06:42 AM #9

- Joined
- Nov 2005
- From
- New York City
- Posts
- 10,616
- Thanks
- 10

3.Look up in your Number Theory textbook and this problem appears. It does not ask to solve it, rather it asks to confirm it wokrs for this number.

I do not think there is a simple way to solve this problem. I have tried to find a neccesarilly and sufficient condition for, .

If, then,

.

With, since, .

Thus, you have,

You can cancel the q's and p's but that brings you nowhere.

- September 5th 2006, 06:51 AM #10

- Joined
- Sep 2006
- Posts
- 83

- September 5th 2006, 07:24 AM #11

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- September 5th 2006, 08:48 AM #12

- Joined
- Nov 2005
- From
- New York City
- Posts
- 10,616
- Thanks
- 10