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.

A278374 a(n) = smallest k with sigma(k) + phi(k) - 2k = A278373(n).

Original entry on oeis.org

1, 4, 6, 8, 27, 125, 16, 12, 18, 20, 28, 50, 63, 32, 44, 98, 52, 24, 68, 42, 242, 40, 70, 338, 54, 36, 56, 116, 78, 578, 165, 130, 722, 135, 48, 164, 114, 1058, 104, 188, 285, 138, 100, 80, 230, 1682, 136, 128, 60, 1922, 244, 152, 741, 112, 225, 351, 72, 284, 2738, 90, 84, 651, 222, 3362, 711, 332, 3698, 459, 196, 96, 162, 356
Offset: 1

Views

Author

David W. Wilson, Nov 19 2016

Keywords

Crossrefs

Cf. A000010 (phi), A000203 (sigma).

Programs

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

A051709 a(n) = sigma(n) + phi(n) - 2n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 3, 1, 2, 0, 8, 0, 2, 2, 7, 0, 9, 0, 10, 2, 2, 0, 20, 1, 2, 4, 12, 0, 20, 0, 15, 2, 2, 2, 31, 0, 2, 2, 26, 0, 24, 0, 16, 12, 2, 0, 44, 1, 13, 2, 18, 0, 30, 2, 32, 2, 2, 0, 64, 0, 2, 14, 31, 2, 32, 0, 22, 2, 28, 0, 75, 0, 2, 14, 24, 2, 36, 0
Offset: 1

Views

Author

Keywords

Comments

Sigma is the sum of divisors (A000203), and phi is the Euler totient function (A000010). - Michael B. Porter, Jul 05 2013
Because sigma and phi are multiplicative functions, it is easy to show that (1) if a(n)=0, then n is prime or 1 and (2) if a(n)=2, then n is the product of two distinct prime numbers. Note that a(n) is the n-th term of the Dirichlet series whose generating function is given below. Using the generating function, it is theoretically possible to compute a(n). Hence a(n)=0 could be used as a primality test and a(n)=2 could be used as a test for membership in P2 (A006881). - T. D. Noe, Aug 01 2002
It appears that a(n) - A002033(n) = zeta(s-1) * (zeta(s) - 2 + 1/zeta(s)) + 1/(zeta(s)-2). - Eric Desbiaux, Jul 04 2013
a(n) = 1 if and only if n = prime(k)^2 (n is in A001248). It seems that a(n) = k has only finitely many solutions for k >= 3. - Jianing Song, Jun 27 2021

Examples

			a(5) = sigma(5) + phi(5) - 2*5 = 6 + 4 - 10 = 0.
		

Crossrefs

Cf. A278373 (range of this sequence), A056996 (numbers not present).
Cf. also A344753, A345001 (analogous sequences).

