login
A324336
a(n) = A323893(A005940(1+n)).
4
1, -2, -3, -1, -4, 4, -4, -2, -6, 5, 6, 3, -9, 8, -12, -4, -7, 7, 8, 4, 9, 5, 16, 8, -25, 18, 27, 8, -36, 32, -36, -8, -9, 8, 9, 6, 10, 11, 24, 11, 12, 20, 49, 6, 54, 4, 72, 20, -36, 50, 75, 18, 100, 0, 72, 16, -150, 99, 162, 24, -144, 120, -108, -16, -10, 10, 11, 7, 12, 14, 28, 17, 14, 25, 60, 12, 63, 12, 112, 28, 15, 47, 106, 21, 165, -110, 84, -5
OFFSET
0,2
FORMULA
a(n) = A323893(A005940(1+n)).
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
A048673(n) = (A003961(n)+1)/2;
memoA323893 = Map();
A323893(n) = if(1==n, 1, my(v); if(mapisdefined(memoA323893, n, &v), v, v = -sumdiv(n, d, if(d<n, A048673(n/d)*A323893(d), 0)); mapput(memoA323893, n, v); (v)));
A324336(n) = A323893(A005940(1+n));
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 23 2019
STATUS
approved