login
A054251
a(0) = 1; a(n) = Sum_{0 <= k < n and gcd(k, n) != 1} a(k).
2
1, 0, 1, 1, 2, 1, 5, 1, 9, 7, 19, 1, 45, 1, 83, 79, 165, 1, 417, 1, 827, 639, 1575, 1, 3875, 927, 7025, 5069, 14689, 1, 35461, 1, 64199, 47175, 128399, 52727, 309767, 1, 566565, 409567, 1186863, 1, 2835257, 1, 5202425, 4888729, 10357675, 1, 26066615
OFFSET
0,5
LINKS
MATHEMATICA
a[0]:= 1; a[n_]:= a[n] =Sum[If[GCD[k, n]!=1, a[k], 0], {k, 0, n-1}];
Table[a[n], {n, 0, 50}] (* G. C. Greubel, Jul 31 2019 *)
PROG
(PARI) a(n) = if(n==0, 1, sum(j=0, n-1, if(gcd(j, n)!=1, a(j), 0)));
vector(50, n, n--; a(n)) \\ G. C. Greubel, Jul 31 2019
CROSSREFS
Cf. A045545.
Sequence in context: A093127 A115123 A132081 * A163963 A119763 A363087
KEYWORD
nonn
STATUS
approved