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.

A291784 a(n) = (psi(n) + phi(n))/2.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 11, 14, 13, 15, 16, 16, 17, 21, 19, 22, 22, 23, 23, 28, 25, 27, 27, 30, 29, 40, 31, 32, 34, 35, 36, 42, 37, 39, 40, 44, 41, 54, 43, 46, 48, 47, 47, 56, 49, 55, 52, 54, 53, 63, 56, 60, 58
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2017

Keywords

Comments

This is (A001615 + A000010)/2. It is easy to see that this is always an integer.
If n is a power of a prime (including 1 and primes), then a(n) = n, and in any other case a(n) > n. - M. F. Hasler, Sep 09 2017
If n is in A006881, then a(n)=n+1. - Robert Israel, Feb 10 2019

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41 (page 96 of 2nd ed., pages 147ff of 3rd ed.).

Crossrefs

Programs

  • Maple
    f:= proc(n) local P, p;
      P:= numtheory:-factorset(n);
      n*(mul((p-1)/p, p=P) + mul((p+1)/p, p=P))/2
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 10 2019
  • Mathematica
    psi[n_] := If[n == 1, 1, n*Times @@ (1 + 1/FactorInteger[n][[All, 1]])];
    a[n_] := (psi[n] + EulerPhi[n])/2;
    Array[a, 100] (* Jean-François Alcover, Feb 25 2019 *)
  • PARI
    A291784(n)=(eulerphi(n)+n*sumdivmult(n,d,issquarefree(d)/d))\2 \\ M. F. Hasler, Sep 03 2017

Formula

Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = 21/(4*Pi^2) = 0.531936... . - Amiram Eldar, Dec 05 2023

A291790 Numbers whose trajectory under iteration of the map k -> (sigma(k)+phi(k))/2 consists only of integers and is unbounded.

Original entry on oeis.org

270, 290, 308, 326, 327, 328, 352, 369, 393, 394, 395, 396, 410, 440, 458, 459, 465, 496, 504, 510, 525, 559, 560, 570, 606, 616, 620, 685, 686, 702, 712, 725, 734, 735, 737, 738, 745, 746, 747, 783, 791, 792, 805, 806, 813, 814, 815, 816, 828
Offset: 1

Views

Author

N. J. A. Sloane, Sep 03 2017

Keywords

Comments

It would be nice to have a proof that these trajectories are integral and unbounded, or, of course, that they eventually reach a fractional value (and die), or reach a prime (which is then a fixed point). (Cf. A291787.) If either of the last two things happen, then that value of n will be removed from the sequence. AT PRESENT ALL TERMS ARE CONJECTURAL.
When this sequence was submitted, there was a hope that it would be possible to prove that these trajectories were indeed integral and unbounded. This has not yet happened, although see the remarks of Andrew R. Booker in A292108. - N. J. A. Sloane, Sep 25 2017

Crossrefs

Cf. A000010, A000203, A289997, A290001, A291789 (the trajectory of 270), A291787, A292108.
For the "seeds" see A292766.

Extensions

More terms from Hugo Pfoertner, Sep 03 2017

A291789 Trajectory of 270 under repeated application of k -> (phi(k)+sigma(k))/2.

Original entry on oeis.org

270, 396, 606, 712, 851, 852, 1148, 1416, 2032, 2488, 2960, 4110, 5512, 6918, 8076, 10780, 16044, 23784, 33720, 55240, 73230, 97672, 118470, 169840, 247224, 350260, 442848, 728448, 1213440, 2124864, 4080384, 8159616, 13515078, 15767596, 18626016, 29239504, 39012864, 62623600, 92580308
Offset: 0

Views

Author

N. J. A. Sloane, Sep 03 2017

Keywords

Comments

The ultimate fate of this trajectory is presently unknown. It may reach a fractional value (when it dies), it may reach a prime (which would be a fixed point), it may enter a cycle of length greater than 1, or it may be unbounded. - Hugo Pfoertner and N. J. A. Sloane, Sep 18 2017

