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

A290001 Numbers k such that the iteration k -> (sigma(k)+phi(k))/2 terminates at a fraction later than at the first step.

Original entry on oeis.org

12, 14, 15, 20, 24, 28, 33, 34, 35, 42, 48, 54, 55, 56, 62, 63, 69, 70, 76, 77, 78, 84, 85, 86, 87, 88, 90, 93, 94, 95, 96, 99, 102, 104, 105, 108, 110, 111, 112, 118, 119, 120, 122, 123, 124, 125, 129, 130, 132, 141, 142, 143, 148, 150
Offset: 1

Views

Author

Hugo Pfoertner, Sep 03 2017

Keywords

Comments

Termination at the first step occurs if k>3 is a square or twice a square, i.e. if k is a term of A028982. So the sequence lists the numbers that end at a fraction but are not of one of these two forms.

Examples

			42 is in the sequence because the following iteration reaches an odd sigma(k):
   k        sigma(k)     phi(k)
   42          96          12  k->(sigma(k)+phi(k))/2, (96+12)/2=54
   54         120          18  k->(sigma(k)+phi(k))/2, (120+18)/2=69
   69          96          44  ...
   70         144          24  ...
   84         224          24
  124         224          60
  142         216          70
  143         168         120  k->(sigma(k)+phi(k))/2, (168+120)/2=144
  144         403          48  sigma(144) is odd, iteration terminates
		

Crossrefs

Extensions

b-file curtailed beyond last certain value, moved other values to a-file. - N. J. A. Sloane, Oct 01 2017

A289997 Numbers n whose trajectory under iteration of the map k -> (sigma(k)+phi(k))/2 never reaches a fraction (that is, either the trajectory reaches a prime, which is a fixed point, or diverges to infinity).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 13, 17, 19, 21, 22, 23, 26, 27, 29, 30, 31, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 51, 52, 53, 57, 58, 59, 60, 61, 65, 66, 67, 68, 71, 73, 74, 75, 79, 80, 82, 83, 89, 91, 92, 97, 101, 103, 106, 107, 109, 113, 114, 115, 116, 117, 126, 127, 131, 133, 134, 135, 136, 137
Offset: 1

Views

Author

Hugo Pfoertner, Sep 03 2017

Keywords

Comments

Suggested by N. J. A. Sloane in a post "Iterating some number-theoretic functions" to the Seqfan mailing list.
The iteration arrives at a fixed point when k becomes a prime P, because sigma(P)=P+1 and phi(P)=P-1, hence k -> k.
It would be nice to have an independent characterization of these numbers (not involving the map in the definition). - N. J. A. Sloane, Sep 03 2017
Conjecturally, all terms of A291790 are in the sequence, because their trajectories (see example in A291789 for starting value 270) grow indefinitely. - Hugo Pfoertner, Sep 04 2017

Examples

			126 is in the sequence, because the following iteration arrives at a fixed point:
    k        sigma(k)     phi(k)
   126         312          36  k->(sigma(k)+phi(k))/2, (312+36)/2=174
   174         360          56  k->(sigma(k)+phi(k))/2, (360+56)/2=208
   208         434          96
   265         324         208
   266         480         108
   294         684          84
   384        1020         128
   574        1008         240
   624        1736         192
   964        1694         480
  1087        1088        1086  k->(sigma(k)+phi(k))/2, (1088+1086)/2=1087
  1087        1088        1086  ... loop
		

Crossrefs

Complement of A291791.

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.

A291914 Termination behavior of the iteration k->(sigma(k)+phi(k))/2 when started at k=n.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Sep 05 2017

Keywords

Comments

The sequence tries to combine all possible cases, using the following definitions:
- a(n) = 0 if n>2 is a square or twice a square, i.e. if n is in A028982\{1,2};
- otherwise, a(n) = -1 if n is a prime P, because the trajectory immediately enters the loop of length 1 (sigma(P)+phi(P))/2=P (i.e. if n in A000040);
- otherwise, a(n) = number of steps (>1) to fracture, i.e. when sigma(k) becomes odd and the iteration dies (n in A290001);
- otherwise, a(n) = negative of number of steps to k becoming a prime at which point the trajectory has reached a fixed point and loops (n in A289997);
- otherwise a(n) = 200 if the trajectory has grown for at least 200 steps without fracturing or running into a loop (n in A291790).
This is somewhat unsatisfactory, since it "depends on an arbitrary but large parameter", namely 200. Once this sequence is better understood, the last clause can either be replaced by something like "a(n) = 9999999999999999 if the trajectory increases without limit" or simply omitted if it can be proved that case never happens. See A292108 for another version of this sequence. - N. J. A. Sloane, Sep 05 2017

