New sequence derived from the totient function

Max Alekseyev maxale at gmail.com
Thu May 15 03:21:19 CEST 2008


On Wed, May 14, 2008 at 5:44 PM, Benoit Jubin <benoit.jubin at gmail.com> wrote:

>> 1, 2, 7, 7, 13, 13, 19, 19, 31, 31, 31, 31, 43, 43, 43, 43, 61, 61,
>
> Thanks for the computation, Max.  Shouldn't the second term be 3 instead of 2 ?

Sure, you're right, but the remaining terms must be correct.
The reason for this miscalculation of the second term was incorrect
initialization of the set S in my code.
Here is the corrected code and the sequence:

? S=Set(invphi(1));print1(1,",
");for(n=2,100,print1(vecmax(eval(S))+1,",
");S=setunion(S,Set(invphi(n))))

1, 3, 7, 7, 13, 13, 19, 19, 31, 31, 31, 31, 43, 43, 43, 43, 61, 61,
61, 61, 67, 67, 67, 67, 91, 91, 91, 91, 91, 91, 91, 91, 121, 121, 121,
121, 127, 127, 127, 127, 151, 151, 151, 151, 151, 151, 151, 151, 211,
211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
211, 241, 241, 241, 241, 241, 241, 241, 241, 271, 271, 271, 271, 271,
271, 271, 271, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
331, 331, 331, 331, 331, 421, 421, 421, 421,

Regards,
Max


X-NetKnow-OutGoing-4-69-9-1-MailScanner-Watermark: 1211248972.11283 at tbTYnnyCipRUj1bKFmnsmA



More information about the SeqFan mailing list