A099305 Number of solutions of the equation (n+k)' = n' + k', with 1 <= k <= 2n, where n' denotes the arithmetic derivative of n.
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 2, 2, 1, 3, 1, 3, 1, 2, 3, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 1, 2, 1, 3, 2, 3, 2, 2, 2, 2, 3, 3, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 2, 2, 1, 3, 3, 3, 1, 2, 2, 3, 2
Offset: 1
Keywords
References
- See A003415
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Haskell
a099305 n = a099305_list !! (n-1) a099305_list = f 1 $ h 1 empty where f x ad = y : f (x + 1) (h (3 * x + 1) ad) where y = length [() | k <- [1 .. 2 * x], let x' = ad ! x, ad ! (x + k) == x' + ad ! k] h z = insert z (a003415 z) . insert (z+1) (a003415 (z+1)) . insert (z+2) (a003415 (z+2)) -- Reinhard Zumkeller, May 21 2015
-
Mathematica
dn[0]=0; dn[1]=0; dn[n_]:=Module[{f=Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Plus@@(n*f[[2]]/f[[1]])]]; Table[lst={}; k=0; While[k<2n, k++; While[k<=2n && dn[n]+dn[k] != dn[n+k], k++ ]; If[dn[n]+dn[k]==dn[n+k], AppendTo[lst, k]]]; Length[lst], {n, 100}]
Comments