Programs

  • Mathematica
    Table[DivisorSigma[1,n]+EulerPhi[n]-2n,{n,80}] (* Harvey P. Dale, Apr 08 2015 *)
  • PARI
    a(n)=sigma(n)+eulerphi(n)-2*n \\ Charles R Greathouse IV, Jul 05 2013
    
  • PARI
    A051709(n) = -sumdiv(n,d,(dAntti Karttunen, Mar 02 2018

Formula

Dirichlet g.f.: zeta(s-1) * (zeta(s) - 2 + 1/zeta(s)). - T. D. Noe, Aug 01 2002
From Antti Karttunen, Mar 02 2018: (Start)
a(n) = A001065(n) - A051953(n). [Difference between the sum of proper divisors of n and their Moebius-transform.]
a(n) = -Sum_{d|n, dA008683(n/d)*A001065(d). (End)
Sum_{k=1..n} a(k) = (3/(Pi^2) + Pi^2/12 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 03 2023

A056996 Positive integers not of the form sigma(k) + phi(k) - 2k for some k.

Original entry on oeis.org

5, 11, 19, 21, 23, 27, 33, 35, 39, 43, 45, 47, 51, 53, 55, 59, 67, 69, 71, 79, 81, 83, 87, 95, 99, 101, 103, 105, 107, 113, 115, 117, 119, 123, 129, 131, 135, 139, 141, 143, 147, 151, 153, 155, 159, 165, 167, 171, 173, 175, 177, 179, 185, 187, 189, 191, 193, 195
Offset: 1

Views

Author

David W. Wilson, Sep 06 2000

Keywords

Comments

Under the assumption that every even integer >= 18 is the sum of three distinct primes, all elements of this sequence are odd. See A278373 for more details.

Crossrefs

Complement is A278373.
Cf. A000010 (phi), A000203 (sigma).

Programs

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

A278922 Largest p such that n = p + q + r where p < q < r are all prime, or 0 if no such primes p, q, r exist.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 3, 2, 0, 2, 3, 2, 3, 2, 5, 2, 5, 2, 3, 2, 5, 2, 7, 2, 5, 2, 7, 2, 7, 2, 7, 2, 11, 2, 11, 2, 5, 2, 11, 2, 13, 2, 11, 2, 13, 2, 13, 2, 11, 2, 17, 2, 13, 2, 13, 2, 17, 2, 17, 2, 17, 2, 19, 2, 19, 2, 13, 2, 17, 2, 19, 2, 17, 2, 23, 2, 19, 2, 19, 2, 23, 2, 23, 2, 23, 2, 23, 2, 29, 2, 23, 2, 29, 2, 29, 2, 23, 2, 29, 2, 31, 2, 31, 2, 29, 2, 31, 2, 29, 2, 31, 2, 37
Offset: 1

Views

Author

M. F. Hasler, Dec 01 2016

Keywords

Comments

Empirically, a(n) >= 2 for all n >= 18. Since a(2n) = 2 unless it is zero, the terms with even indices are less interesting, and the terms with odd indices are listed in A278923.
For even n, the existence of the three primes reduces to a slightly strengthened* variant of Goldbach's conjecture. For odd n, is a slightly strengthened* variant of the weak (a.k.a. odd, or ternary) Goldbach conjecture, considered to be proved since 2013. (*) In both cases, the strengthening consists of requiring that the three primes must be distinct.
From Robert G. Wilson v, Dec 02 2016: (Start)
The first occurrence of the n-th prime: 10, 15, 23, 31, 41, 49, 59, 71, 83, 97, 109, 121, 131, 143, 159, 173, 187, 199, 211, 223, 235, 251, 269, 287, 301, 311, 319, 329, 349, 371, 395, 407, 425, 439, 457, 471, 487, 503, ..., .
Conjecture: primes appear in their natural order. (End)

Crossrefs

Cf. A278923.
Cf. A278373, complement of A056996.

Programs

  • Mathematica
    f[n_] := If[OddQ@n || n < 18, Block[{p = 0, q = 3, r = 5}, While[q < r, r = NextPrime@ q; While[r < n - q - 1, If[n < 2q + r && PrimeQ[n - r - q], p = Max[p, n - r - q]; Break[]]; r = NextPrime@ r]; q = NextPrime@ q]; p], 2]; Array[f, 121] (* Robert G. Wilson v, Dec 02 2016 *)
  • PARI
    a(n,p=if(bittest(n,0),n\3-1,3))=while(p=precprime(p-1),forprime(q=p+1,(n-p-1)\2,isprime(n-p-q)&&return(p)))

Formula

a(2n) = 2 (for n > 4), since one of the three primes must necessarily be even, and that can only be p = 2.
a(n) = 0 for n < 2 + 3 + 5 = 10, and for odd n < 3 + 5 + 7 = 15.

A278923 Largest p such that 2n-1 = p + q + r with three primes p < q < r, or 0 if no such primes exist.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 5, 5, 3, 5, 7, 5, 7, 7, 7, 11, 11, 5, 11, 13, 11, 13, 13, 11, 17, 13, 13, 17, 17, 17, 19, 19, 13, 17, 19, 17, 23, 19, 19, 23, 23, 23, 23, 29, 23, 29, 29, 23, 29, 31, 31, 29, 31, 29, 31, 37, 29, 37, 37, 31, 41, 37, 31, 41, 37, 41, 43, 41, 41, 43, 43, 41, 43, 43, 47, 47, 43, 41, 47, 43, 47, 53, 47, 47, 53, 53, 53, 53, 59, 47
Offset: 1

Views

Author

M. F. Hasler, Dec 01 2016

Keywords

Comments

Empirically, such primes always exist for n >= 10, i.e., 2n-1 >= 19, whence a(n) >= 3 for all n >= 10. Again empirically, a(n) ~ 2n/3 as n -> oo and a(n) is always close to 2n/3.
This is the bisection (every other term) of A278922, whose terms with even indices are all equal to 2 (or 0).

Crossrefs

Cf. A278922.
Cf. A278373, complement of A056996.

Programs

  • PARI
    a(n,p=(n=2*n-1)\3-1)=while(p=precprime(p-1),forprime(q=p+1,(n-p-1)\2,isprime(n-p-q)&&return(p)))
Showing 1-5 of 5 results.