0,4

A variation on Hofstadter's G-sequence.

Table of n, a(n) for n=0..79.

Ilya Gutkovskiy, Extended graphical example

Index entries for Hofstadter-type sequences

a(n) = n - a(a(n-1)*Product_{p|a(n-1), p prime} (1 - 1/p)) for n > 3.

a(n) = n - a(a(n-1)-1) for a(n-1) is a prime.

a[0] = 0; a[n_] := a[n] = n - a[EulerPhi[a[n - 1]]]; Array[a, 80, 0]

Cf. A000010, A005206, A005374, A135528 (parity of a(n)).

Sequence in context: A135681 A135680 A135682 * A083245 A111610 A119816

Adjacent sequences: A287412 A287413 A287414 * A287416 A287417 A287418

nonn

Ilya Gutkovskiy, May 24 2017

approved