

A316388


a(n) = a(phi(n)) + a(nphi(n)) with a(1) = a(2) = a(3) = 1.


0



1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 12, 12, 13, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 28, 29, 30, 30, 31, 31, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

This sequence hits every positive integer and each term repeats at most three times.


LINKS

Table of n, a(n) for n=1..76.


FORMULA

a(n) = a(A000010(n)) + a(A051953(n)) with a(1) = a(2) = a(3) = 1.
a(n+1)  a(n) = 0 or 1 for all n >= 1.
lim_{n>infinity} a(n)/n = 1/2.


MATHEMATICA

Nest[Append[#1, #1[[EulerPhi@ #2]] + #1[[#2  EulerPhi@ #2]] ] & @@ {#, Length@ #} &, {1, 1, 1}, 88] (* Michael De Vlieger, Jul 01 2018 *)


PROG

(PARI) q=vector(99); for(n=1, 3, q[n] = 1); for(n=4, #q, q[n] = q[eulerphi(n)] + q[neulerphi(n)]); q
(GAP) a:=[1, 1, 1];; for n in [4..80] do a[n]:=a[Phi(n)]+a[nPhi(n)]; od; a; # Muniru A Asiru, Jul 01 2018


CROSSREFS

Cf. A000010, A051953.
Sequence in context: A104257 A048182 A300293 * A029107 A209727 A063123
Adjacent sequences: A316385 A316386 A316387 * A316389 A316390 A316391


KEYWORD

nonn,easy


AUTHOR

Altug Alkan, Jul 01 2018


STATUS

approved



