|
|
A127370
|
|
a(1)=1. a(n) = number of positive integers <= n and coprime to (Sum_{k=1..n-1} a(k)).
|
|
0
|
|
|
1, 2, 2, 4, 4, 6, 7, 4, 2, 5, 11, 4, 6, 7, 11, 8, 5, 18, 19, 6, 6, 7, 19, 12, 12, 13, 18, 19, 12, 12, 16, 16, 10, 16, 14, 18, 17, 26, 32, 35, 11, 39, 22, 15, 30, 31, 19, 45, 25, 34, 51, 22, 24, 22, 19, 52, 53, 29, 32, 57, 31, 34, 59, 17, 45, 26, 34, 26, 35, 47, 36, 30, 37, 45, 21
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The sum of the first 8 terms of the sequence is 30. So a(9) is the number of positive integers <= 9 and coprime to 30. There are two such integers, 1 and 7. So a(9) = 2.
|
|
MAPLE
|
a[1]:=1: for n from 2 to 100 do ct:=0: for j from 1 to n do if gcd(j, sum(a[k], k=1..n-1))=1 then ct:=ct+1 else ct:=ct: fi od: a[n]:=ct: od: seq(a[n], n=1..100); # Emeric Deutsch, Apr 13 2007
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|