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

A297159 a(n) = 3*n - 2*phi(n) - sigma(n); Difference between the deficiency of n and its Moebius-transform.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 0, 1, 6, 5, 1, 1, 3, 1, 2, 7, 10, 1, -4, 4, 12, 5, 4, 1, 2, 1, 1, 11, 16, 9, -7, 1, 18, 13, -2, 1, 6, 1, 8, 9, 22, 1, -12, 6, 17, 17, 10, 1, 6, 13, 0, 19, 28, 1, -20, 1, 30, 13, 1, 15, 14, 1, 14, 23, 18, 1, -27, 1, 36, 21, 16, 15, 18, 1, -10, 14, 40, 1, -20, 19, 42, 29, 4, 1, -12, 17, 20, 31, 46, 21, -28, 1, 39, 21, 3, 1, 26
Offset: 1

Views

Author

Antti Karttunen, Mar 02 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 3*n - 2*EulerPhi[n] - DivisorSigma[1, n]; Array[a, 100] (* Amiram Eldar, Dec 04 2023 *)
  • PARI
    A297159(n) = (3*n - 2*eulerphi(n) - sigma(n));
    
  • PARI
    A297159(n) = -sumdiv(n,d,(d
    				
  • Python
    from sympy import totient, divisor_sigma
    def a(n): return 3*n-2*totient(n)-divisor_sigma(n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Mar 02 2018

Formula

a(n) = A033879(n) - A083254(n) = 3*n - 2*A000010(n) - A000203(n).
a(n) = -Sum_{d|n, dA008683(n/d)*A033879(d).
Sum_{k=1..n} a(k) = (3/2 - 6/Pi^2 - Pi^2/12) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 04 2023

A278373 Numbers of the form sigma(k) + phi(k) - 2k.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 25, 26, 28, 29, 30, 31, 32, 34, 36, 37, 38, 40, 41, 42, 44, 46, 48, 49, 50, 52, 54, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 68, 70, 72, 73, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 100, 102, 104, 106, 108, 109, 110, 111, 112, 114
Offset: 1

Views

Author

David W. Wilson, Nov 19 2016

Keywords

Comments

Empirically, every integer n >= 18 is of the form n = p+q+r for distinct primes p,q,r. If true, then every even number e >= 36 is this sequence, since e = 2(p+q+r) = sigma(pqr) + phi(pqr) - 2pqr, which implies all even e >= 0 are in this sequence.

Crossrefs

Smallest k with sigma(k) + phi(k) - 2k = a(n) is A278374(n).
Complement is A056996.
Sequence A051709 sorted into ascending order, with duplicates removed.- Antti Karttunen, Dec 09 2016
Cf. A000010 (phi), A000203 (sigma).

Programs

  • Mathematica
    Take[#, 85] &@ Union@ Table[DivisorSigma[1, n] + EulerPhi@ n - 2 n, {n, 10^4}] (* Michael De Vlieger, Nov 30 2016 *)

A345051 Numbers k such that A345048(k) is equal to A345049(k).

Original entry on oeis.org

2, 6, 9, 15, 28, 496, 625, 1225, 3993, 8128, 117649, 218491, 857375, 3788435, 4259571, 33550336, 69302975, 136410197, 200533921, 313742585, 603439225, 1516358753, 2563893625, 3326174929, 5655792025, 8589869056, 10214476341
Offset: 1

Views

Author

Antti Karttunen, Jun 06 2021

Keywords

Comments

Numbers k for which A342001(n) * A051709(n) = A173557(n) * A345001(n).
Conjecture: Sequence is a disjoint union of A000396 and A166374, i.e., there are no terms of any other kind.

Crossrefs

Positions of zeros in A345050.
Cf. A000396, A166374 (subsequences).
Cf. also A345003.

Programs

Extensions

a(21)-a(27) from Amiram Eldar, Dec 08 2023

A072780 a(n) = sigma_2(n) + phi(n) * sigma(n) - 2*n^2, which is A072779(n) - 2*n^2.

Original entry on oeis.org

0, 0, 0, 3, 0, 2, 0, 17, 7, 2, 0, 34, 0, 2, 2, 77, 0, 41, 0, 82, 2, 2, 0, 178, 21, 2, 82, 154, 0, 76, 0, 325, 2, 2, 2, 411, 0, 2, 2, 450, 0, 124, 0, 370, 188, 2, 0, 786, 43, 115, 2, 514, 0, 428, 2, 858, 2, 2, 0, 948, 0, 2, 356, 1333, 2, 268, 0, 874, 2, 156, 0, 2047, 0, 2, 220
Offset: 1

Views

Author

T. D. Noe, Jul 15 2002

Keywords

Comments

This sequence is interesting because (1) a(n) >= 0, with equality only when n is prime (or 1) and (2) a(n) = 2 if and only if n is the product of two distinct primes. Note for twin primes: let n = m^2 - 1, then m-1 and m+1 are twin primes if and only if a(n) = 2. Note for the Goldbach conjecture: let n = m^2 - r^2, then m-r and m+r are primes that add to 2m if and only if a(n) = 2.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[2, n]+EulerPhi[n]DivisorSigma[1, n]-2n^2, {n, 100}]
  • PARI
    a(n)=sigma(n,2)+eulerphi(n)*sigma(n)-2*n^2 \\ Charles R Greathouse IV, May 15 2013

Formula

Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = zeta(3) + Product_{p prime} (1 - 1/(p^2*(p+1))) - 2 = A002117 + A065465 - 2 = 0.083570742884... . - Amiram Eldar, Dec 03 2023

A228498 a(n) = sigma(n^2) + phi(n^2) - 2n^2.

Original entry on oeis.org

0, 1, 1, 7, 1, 31, 1, 31, 13, 57, 1, 163, 1, 91, 73, 127, 1, 307, 1, 321, 111, 183, 1, 691, 31, 241, 121, 535, 1, 1261, 1, 511, 211, 381, 157, 1591, 1, 463, 273, 1377, 1, 2163, 1, 1131, 781, 651, 1, 2803, 57, 1467, 421, 1513, 1, 2791, 273, 2311, 507, 993, 1, 6253, 1, 1123, 1227, 2047, 343, 4711, 1, 2445, 703
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 23 2013

Keywords

Comments

If n is a prime, p, then a(p) = 1. Proof: a(p) = sigma(p^2) + phi(p^2) - 2p^2 = p^2 + p + 1 + p^2*( 1-(1/p) ) - 2p^2 = p^2 + p + 1 + p^2 - p - 2p^2 = 1.

Examples

			a(6) = 31; sigma(6^2) + phi(6^2) - 2*6^2 = 91 + 12 - 72 = 31.
		

Crossrefs

Cf. A051709 (sequence at n instead of n^2).

Programs

  • Maple
    with(numtheory); seq(sigma(k^2) + phi(k^2) - 2*k^2, k=1..20);
  • Mathematica
    Table[DivisorSigma[1, n^2] + EulerPhi[n^2] - 2*n^2, {n, 100}]
  • PARI
    vector(100, n, sigma(n^2)+eulerphi(n^2)-2*n^2) \\ Altug Alkan, Oct 28 2015

Formula

a(n) = A051709(n^2).
a(n) = A000203(n^2) + A000010(n^2) - 2*n^2.
a(n) = A065764(n) + A002618(n) - A001105(n).
Sum_{k=1..n} a(k) ~ ((5*zeta(3) + 2)/ Pi^2 - 2/3) * n^3. - Amiram Eldar, Dec 03 2023

Extensions

More terms from Antti Karttunen, Oct 30 2017

A324048 a(n) = A000203(n) - A083254(n) = n + sigma(n) - 2*phi(n).

Original entry on oeis.org

0, 3, 3, 7, 3, 14, 3, 15, 10, 20, 3, 32, 3, 26, 23, 31, 3, 45, 3, 46, 29, 38, 3, 68, 16, 44, 31, 60, 3, 86, 3, 63, 41, 56, 35, 103, 3, 62, 47, 98, 3, 114, 3, 88, 75, 74, 3, 140, 22, 103, 59, 102, 3, 138, 47, 128, 65, 92, 3, 196, 3, 98, 95, 127, 53, 170, 3, 130, 77, 166, 3, 219, 3, 116, 119, 144, 53, 198, 3, 202, 94, 128, 3
Offset: 1

Views

Author

Antti Karttunen, Feb 13 2019

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n + DivisorSigma[1, n] - 2 * EulerPhi[n]; Array[a, 100] (* Amiram Eldar, Dec 04 2023 *)
  • PARI
    A083254(n) = (2*eulerphi(n)-n);
    A324048(n) = (sigma(n) - A083254(n));
    
  • PARI
    a(n) = {my(f = factor(n)); n + sigma(f) - 2*eulerphi(f);} \\ Amiram Eldar, Dec 04 2023

Formula

a(n) = A000203(n) - A083254(n) = n + A000203(n) - 2*A000010(n).
a(n) = A051612(n) + A051953(n).
a(n) = A297159(n) + 2*A001065(n).
Sum_{k=1..n} a(k) = (Pi^2/12 - 6/Pi^2 + 1/2) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 04 2023
Previous Showing 11-16 of 16 results.