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

A326140 a(n) = gcd(A318878(n), A318879(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 09 2019

Keywords

Crossrefs

Programs

  • PARI
    A326140(n) = { my(t=0, u=0); fordiv(n,d, d -= 2*eulerphi(d); if(d<0, t -= d, u += d)); gcd(t,u); };
    
  • PARI
    A318878(n) = sumdiv(n,d,d=(2*eulerphi(d))-d; (d>0)*d);
    A318879(n) = sumdiv(n,d,d=d-(2*eulerphi(d)); (d>0)*d);
    A326140(n) = gcd(A318878(n), A318879(n));

A326141 Odd numbers n for which A318879(n) is not zero and A318879(n) divides A318878(n); odd numbers such that A326140(n) = A318879(n).

Original entry on oeis.org

105, 195, 4785, 22515, 56865, 228285, 237315, 484245, 671853, 1838145, 1946955, 3446895, 4522695, 12955245, 37730865, 52475055, 53568885, 87612975
Offset: 1

Views

Author

Antti Karttunen, Jun 09 2019

Keywords

Comments

Not a subsequence of A036798, even though many terms are members.
Questions: Are all terms multiples of three? Multiples of 3^(2k+1) but not of 3^(2k)? Are any of the terms included in A228058, A326137?

Crossrefs

Programs

  • PARI
    isA326141(n) = if(!(n%2),0, my(t=0, u=0); fordiv(n,d, d -= 2*eulerphi(d); if(d<0, t -= d, u += d)); (gcd(t,u)==u));

A033879 Deficiency of n, or 2n - (sum of divisors of n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, -4, 12, 4, 6, 1, 16, -3, 18, -2, 10, 8, 22, -12, 19, 10, 14, 0, 28, -12, 30, 1, 18, 14, 22, -19, 36, 16, 22, -10, 40, -12, 42, 4, 12, 20, 46, -28, 41, 7, 30, 6, 52, -12, 38, -8, 34, 26, 58, -48, 60, 28, 22, 1, 46, -12, 66, 10, 42, -4, 70, -51
Offset: 1

Views

Author

Keywords

Comments

Records for the sequence of the absolute values are in A075728 and the indices of these records in A074918. - R. J. Mathar, Mar 02 2007
a(n) = 1 iff n is a power of 2. a(n) = n - 1 iff n is prime. - Omar E. Pol, Jan 30 2014
If a(n) = 1 then n is called a least deficient number or an almost perfect number. All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2. See A000079. - Jianing Song, Oct 13 2019
It is not known whether there are any -1's in this sequence. See comment in A033880. - Antti Karttunen, Feb 02 2020

Examples

			For n = 10 the divisors of 10 are 1, 2, 5, 10, so the deficiency of 10 is 10 minus the sum of its proper divisors or simply 10 - 5 - 2 - 1 = 2. - _Omar E. Pol_, Dec 27 2013
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 147.

Crossrefs

Cf. A000396 (positions of zeros), A005100 (of positive terms), A005101 (of negative terms).
Cf. A141545 (positions of a(n) = -12).
For this sequence applied to various permutations of natural numbers and some other sequences, see A323174, A323244, A324055, A324185, A324546, A324574, A324575, A324654, A325379.

Programs

Formula

a(n) = -A033880(n).
a(n) = A005843(n) - A000203(n). - Omar E. Pol, Dec 14 2008
a(n) = n - A001065(n). - Omar E. Pol, Dec 27 2013
G.f.: 2*x/(1 - x)^2 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 24 2017
a(n) = A286385(n) - A252748(n). - Antti Karttunen, May 13 2017
From Antti Karttunen, Dec 29 2017: (Start)
a(n) = Sum_{d|n} A083254(d).
a(n) = Sum_{d|n} A008683(n/d)*A296075(d).
a(n) = A065620(A295881(n)) = A117966(A295882(n)).
a(n) = A294898(n) + A000120(n).
(End)
From Antti Karttunen, Jun 03 2019: (Start)
Sequence can be represented in arbitrarily many ways as a difference of the form (n - f(n)) - (g(n) - n), where f and g are any two sequences whose sum f(n)+g(n) = sigma(n). Here are few examples:
a(n) = A325314(n) - A325313(n) = A325814(n) - A034460(n) = A325978(n) - A325977(n).
a(n) = A325976(n) - A325826(n) = A325959(n) - A325969(n) = A003958(n) - A324044(n).
a(n) = A326049(n) - A326050(n) = A326055(n) - A326054(n) = A326044(n) - A326045(n).
a(n) = A326058(n) - A326059(n) = A326068(n) - A326067(n).
a(n) = A326128(n) - A326127(n) = A066503(n) - A326143(n).
a(n) = A318878(n) - A318879(n).
a(A228058(n)) = A325379(n). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - Pi^2/12 = 0.177532... . - Amiram Eldar, Dec 07 2023

Extensions

Definition corrected by N. J. A. Sloane, Jul 04 2005

A318878 Sum of A083254(d) for all such divisors d of n for which A083254(d) > 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 05 2018

Keywords

Examples

			n = 105 has divisors [1, 3, 5, 7, 15, 21, 35, 105]. When A083254 is applied to them, we obtain [1, 1, 3, 5, 1, 3, 13, -9]. Summing the positive numbers present, we get a(105) = 1+1+3+5+1+3+13 = 27.
		

Crossrefs

Programs

  • PARI
    A318878(n) = sumdiv(n,d,d=(2*eulerphi(d))-d; (d>0)*d);

Formula

a(n) = Sum_{d|n} [A083254(d) > 0]*A083254(d), where A083254(n) = 2*phi(n) - n, and [ ] are the Iverson brackets.
a(n) = A318879(n) + A033879(n).

A329639 Sum of -A329644(d) for all such divisors d of n for which A329644(d) < 0. Here A329644 is the Möbius transform of A323244, the deficiency of A156552(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 5, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 5, 0, 0, 14, 0, 0, 5, 0, 0, 1, 0, 0, 0, 13, 5, 0, 0, 0, 1, 21, 0, 14, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0, 5, 0, 12, 14, 0, 0, 17, 0, 0, 26, 74, 0, 350, 40, 0, 14, 53, 0, 0, 0, 70, 0, 0, 13, 18, 7, 0, 0, 0, 0, 15
Offset: 1

Views

Author

Antti Karttunen, Nov 21 2019

Keywords

Crossrefs

Programs

Formula

a(n) = -Sum_{d|n} [A329644(d) < 0] * A329644(d), where [ ] is Iverson bracket.
a(n) = A329638(n) - A323244(n).

A318875 Number of divisors d of n for which 2*phi(d) < d.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 3, 0, 0, 0, 1, 0, 4, 0, 1, 0, 3, 0, 3, 0, 2, 0, 1, 0, 4, 0, 2, 0, 2, 0, 3, 0, 3, 0, 1, 0, 6, 0, 1, 0, 0, 0, 3, 0, 2, 0, 3, 0, 6, 0, 1, 0, 2, 0, 3, 0, 4, 0, 1, 0, 6, 0, 1, 0, 3, 0, 5, 0, 2, 0, 1, 0, 5, 0, 2, 0, 4, 0, 3, 0, 3, 1
Offset: 1

Views

Author

Antti Karttunen, Sep 05 2018

Keywords

Crossrefs

Programs

  • Maple
    A318875 := n -> nops(select(d -> (2*numtheory:-phi(d)) < d, divisors(n))):
    seq(A318875(n), n=1..199); # Peter Luschny, Sep 05 2018
  • Mathematica
    A318875[n_] := DivisorSum[n, 1 &, 2*EulerPhi[#] < # &];
    Array[A318875, 100] (* Paolo Xausa, Jul 08 2024 *)
  • PARI
    A318875(n) = sumdiv(n,d,(2*eulerphi(d))
    				

Formula

a(n) = Sum_{d|n} [A083254(d) < 0].
For all n >= 1, a(n) + A318874(n) + A007814(n) = A000005(n).

A318877 Sum of divisors d of n for which 2*phi(d) < d.

Original entry on oeis.org

0, 0, 0, 0, 0, 6, 0, 0, 0, 10, 0, 18, 0, 14, 0, 0, 0, 24, 0, 30, 0, 22, 0, 42, 0, 26, 0, 42, 0, 46, 0, 0, 0, 34, 0, 72, 0, 38, 0, 70, 0, 62, 0, 66, 0, 46, 0, 90, 0, 60, 0, 78, 0, 78, 0, 98, 0, 58, 0, 138, 0, 62, 0, 0, 0, 94, 0, 102, 0, 94, 0, 168, 0, 74, 0, 114, 0, 110, 0, 150, 0, 82, 0, 186, 0, 86, 0, 154, 0, 154, 0, 138, 0, 94, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 05 2018

Keywords

Crossrefs

Programs

  • Mathematica
    A318877[n_] := DivisorSum[n,  # &, 2*EulerPhi[#] < # &];
    Array[A318877, 100] (* Paolo Xausa, Jul 08 2024 *)
  • PARI
    A318877(n) = sumdiv(n,d,((2*eulerphi(d))
    				

Formula

a(n) = Sum_{d|n} [2*phi(d) < d]*d, where [ ] are the Iverson brackets.
For all n >= 1, a(n) + A318876(n) + 2*(A006519(n)-1) = A000203(n).
Showing 1-7 of 7 results.