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.

Previous Showing 11-20 of 185 results. Next

A295882 Balanced ternary representation of the deficiency of n, A033879(n).

Original entry on oeis.org

1, 1, 5, 1, 4, 0, 15, 1, 17, 5, 10, 8, 12, 4, 15, 1, 52, 6, 45, 7, 10, 11, 49, 24, 46, 10, 53, 0, 28, 24, 30, 1, 45, 53, 49, 65, 36, 52, 49, 20, 40, 24, 159, 4, 12, 50, 154, 56, 161, 16, 30, 15, 142, 24, 41, 19, 43, 29, 139, 204, 150, 28, 49, 1, 154, 24, 147, 10, 159, 8, 106, 192, 99, 43, 29, 12, 139, 24, 87, 55
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Crossrefs

Cf. A000396 (gives the positions of zeros).

Programs

Formula

If A033879(n) >= 0, then a(n) = A117967(A033879(n)), otherwise a(n) = A117968(-A033879(n)).
For all n >= 1, A117966(a(n)) = A033879(n).

A325826 a(n) is the largest k <= sigma(n)-n such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.

Original entry on oeis.org

0, 1, 1, 3, 1, 1, 1, 7, 4, 7, 1, 15, 1, 9, 7, 15, 1, 20, 1, 21, 11, 13, 1, 35, 6, 13, 13, 1, 1, 41, 1, 31, 13, 19, 13, 55, 1, 21, 17, 49, 1, 53, 1, 39, 31, 23, 1, 75, 8, 43, 19, 43, 1, 65, 17, 63, 23, 31, 1, 107, 1, 33, 41, 63, 19, 77, 1, 57, 25, 73, 1, 122, 1, 39, 49, 61, 19, 89, 1, 105, 40, 43, 1, 139, 23, 43, 31, 91, 1, 143, 19, 75
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Crossrefs

Programs

  • PARI
    A325826(n) = { my(s=sigma(n)); forstep(k=s-n, 0, -1, if(1==gcd((n+n-sigma(n)), k), return(k))); };
    
  • PARI
    A325818(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(s-i))); };
    A325826(n) = (A325818(n) - n);

Formula

a(n) = A325818(n) - n = A001065(n) - A325817(n) = A325976(n) - A033879(n).
a(A000040(n)) = a(A000396(n)) = 1.
a(n) >= A325969(n).
gcd(a(n), A325976(n)) = 1.

A323911 Sum of deficiency of n (A033879) and its Dirichlet inverse.

Original entry on oeis.org

2, 0, 0, 1, 0, 4, 0, 1, 4, 8, 0, -2, 0, 12, 16, 1, 0, -2, 0, 0, 24, 20, 0, -8, 16, 24, 12, 2, 0, -28, 0, 1, 40, 32, 48, -15, 0, 36, 48, -6, 0, -36, 0, 6, 16, 44, 0, -20, 36, 6, 64, 8, 0, -12, 80, -4, 72, 56, 0, -46, 0, 60, 28, 1, 96, -52, 0, 12, 88, -44, 0, -39, 0, 72, 28, 14, 120, -60, 0, -18, 37, 80, 0, -58, 128, 84, 112, 0, 0, -52, 144, 18
Offset: 1

Views

Author

