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.

Showing 1-3 of 3 results.

A297114 Möbius transform of A294898, where A294898 is deficiency minus binary weight.

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, -2, 7, -4, 9, -2, 0, 0, 14, -6, 15, -4, 4, -2, 18, -8, 14, -2, 7, -4, 24, -14, 25, 0, 9, -2, 14, -12, 33, -2, 9, -8, 37, -18, 38, -4, 3, -2, 41, -16, 35, -10, 12, -4, 48, -18, 24, -8, 15, -2, 53, -28, 55, -2, 6, 0, 33, -26, 63, -4, 21, -22, 66, -24, 69, -2, 6, -4, 44, -30, 73, -16, 28, -2
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] (2 # - DigitCount[2 #, 2, 1] - DivisorSigma[1, #]) &], {n, 82}] (* Michael De Vlieger, Mar 11 2019 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A297114(n) = sumdiv(n,d,moebius(n/d)*(A005187(d)-sigma(d)));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A294898(d).
a(n) = A297111(n) - n.
a(n) = A297117(n) - A051953(n).
a(n) = A083254(n) - A297115(n).
a(2n) = A083254(2n) = A378986(n) = -2*A176095(n).
a(n) = A294898(n) - A317844(n).

A098006 (p-1)/2 - phi(p-1) as p runs through the odd primes.

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 3, 1, 2, 7, 6, 4, 9, 1, 2, 1, 14, 13, 11, 12, 15, 1, 4, 16, 10, 19, 1, 18, 8, 27, 17, 4, 25, 2, 35, 30, 27, 1, 2, 1, 42, 23, 32, 14, 39, 57, 39, 1, 42, 4, 23, 56, 25, 0, 1, 2, 63, 50, 44, 49, 2, 57, 35, 60, 2, 85, 72, 1, 62, 16, 1, 63, 66, 81, 1, 2, 78, 40, 76, 29, 114, 47
Offset: 2

Views

Author

N. J. A. Sloane, Sep 08 2004

Keywords

Comments

In the Luca-Walsh paper it is shown that there are infinitely many numbers not in this sequence. See A098047.
a(n)=0 for Fermat primes (A019434). a(n)=1 for safe primes (A005385). a(n)=2 for A090866. The least prime p for which (p-1)/2-phi(p-1)=n or 0 if there is no such prime is given by A134765(n). Sequence A134854(k) gives the least prime for which a(n)=2^(k-1). For k not a power of 2, it can be shown that if k is in this sequence, then it appears for a prime p <= 1+k^2. - T. D. Noe, Nov 13 2007

References

  • J. Browkin and A. Schinzel, On integers not of the form n-phi(n), Colloq. Math., 68 (1995), 55-58.
  • F. Luca and P. G. Walsh, On the number of nonquadratic residues which are not primitive roots, Colloq. Math., 100 (2004), 91-93.

Crossrefs

Cf. A000010, A051953, A098047, A176095 (p runs through the odd numbers).

Programs

  • Haskell
    a098006 n = a005097 (n-1) - a000010 (a006093 n)
    -- Reinhard Zumkeller, Mar 26 2013
    
  • Magma
    [(NthPrime(n)-1)/2 - EulerPhi(NthPrime(n)-1): n in [2..100]]; // Vincenzo Librandi, Jan 10 2017
  • Maple
    A098006 := proc(n)
        local p;
        p := ithprime(n+1) ;
        (p-1)/2-numtheory[phi](p-1) ;
    end proc:
    seq(A098006(n),n=1..30) ; # R. J. Mathar, Jan 09 2017
  • Mathematica
    Table[(Prime[n] - 1)/2 - EulerPhi[Prime[n] - 1], {n, 2, 85}] (* Robert G. Wilson v, Sep 09 2004 *)
    Table[(n-1)/2-EulerPhi[n-1],{n,Prime[Range[2,100]]}] (* Harvey P. Dale, Oct 23 2016 *)
  • PARI
    forprime(p=3,1e3,print1(p\2-eulerphi(p-1)", ")) \\ Charles R Greathouse IV, Feb 04 2013
    

Formula

a(n) = A005097(n-1) - A000010(A006093(n)); a(A159611(n)) = 0. - Reinhard Zumkeller, Mar 26 2013

A378986 a(n) = 2*phi(2*n) - 2*n, where phi is Euler totient function.

Original entry on oeis.org

0, 0, -2, 0, -2, -4, -2, 0, -6, -4, -2, -8, -2, -4, -14, 0, -2, -12, -2, -8, -18, -4, -2, -16, -10, -4, -18, -8, -2, -28, -2, 0, -26, -4, -22, -24, -2, -4, -30, -16, -2, -36, -2, -8, -42, -4, -2, -32, -14, -20, -38, -8, -2, -36, -30, -16, -42, -4, -2, -56, -2, -4, -54, 0, -34, -52, -2, -8, -50, -44, -2, -48, -2, -4
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Crossrefs

Even bisection of A083254, and of A297114.
First row of A379011.
Cf. also A378987.

Programs

  • PARI
    A378986(n) = (2*eulerphi(2*n)-(2*n));

Formula

a(n) = 2*A000010(2*n) - 2*n.
a(n) = A083254(2*n) = A297114(2*n).
a(n) = -2*A176095(n).
a(n) = Sum_{d|2n} A008683(d)*A033879(2*n/d).
Showing 1-3 of 3 results.