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-5 of 5 results.

A344765 a(n) = sigma(n) - A011772(n).

Original entry on oeis.org

0, 0, 2, 0, 2, 9, 2, 0, 5, 14, 2, 20, 2, 17, 19, 0, 2, 31, 2, 27, 26, 25, 2, 45, 7, 30, 14, 49, 2, 57, 2, 0, 37, 38, 34, 83, 2, 41, 44, 75, 2, 76, 2, 52, 69, 49, 2, 92, 9, 69, 55, 59, 2, 93, 62, 72, 62, 62, 2, 153, 2, 65, 77, 0, 59, 133, 2, 110, 73, 124, 2, 132, 2, 78, 100, 84, 75, 156, 2, 122, 41, 86, 2, 176, 74, 89
Offset: 1

Views

Author

Antti Karttunen, May 30 2021

Keywords

Crossrefs

Cf. A000203, A001065, A011772, A294898, A344763, A344766, A344768 (Möbius transform), A344769.

Programs

Formula

a(n) = A000203(n) - A011772(n).
a(n) = A001065(n) + A344763(n).
a(n) = Sum_{d|n} A344768(d).
a(n) = A344769(n) - A294898(n).

A344876 a(n) = A344875(n) - A011772(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 6, 0, 11, 3, 0, 0, 16, 0, 13, 6, 19, 0, 15, 0, 24, 0, 35, 0, 9, 0, 0, 9, 32, 10, 48, 0, 35, 12, 45, 0, 16, 0, 38, 23, 43, 0, 30, 0, 48, 15, 45, 0, 51, 30, 42, 18, 56, 0, 41, 0, 59, 21, 0, 23, 49, 0, 96, 21, 52, 0, 57, 0, 72, 24, 70, 39, 60, 0, 60, 0, 80, 0, 36, 30, 83, 27, 118, 0, 61, 59, 131
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2021

Keywords

Comments

Apparently A000961 gives the positions of zeros.

Crossrefs

Programs

  • Mathematica
    A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
    A344875[n_] := Product[{p, e} = pe; If[p == 2, 2^(1+e)-1, p^e-1], {pe, FactorInteger[n]}];
    a[n_] := If[n == 1, 0, A344875[n] - A011772[n]];
    Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
    A344876(n) = (A344875(n)-A011772(n));

Formula

a(n) = A344875(n) - A011772(n).
a(n) >= A344976(n).

A344764 a(n) = gcd(n, A011772(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 4, 1, 7, 5, 1, 1, 2, 1, 5, 3, 11, 1, 3, 1, 2, 1, 7, 1, 15, 1, 1, 11, 2, 7, 4, 1, 19, 3, 5, 1, 2, 1, 4, 9, 23, 1, 16, 1, 2, 17, 13, 1, 27, 5, 8, 3, 2, 1, 15, 1, 31, 9, 1, 5, 11, 1, 4, 23, 10, 1, 9, 1, 2, 3, 4, 7, 6, 1, 16, 1, 2, 1, 12, 17, 43, 29, 8, 1, 5, 13, 23, 3, 47, 19, 3, 1, 2
Offset: 1

Views

Author

Antti Karttunen, May 30 2021

Keywords

Crossrefs

Programs

Formula

a(n) = gcd(n, A011772(n)) = gcd(A011772(n), A344763(n)) = gcd(n, A344763(n)).

A344769 a(n) = A005187(n) - A011772(n).

Original entry on oeis.org

0, 0, 2, 0, 4, 7, 5, 0, 8, 14, 9, 14, 11, 18, 21, 0, 16, 26, 17, 23, 33, 30, 20, 31, 23, 37, 24, 46, 26, 41, 27, 0, 53, 50, 53, 62, 35, 54, 62, 63, 39, 61, 40, 53, 77, 65, 43, 62, 47, 73, 81, 62, 50, 77, 95, 61, 92, 84, 55, 101, 57, 88, 93, 0, 103, 119, 65, 118, 112, 117, 68, 79, 71, 109, 122, 93, 129, 140, 75, 94, 79, 121
Offset: 1

Views

Author

Antti Karttunen, May 30 2021

Keywords

Crossrefs

Programs

  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344769(n) = (A005187(n) - A011772(n));
    
  • Python
    from itertools import combinations
    from math import prod
    from sympy import factorint, divisors
    from sympy.ntheory.modular import crt
    def A344769(n):
        c = 2*n-bin(n).count('1')
        plist = [p**q for p, q in factorint(2*n).items()]
        if len(plist) == 1:
            return int(c+1+(plist[0] % 2 - 2)*n)
        return int(c-min(min(crt([m,2*n//m],[0,-1])[0],crt([2*n//m,m],[0,-1])[0]) for m in (prod(d) for l in range(1,len(plist)//2+1) for d in combinations(plist,l)))) # Chai Wah Wu, Jun 03 2021

Formula

a(n) = A005187(n) - A011772(n).
a(n) = A344765(n) + A294898(n).
a(2^e) = 0, for e >= 0.
If n is an odd prime power, then a(n) = n+1-A000120(n). - Chai Wah Wu, Jun 03 2021

A344874 a(n) = A047994(n) - A011772(n).

Original entry on oeis.org

0, -2, 0, -4, 0, -1, 0, -8, 0, 0, 0, -2, 0, -1, 3, -16, 0, 0, 0, -3, 6, -1, 0, -1, 0, 0, 0, 11, 0, -7, 0, -32, 9, 0, 10, 16, 0, -1, 12, 13, 0, -8, 0, -2, 23, -1, 0, -2, 0, 0, 15, -3, 0, -1, 30, -6, 18, 0, 0, 9, 0, -1, 21, -64, 23, 9, 0, 32, 21, 4, 0, -7, 0, 0, 24, -2, 39, 12, 0, -4, 0, 0, 0, -12, 30, -1, 27, 38, 0, -3, 59
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2021

Keywords

Crossrefs

Programs

  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A047994(n) = { my(f=factor(n)~); prod(i=1, #f, f[1, i]^f[2, i]-1); };
    A344874(n) = (A047994(n)-A011772(n));
Showing 1-5 of 5 results.