Antti Karttunen, Feb 12 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 16384;
    DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = -sumdiv(n, d, if(dA033879(n) = (2*n-sigma(n));
    v323910 = DirInverse(vector(up_to,n,A033879(n)));
    A323910(n) = v323910[n];
    A323911(n) = (A033879(n)+A323910(n));

Formula

a(n) = A033879(n) + A323910(n).

A324574 a(1) = 0; for n > 1, a(n) = A033879(A087207(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 5, 0, 1, 1, 2, 1, 4, 2, 16, 1, 2, 1, 18, 1, 5, 1, 6, 1, 1, -3, 46, -4, 2, 1, 82, 14, 4, 1, 10, 1, 16, 0, 256, 1, 2, 1, 4, -12, 18, 1, 2, -2, 5, 8, 226, 1, 6, 1, 748, 2, 1, -19, 18, 1, 46, -12, 12, 1, 2, 1, 1362, 0, 82, -12, 22, 1, 4, 1, 3838, 1, 10, 10, 5458, 254, 16, 1, 6, -10, 256, -348, 12250
Offset: 1

Views

Author

Antti Karttunen, Mar 08 2019

Keywords

Comments

As A087207 is a surjective function that toggles the parity, it follows that if it can be proved/disproved that a(n) = 0 for some/any even n, then it also proves/disproves the existence of odd perfect numbers.
The positions (n > 1) of zeros in squarefree n, 15, 385, ..., can be obtained as A019565(A000396(n)).

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = A033879(A087207(n)).
a(n) = a(A007947(n)) = A324575(A007947(n)).

A324575 a(1) = 0; for n > 1, a(n) = A033879(A048675(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 1, 1, 5, 0, 1, 1, 4, 1, 0, 2, 16, 1, 4, 1, 18, 0, 2, 1, 6, 1, 4, -3, 46, -4, 0, 1, 82, 14, 6, 1, 10, 1, -3, 1, 256, 1, 0, 1, 5, -12, 14, 1, 6, -2, 10, 8, 226, 1, 1, 1, 748, -4, 0, -19, 18, 1, -12, -12, 12, 1, 6, 1, 1362, 2, 8, -12, 22, 1, 1, 1, 3838, 1, -4, 10, 5458, 254, 18, 1, 5, -10, -12, -348, 12250
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2019

Keywords

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = A033879(A048675(n)).
a(n) = 2*A048675(n) - A324573(n).
a(A007947(n)) = A324574(n).
a(p) = 1 for all primes p.

A325970 a(n) is the largest k <= A066503(n) such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.

Original entry on oeis.org

0, 0, -1, 2, -1, -1, -1, 6, 6, -1, -1, 5, -1, -1, -1, 14, -1, 11, -1, 9, -1, -1, -1, 17, 20, -1, 23, 1, -1, -1, -1, 30, -1, -1, -1, 30, -1, -1, -1, 29, -1, -1, -1, 21, 29, -1, -1, 41, 42, 40, -1, 25, -1, 47, -1, 41, -1, -1, -1, 29, -1, -1, 41, 62, -1, -1, -1, 33, -1, -1, -1, 65, -1, -1, 59, 37, -1, -1, -1, 69, 78
Offset: 1

Views

Author

Antti Karttunen, May 31 2019

Keywords

Comments

a(n) = n-k for the least k >= A007947(n) such that n-k and n-(sigma(n)-k) are relatively prime.

Crossrefs

Programs

  • PARI
    A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
    A325970(n) = { my(s=sigma(n)); forstep(k=n-A007947(n), -oo, -1, if(1==gcd(k, n+n-sigma(n)), return(k))); };
    \\ Or alternatively:
    A325970(n) = { my(s=sigma(n)); for(i=A007947(n), s, if(1==gcd(n-i, n-(s-i)), return(n-i))); };

Formula

a(n) = n - A325971(n).
For n >= 3, a(A005117(n)) = -1.

A378600 Signed variant of Zumkeller deficiency: a(n) = signum(A033879(n)) * A103977(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, 0, 12, 4, 6, 1, 16, -1, 18, 0, 10, 8, 22, 0, 19, 10, 14, 0, 28, 0, 30, 1, 18, 14, 22, -1, 36, 16, 22, 0, 40, 0, 42, 4, 12, 20, 46, 0, 41, 7, 30, 6, 52, 0, 38, 0, 34, 26, 58, 0, 60, 28, 22, 1, 46, 0, 66, 10, 42, 0, 70, -1, 72, 34, 26, 12, 58, 0, 78, 0, 41, 38, 82, 0, 62, 40, 54, 0, 88, 0, 70
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2024

Keywords

Comments

If n is abundant, then negate the value of A103977(n), otherwise use as it is.

Crossrefs

Cf. A005100 (positions of terms > 0), A083207 (positions of 0's), A083211 (positions of negative terms), A156903 (positions of odd negative terms), A171641 (of even negative terms).

Programs

  • PARI
    A033879(n) = (n+n-sigma(n));
    nonzerocoefpositions(p) = { my(v=Vec(p), lista=List([])); for(i=1,#v,if(v[i], listput(lista,i))); Vec(lista); };
    A103977(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); my(plist=nonzerocoefpositions(p), m = #plist, d); if(!(m%2), plist[1+(m/2)]-plist[m/2], d = plist[(m+1)/2]-plist[(m-1)/2]; if(1==d,0,d)); };
    A378600(n) = { my(d=A033879(n)); if(d>=0, d, -A103977(n)); };

Formula

If A033879(n) >= 0, a(n) = A033879(n), otherwise a(n) = -A103977(n).

A318442 a(n) = Sum_{d|n} [moebius(n/d) < 0]*A033879(d).

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 1, 2, 5, 1, 1, 1, 7, 6, 1, 1, 5, 1, 3, 8, 11, 1, -3, 4, 13, 5, 5, 1, 9, 1, 1, 12, 17, 10, -7, 1, 19, 14, -1, 1, 15, 1, 9, 11, 23, 1, -11, 6, 21, 18, 11, 1, 11, 14, 1, 20, 29, 1, -17, 1, 31, 15, 1, 16, 27, 1, 15, 24, 29, 1, -31, 1, 37, 25, 17, 16, 33, 1, -9, 14, 41, 1, -15, 20, 43, 30, 5, 1, -1, 18, 21, 32, 47, 22, -27, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Programs

  • PARI
    A318442(n) = sumdiv(n,d,(-1==moebius(n/d))*(d+d-sigma(d)));

Formula

a(n) = Sum_{d|n} [A008683(n/d) == 1]*A033879(d).
a(n) = A318320(n) - A318326(n).
A083254(n) = A318441(n) - a(n).

A323892 Lexicographically earliest sequence such that a(i) = a(j) => A002487(i) = A002487(j) and A033879(i) = A033879(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 5, 1, 6, 7, 8, 9, 10, 3, 11, 1, 12, 13, 14, 15, 16, 17, 18, 19, 20, 8, 21, 22, 23, 24, 25, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 35, 47, 48, 49, 50, 51, 52, 53, 54, 55, 1, 56, 57, 58, 8, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 47, 72, 73, 74, 75, 76, 77, 78, 79, 80, 31, 81
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A002487(n), A033879(n)].

Crossrefs

Cf. also A318310, A323889.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A033879(n) = (2*n-sigma(n));
    A323892aux(n) = [A002487(n), A033879(n)];
    v323892 = rgs_transform(vector(up_to,n,A323892aux(n)));
    A323892(n) = v323892[n];

Formula

a(2^n) = 1 for all n >= 0.

A324654 a(n) = A033879(A276086(n)).

Original entry on oeis.org

1, 1, 2, 0, 5, -3, 4, 2, 6, -12, 12, -54, 19, 7, 26, -72, 47, -309, 94, 32, 126, -372, 222, -1584, 469, 157, 626, -1872, 1097, -7959, 6, 4, 10, -12, 22, -60, 22, -4, 18, -156, 6, -612, 102, -44, 58, -876, -74, -3372, 502, -244, 258, -4476, -474, -17172, 2502, -1244, 1258, -22476, -2474, -86172, 41, 25, 66, -96, 141, -459, 148, -46, 102
Offset: 0

Views

Author

Antti Karttunen, Mar 10 2019

Keywords

Comments

Interestingly, this kind of sampling of deficiency (A033879; recall that the range of A276086 does not cover the whole N) biases it strongly towards negative values: of the first 2310 terms, 1565 are negative (~ 68%) and of the first 30030 terms, 22507 are negative (~ 75%). Compare also to A323174, which covers whole N.

Crossrefs

Programs

  • PARI
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A033879(n) = (2*n-sigma(n));
    A324654(n) = A033879(A276086(n));

Formula

a(n) = A033879(A276086(n)).
a(n) = 2*A276086(n) - A324653(n).
Previous Showing 11-20 of 185 results. Next