A324055 Deficiency of Doudna-sequence: a(n) = A033879(A005940(1+n)).
1, 1, 2, 1, 4, 0, 5, 1, 6, 2, 6, -4, 19, -3, 14, 1, 10, 4, 10, -2, 22, -12, 12, -12, 41, 7, 26, -19, 94, -12, 41, 1, 12, 8, 18, 0, 38, -12, 22, -10, 58, -4, 18, -48, 102, -54, 30, -28, 109, 25, 66, -17, 148, -72, 47, -51, 286, 32, 126, -64, 469, -39, 122, 1, 16, 10, 22, 4, 46, -12, 42, -8, 70, 4, 42, -56, 178, -60, 58, -26, 118, 20
Offset: 0
Links
Crossrefs
Programs
-
Mathematica
Array[Block[{p = Partition[Split[Join[IntegerDigits[#, 2], {2}]], 2]}, 2 # - DivisorSigma[1, #] &[Times @@ Flatten@ Table[Prime[Count[Flatten@ #, 0] + 1]^#[[1, 1]] &@ Take[p, -i], {i, Length[p]}]]] &, 82, 0] (* Michael De Vlieger, Mar 11 2019, after Robert G. Wilson v at A005940 *)
-
PARI
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940 A033879(n) = (2*n-sigma(n)); A324055(n) = A033879(A005940(1+n));
-
PARI
A324055(n) = { my(m1=2,m2=1,p=2,mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4),mp *= p,m2 *= (mp-1)/(p-1))); n>>=1); (m1-m2); };
Comments