login
a(n) counts the numbers in 0..n whose k-th arithmetic derivative is zero for some k >= 0.
5

%I #14 Jun 25 2022 12:03:05

%S 1,2,3,4,4,5,6,7,7,8,9,10,10,11,12,12,12,13,14,15,15,16,17,18,18,19,

%T 19,19,19,20,21,22,22,23,24,24,24,25,26,26,26,27,28,29,29,29,30,31,31,

%U 32,32,32,32,33,33,33,33,34,35,36,36,37,38,38,38,39,40,41,41,41,42,43,43,44,44,44,44,45,46,47,47,47,48

%N a(n) counts the numbers in 0..n whose k-th arithmetic derivative is zero for some k >= 0.

%C a(n) is the number of terms m in A099308 such that m <= n.

%H Antti Karttunen, <a href="/A328309/b328309.txt">Table of n, a(n) for n = 0..65537</a>

%F a(0) = 1; for n > 0, a(n) = a(n-1) + A328308(n).

%F For all n >= 0, a(A099308(n)) = n.

%o (PARI)

%o up_to = 65537;

%o A003415checked(n) = if(n<=1, 0, my(f=factor(n), s=0); for(i=1, #f~, if(f[i,2]>=f[i,1], return(0), s += f[i, 2]/f[i, 1])); (n*s));

%o A328308(n) = if(!n,1, while(n>1, n = A003415checked(n)); (n));

%o A328309list(up_to) = { my(v=vector(up_to), s=A328308(0)); for(i=1,up_to,s += A328308(i); v[i] = s); (v); };

%o v328309 = A328309list(up_to);

%o A328309(n) = if(!n,1,v328309[n]);

%Y Cf. A003415.

%Y Partial sums of A328308. A left inverse of A099308. Cf. also A328307.

%K nonn

%O 0,2

%A _Antti Karttunen_, Oct 12 2019