login
An analog of sigma(n)-n (A001065) for nonstandard factorization based on the sieve of Eratosthenes (A083221).
3

%I #7 Mar 08 2019 20:14:32

%S 0,1,1,3,1,6,1,7,4,8,1,16,1,10,9,15,1,21,1,22,13,14,1,36,6,16,11,28,1,

%T 42,1,31,33,20,13,55,1,22,15,50,1,66,1,40,40,26,1,76,8,43,49,46,1,54,

%U 31,64,41,32,1,108,1,34,17,63,17,144,1,58,105,74,1,123,1,40,21,64,19,78,1,106,57,44,1,172,73,46,87,92,1,201,57,76,121

%N An analog of sigma(n)-n (A001065) for nonstandard factorization based on the sieve of Eratosthenes (A083221).

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

%H Antti Karttunen, <a href="/A324535/a324535.txt">Data supplement: n, a(n) computed for n = 1..65537</a>

%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>

%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>

%F a(n) = A001065(A250246(n)) = A324545(n) - A250246(n).

%F a(n) = A250246(n) - A324546(n).

%o (PARI)

%o up_to = 65537;

%o ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };

%o A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639

%o A055396(n) = if(1==n,0,primepi(A020639(n)));

%o v078898 = ordinal_transform(vector(up_to,n,A020639(n)));

%o A078898(n) = v078898[n];

%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961

%o A250246(n) = if(1==n,n,my(k = 2*A250246(A078898(n)), r = A055396(n)); if(1==r, k, while(r>1, k = A003961(k); r--); (k)));

%o A001065(n) = (sigma(n)-n);

%o A324535(n) = A001065(A250246(n));

%Y Cf. A001065, A250246, A324545, A324546.

%K nonn

%O 1,4

%A _Antti Karttunen_, Mar 08 2019