A190014 a(0)=0, a(1)=1, if n = (n-1)', then a(n)=0 otherwise a(n)=2*a((n-1)'), where n' is the arithmetic derivative of n.
0, 1, 0, 2, 2, 4, 2, 8, 2, 4, 4, 16, 2, 8, 2, 8, 4, 4, 2, 8, 2, 4, 8, 16, 2, 4, 8, 16, 32, 4, 2, 0, 2, 4, 4, 16, 4, 4, 2, 8, 8, 4, 2, 8, 2, 4, 16, 8, 2, 32, 4, 8, 4, 16, 2, 512, 8, 8, 16, 0, 2, 8, 2, 8, 16, 4, 4, 16, 2, 4, 16, 0, 2, 16, 2, 16, 1024, 4, 4, 0, 2, 256, 4, 16, 2, 8, 16, 8, 4, 4, 2, 32, 4, 8, 8, 64, 4, 4, 2, 8, 32, 4
Offset: 0
Keywords
Examples
a(0)=0 a(1)=1 a(2)=a(1+1)=2*a(1')=2*a(0)=0 a(3)=a(2+1)=2*a(2')=2*a(1)=2 a(4)=a(3+1)=2*a(3')=2*a(1)=2 a(5)=a(4+1)=2*a(4')=2*a(4)=4 a(6)=a(5+1)=2*a(5')=2*a(1)=2 a(7)=a(6+1)=2*a(6')=2*a(5)=8 etc.
Links
- Paolo P. Lava, Table of n, a(n) for n = 0..5000
- Paolo P. Lava, Plot of the first 5000 terms of the sequence
Programs
-
Maple
with(numtheory); P:=proc(i) local a,f,n,p,pfs,t; a:=array(0..100000); a[0]:=0; a[1]:=1; t:=2; lprint(0,a[0]); lprint(1,a[1]); for n from 1 by 1 to i do pfs:=ifactors(n)[2]; f:=n*add(op(2,p)/op(1,p),p=pfs); a[n+1]:=t*a[f]; lprint(n+1,a[n+1]); od; end:
-
Mathematica
dn[0] = 0; dn[1] = 0; dn[n_] := Module[{f = Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Plus @@ (n*f[[2]]/f[[1]])]]; a[0] = 0; a[1] = 1; a[n_] := a[n] = Module[{d = dn[n - 1]}, If[d == n, 0, 2 a[d]]]; Array[a,100,0] (* T. D. Noe, May 05 2011 *)
Comments