OFFSET
1,5
EXAMPLE
The positive integers which are both less than 9 and are coprime to 9 are 1, 2, 4, 5, 7 and 8. Of these, only the three integers 5, 7 and 8 do not occur earlier in the sequence, so a(9)=3.
PROG
(Perl) #!/usr/bin/perl -w
use Math::PARI qw/ gcd eulerphi /;
$| = 1;
$n = 2;
%seen = (1 => 1);
while (1) {
$v = eulerphi($n) - grep gcd($n, $_) == 1, keys %seen;
$seen{$v} = 1;
++$n;
print "$v ";
} # from Hugo van der Sanden, Mar 30 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 27 2006
EXTENSIONS
More terms from Hugo van der Sanden, Mar 31 2006
STATUS
approved