login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Multiplicative with a(p^e) = p^(p-1) if e >= p, otherwise a(p^e) = p^e.
5

%I #10 Nov 07 2022 07:40:22

%S 1,2,3,2,5,6,7,2,9,10,11,6,13,14,15,2,17,18,19,10,21,22,23,6,25,26,9,

%T 14,29,30,31,2,33,34,35,18,37,38,39,10,41,42,43,22,45,46,47,6,49,50,

%U 51,26,53,18,55,14,57,58,59,30,61,62,63,2,65,66,67,34,69,70,71,18,73,74,75,38,77,78,79,10,9,82,83,42,85,86,87,22

%N Multiplicative with a(p^e) = p^(p-1) if e >= p, otherwise a(p^e) = p^e.

%C All terms are in A048103.

%H Antti Karttunen, <a href="/A327937/b327937.txt">Table of n, a(n) for n = 1..20000</a>

%F Multiplicative with a(p^e) = p^(p-1) if e >= p, otherwise a(p^e) = p^e.

%F For all n, A129251(a(n)) = 0, A327936(a(n)) = 1.

%F Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (1 - 1/((p+1)*p^(p-1))) = 0.40498413761092854213... . - _Amiram Eldar_, Nov 07 2022

%t f[p_, e_] := If[e >= p, p^(p - 1), p^e]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Nov 07 2022 *)

%o (PARI) A327937(n) = { my(f = factor(n)); for(k=1, #f~, if(f[k,2]>=f[k,1], f[k,2] = f[k,1]-1)); factorback(f); };

%Y Cf. A048103, A129251, A327936, A327938.

%K nonn,mult

%O 1,2

%A _Antti Karttunen_, Oct 01 2019