Examples

			See examples in A289997 demonstrating a(126)=-11, and in A290001 demonstrating a(42)=9.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, Third Edition, Springer, New York, 2004. Section B41, Iterations of phi and sigma, p. 147.

Crossrefs

A291934 Largest k achievable by the iteration k->(sigma(k)+phi(k))/2 started at k=n, with termination when sigma(k) becomes odd.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 11, 16, 13, 16, 16, 16, 17, 18, 19, 25, 23, 23, 23, 36, 25, 29, 29, 36, 29, 53, 31, 32, 36, 36, 36, 36, 37, 53, 53, 53, 41, 144, 43, 61, 61, 47, 47, 144, 49, 50, 61, 61, 53, 144, 72, 72, 59, 59, 59, 107, 61, 144
Offset: 1

Views

Author

Hugo Pfoertner, Sep 06 2017

Keywords

Comments

See A291914 for types of termination. The first term with unknown conjecturally unbounded behavior is a(270). More values of n with this type of behavior are given in A291790.
All bounded terms of this sequence are either prime or in A028982.

Examples

			a(38)=53: Starting with k=38 produces the trajectory 38 -> 39 -> 50 -> 53 -> 53 ...
a(42)=144: See example in A290001.
		

Crossrefs

Programs

  • Mathematica
    With[{lim = 100}, TakeWhile[#, # > 0 &] &@ Table[Which[Length@ # < lim, Last@ #, SameQ @@ Take[#, -2], Last@ #, True, 0] &@ NestWhileList[(DivisorSigma[1, #] + EulerPhi[#])/2 &, n, EvenQ@ DivisorSigma[1, #] &, 1, lim], {n, 270}]] (* Michael De Vlieger, Sep 06 2017 *)

A292766 Numbers n whose trajectory under iteration of the map k -> (sigma(k)+phi(k))/2 consists only of integers and is unbounded, excluding numbers n whose trajectory merges with the trajectory of a smaller number.

Original entry on oeis.org

270, 440, 496, 702, 737, 813, 828, 897, 905, 1027, 1066, 1099, 1240, 1241, 1260, 1331, 1353, 1368, 1371, 1422, 1507, 1537, 1754, 1760, 1834, 1848, 2002, 2016, 2282
Offset: 1

Views

Author

N. J. A. Sloane, Sep 27 2017, based on emails from Sean A. Irvine, Sep 14 2017, who computed a(1)-a(9), and Hans Havermann, same date, who computed a(10)-a(29). Hugo Pfoertner also computed many of these terms

Keywords

Comments

These are the "seeds" in A291790, that is, every number which blows up under iteration of the map k -> (sigma(k)+phi(k))/2 belongs to one of these trajectories. AT PRESENT ALL TERMS ARE CONJECTURAL.
The trajectories of these numbers are pairwise disjoint for the first 400 steps.
This is unsatisfactory because it is possible that, at some later step, these trajectories may merge, reach a prime (a fixed point), or reach a fraction (and die). However, this seems unlikely on probabilistic grounds - see the remarks of Andrew R. Booker in A292108.
Normally such a sequence would not be included in the OEIS, but exceptions have been made for this and A291790 because a number of people have worked on them, and also in the hope that this will encourage resolution of some of the open questions.
Needs a b-file.

Crossrefs

A292770 If sigma(n)+phi(n) is even then a(n) = (sigma(n)+phi(n))/2 otherwise -1.

Original entry on oeis.org

1, 2, 3, -1, 5, 7, 7, -1, -1, 11, 11, 16, 13, 15, 16, -1, 17, -1, 19, 25, 22, 23, 23, 34, -1, 27, 29, 34, 29, 40, 31, -1, 34, 35, 36, -1, 37, 39, 40, 53, 41, 54, 43, 52, 51, 47, 47, 70, -1, -1, 52, 61, 53, 69, 56, 72, 58, 59, 59, 92, 61, 63, 70, -1, 66, 82, 67, 79, 70, 84, 71, -1, 73, 75, 82, 88, 78, 96
Offset: 1

Views

Author

N. J. A. Sloane, Sep 28 2017

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local v;
       v:= numtheory:-sigma(n)+numtheory:-phi(n);
       if v::even then v/2 else -1 fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 28 2017
  • Mathematica
    Table[If[EvenQ[DivisorSigma[1,n]+EulerPhi[n]],(DivisorSigma[1,n]+EulerPhi[n])/2,-1],{n,120}] (* Harvey P. Dale, Jun 19 2022 *)
  • PARI
    a(n) = {my(f = factor(n), s = sigma(f) + eulerphi(f)); if(s%2, -1, s/2);} \\ Amiram Eldar, Dec 06 2024

Formula

a(n) = -1 if and only if n is in A028982 \ {1, 2}. - Amiram Eldar, Dec 06 2024
Showing 1-8 of 8 results.