login
a(1)=0. a(2)=1. a(n) = a(d(n)) + a(phi(n)), where d(n) = A000005(n), phi(n) = A000010(n).
1

%I #17 Jul 13 2017 21:13:11

%S 0,1,2,3,4,4,5,6,6,6,7,7,8,7,9,10,11,8,9,10,10,9,10,12,12,10,11,11,12,

%T 12,13,14,13,13,15,13,14,11,15,16,17,13,14,14,16,12,13,16,15,14,17,16,

%U 17,14,19,18,16,14,15,17,18,15,17,19,19,16,17,18,17,18,19,19,20,16,20

%N a(1)=0. a(2)=1. a(n) = a(d(n)) + a(phi(n)), where d(n) = A000005(n), phi(n) = A000010(n).

%C Question: With what numbers the gaps (horizontal stripes) in the scatter plot are associated? - _Antti Karttunen_, Jul 12 2017

%H Antti Karttunen, <a href="/A126974/b126974.txt">Table of n, a(n) for n = 1..16384</a>

%p with(numtheory): a[1]:=0: a[2]:=1: for n from 3 to 90 do a[n]:=a[tau(n)]+a[phi(n)] od: seq(a[n],n=1..90); # _Emeric Deutsch_, Mar 24 2007

%t f[l_List] := Block[{n = Length[l] + 1},Append[l, l[[DivisorSigma[0, n]]] + l[[EulerPhi[n]]]]];Nest[f, {0, 1}, 75] (* _Ray Chandler_, Mar 24 2007 *)

%t a[n_] := a[n] = If[n <= 2, n - 1, a[DivisorSigma[0, n]] + a[EulerPhi@ n]]; Array[a, 75] (* _Michael De Vlieger_, Jul 12 2017 *)

%o (PARI) A126974(n) = if(n<3,n-1,A126974(numdiv(n))+ A126974(eulerphi(n))); \\ _Antti Karttunen_, Jul 12 2017

%Y Cf. A000005, A000010.

%K nonn,look

%O 1,3

%A _Leroy Quet_, Mar 20 2007

%E More terms from _Emeric Deutsch_ and _Ray Chandler_, Mar 24 2007