Crossrefs

See A291914 and A292108 for the "big picture".

Programs

  • Maple
    orbit:= proc(n, m) uses numtheory;
      local V,k;
      V:= Vector(m);
      V[1]:= n;
      for k from 2 to m do V[k]:= (sigma(V[k-1])+ phi(V[k-1]))/2 od:
      convert(V,list)
    end proc:
    orbit(270, 200); # Robert Israel, Sep 07 2017
  • Mathematica
    NestWhileList[If[! IntegerQ@ #, -1/2, (DivisorSigma[1, #] + EulerPhi@ #)/2] &, 270, Nor[! IntegerQ@ #, SameQ@ ##] &, 2, 38] (* Michael De Vlieger, Sep 19 2017 *)

A292108 Iterate the map k -> (sigma(k) + phi(k))/2 starting at n; a(n) is the number of steps to reach either a fixed point or a fraction, or a(n) = -1 if neither of these two events occurs.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 3, 2, 1, 0, 1, 0, 2, 2, 1, 0, 4, 1, 2, 1, 4, 0, 2, 0, 1, 4, 3, 2, 1, 0, 3, 2, 1, 0, 9, 0, 2, 3, 1, 0, 7, 1, 1, 2, 1, 0, 8, 3, 2, 2, 1, 0, 3, 0, 8, 7, 1, 3, 2, 0, 1, 7, 6, 0, 1, 0, 3, 2, 4
Offset: 1

Views

Author

Hugo Pfoertner and N. J. A. Sloane, Sep 18 2017

Keywords

Comments

The first unknown value is a(270).
For an alternative version of this sequence, see A291914.
From Andrew R. Booker, Sep 19 2017 and Oct 03 2017: (Start)
Let f(n) = (sigma(n) + phi(n))/2. Then f(n) >= n, so the trajectory of n under f either terminates with a half-integer, reaches a fixed point, or increases monotonically. The fixed points of f are 1 and the prime numbers, and f(n) is fractional iff n>2 is a square or twice a square.
It seems likely that a(n) = -1 for all but o(x) numbers n <= x. See link for details of the argument. (End)

Examples

			Let f(k) = (sigma(k) + phi(k))/2. Under the action of f:
14 -> 15 -> 16 -> 39/2, taking 3 steps, so a(14) = 3.
21 -> 22 -> 23, a prime, in 2 steps, so a(21) = 2.
		

Crossrefs

Programs

  • Mathematica
    With[{i = 200}, Table[-1 + Length@ NestWhileList[If[! IntegerQ@ #, -1/2, (DivisorSigma[1, #] + EulerPhi@ #)/2] &, n, Nor[! IntegerQ@ #, SameQ@ ##] &, 2, i, -1] /. k_ /; k >= i - 1 -> -1, {n, 76}]] (* Michael De Vlieger, Sep 19 2017 *)

Formula

a(n) = 0 if n is 1 or a prime (these are fixed points).
a(n) = 1 if n>2 is a square or twice a square, since these reach a fraction in one step.

A291785 Iterate the map A291784: k -> (psi(k)+phi(k))/2, starting with n, until a power of a prime (A000961) is reached, or -1 if that never happens.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 11, 16, 13, 16, 16, 16, 17, 23, 19, 23, 23, 23, 23, 47, 25, 27, 27, 47, 29, 47, 31, 32, 83, 83, 83, 83, 37, 47, 47, 47, 41, 83, 43, 47, -1, 47, 47, -1, 49, -1, 83, 83, 53, 83, -1, -1, 59, 59, 59, -1, 61, 83, 83, 64, 83, 83, 67, -1, -1, -1, 71, -1, 73
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2017

Keywords

Comments

Primes and prime powers are fixed points under the map f(k) = (psi(k)+phi(k))/2. (If n = p^k, then psi(n) = p^k(1+1/p), phi(n) = p^k(1-1/p), and their average is p^k, so n is a fixed point under the map.)
Since f(n)>n if n is not a prime power, there can be no nontrivial cycles.
Wall (1985) observes that the trajectories of 45 and 50 are unbounded, so a(45) = a(50) = -1.
Also 48 and many more terms seem to have unbounded trajectories. - Hugo Pfoertner, Sep 03 2017.
Obviously any number in the trajectory of a number with unbounded trajectory (in particular that of 45, A291787) again has this property. A291788 is the union of all these. - M. F. Hasler, Sep 03 2017

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 147.

Crossrefs

Programs

  • PARI
    A291785(n,L=n)={for(i=0,L,isprimepower(n=A291784(n))&&return(n));(-1)^(n>1)} \\ The search limit L=n is only experimental but appears quite conservative w.r.t. known data, cf. A291786. The algorithm assumes that there are no cycles except for the powers of primes. - M. F. Hasler, Sep 03 2017

Extensions

More terms from Hugo Pfoertner, Sep 03 2017

A291786 a(n) = number of iterations of k -> (psi(k)+phi(k))/2 (A291784) needed to reach a prime or a power of a prime or 1, or -1 if that doesn't happen.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0, 2, 1, 0, 0, 3, 0, 2, 2, 1, 0, 6, 0, 1, 0, 5, 0, 4, 0, 0, 9, 8, 7, 6, 0, 5, 4, 3, 0, 5, 0, 2, -1, 1, 0, -1, 0, -1, 6, 5, 0, 4, -1, -1, 2, 1, 0, -1, 0, 4, 3, 0, 3, 2, 0, -1, -1, -1, 0, -1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2017

Keywords

Comments

Primes and prime powers are fixed points under the map f(k) = (psi(k)+phi(k))/2, so in that case we take a(n)=0. (If n = p^k, then psi(n) = p^k(1+1/p), phi(n) = p^k(1-1/p), and their average is p^k, so n is a fixed point under the map.)
Since f(n)>n if n is not a prime power, there can be no nontrivial cycles.
Wall (1985) observes that the trajectories of 45 and 50 are unbounded, so a(45) = a(50) = -1. See A291787, A291788.

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 147.

Crossrefs

Programs

  • PARI
    A291786(n,L=n)=n>1&&for(i=0,L,isprimepower(n)&&return(i);n=A291784(n));-(n>1) \\ The suggested search limit L=n is only empirical and might require revision. The code also currently assumes that the prime powers are the only cycles. - M. F. Hasler, Sep 03 2017

Formula

a(n) = 0 iff n is in A000961. - M. F. Hasler, Sep 03 2017

Extensions

Initial terms corrected and more terms from M. F. Hasler, Sep 03 2017

A291788 Numbers n whose trajectory under the map k -> (psi(k)+phi(k))/2 (A291784) grows without limit.

Original entry on oeis.org

45, 48, 50, 55, 56, 60, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 102, 104, 105, 108, 111, 112, 115, 116, 117, 118, 119, 120, 122, 123, 124, 126, 133, 134, 135, 136, 140, 141, 142, 143, 144, 145, 146, 147, 152
Offset: 1

Views

Author

N. J. A. Sloane, Sep 03 2017, based on data supplied by Hans Havermann

Keywords

Comments

See A291787 (where A291787(m) = 2*A291787(m-7) for m >= 35) for the trajectory of 45.
There is a similar proof that all the terms from 48 though 152 have a trajectory that merges with the trajectory of 45, and so doubles every 7 steps after a certain point. For example, the trajectory of 152 reaches 2^106*33 at step 390, is 2^107*33 at step 397, and thereafter doubles every 7 steps.- N. J. A. Sloane, Sep 24 2017

Crossrefs

Extensions

Terms 104 to 152 added by N. J. A. Sloane, Sep 24 2017
Showing 1-7 of 7 results.