login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287415 a(0) = 0; a(1) = 1; a(n) = n - a(phi(a(n-1))), where phi() is the Euler totient function (A000010). 1
0, 1, 1, 2, 3, 4, 5, 4, 7, 4, 9, 6, 11, 4, 13, 4, 15, 10, 15, 12, 17, 6, 21, 12, 21, 14, 21, 16, 21, 18, 25, 14, 27, 18, 29, 14, 31, 12, 35, 18, 35, 20, 35, 22, 35, 24, 39, 26, 37, 18, 45, 30, 45, 32, 39, 34, 41, 22, 49, 24, 53, 16, 55, 28, 53, 20, 59, 18, 63, 38, 55, 36, 61, 20, 67, 16, 69, 42, 67, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

A variation on Hofstadter's G-sequence.

LINKS

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

Ilya Gutkovskiy, Extended graphical example

Index entries for Hofstadter-type sequences

FORMULA

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.

MATHEMATICA

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

CROSSREFS

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

KEYWORD

nonn

AUTHOR

Ilya Gutkovskiy, May 24 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 1 19:32 EDT 2020. Contains 334762 sequences. (Running on oeis4.)