cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A297168 Difference between A156552 and its Moebius transform: a(n) = A156552(n) - A297112(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 3, 2, 5, 0, 7, 0, 9, 6, 7, 0, 9, 0, 11, 10, 17, 0, 15, 4, 33, 6, 19, 0, 17, 0, 15, 18, 65, 12, 19, 0, 129, 34, 23, 0, 29, 0, 35, 14, 257, 0, 31, 8, 17, 66, 67, 0, 21, 20, 39, 130, 513, 0, 35, 0, 1025, 22, 31, 36, 53, 0, 131, 258, 33, 0, 39, 0, 2049, 18, 259, 24, 101, 0, 47, 14, 4097, 0, 59, 68, 8193, 514, 71, 0, 37, 40
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2018

Keywords

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Total@ MapIndexed[#1 2^(First@ #2 - 1) &, Flatten@ Map[ConstantArray[2^(PrimePi@ #1 - 1), #2] & @@ # &, FactorInteger@ #]] - Boole[# == 1]/2 &, 91]}, Table[-DivisorSum[n, MoebiusMu[n/#] s[[#]] &, # < n &], {n, Length@ s}]] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
    A297112(n) = sumdiv(n,d,moebius(n/d)*A156552(d));
    A297168(n) = (A156552(n)-A297112(n));
    \\ Or alternatively as:
    A297168(n) = -sumdiv(n,d,(dA156552(d));
    
  • PARI
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A297112(n) = if(1==n,0,2^A297167(n));
    A297168(n) = sumdiv(n,d,(dA297112(d)); \\ Antti Karttunen, Mar 13 2018
    
  • Scheme
    (define (A297168 n) (- (A156552 n) (A297112 n)))
    (define (A297168 n) (if (= 1 n) 0 (- (A156552 n) (A000079 (A297167 n)))))

Formula

a(n) = -Sum_{d|n, dA008683(n/d)*A156552(d).
a(n) = Sum_{d|n, dA297112(d).
For n > 1, a(n) = Sum_{d|n, 1A033265(A156552(d)).
a(n) = A156552(n) - A297112(n).
a(1) = 0, for n > 1, a(n) = A156552(n) - 2^A297167(n).