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

A001274 Numbers k such that phi(k) = phi(k+1).

Original entry on oeis.org

1, 3, 15, 104, 164, 194, 255, 495, 584, 975, 2204, 2625, 2834, 3255, 3705, 5186, 5187, 10604, 11715, 13365, 18315, 22935, 25545, 32864, 38804, 39524, 46215, 48704, 49215, 49335, 56864, 57584, 57645, 64004, 65535, 73124, 105524, 107864, 123824, 131144, 164175, 184635
Offset: 1

Views

Author

Keywords

Comments

Unlike totients, cototient(x + 1) = cototient(x) never holds (except 2 - phi(2) = 3 - phi(3) = 1) because cototient(x) is congruent to x modulo 2. - Labos Elemer, Aug 08 2001
Lal-Gillard and Firoozbakht ask whether there is another pair of consecutive integers in this sequence, apart from a(16) + 1 = a(17) = 5187, see link. - M. F. Hasler, Jan 05 2011
There are 5236 terms less than 10^12. - Jud McCranie, Feb 13 2012
Up to 10^13 there are 10755 terms, and no further consecutive pairs like (5186, 5187). - Giovanni Resta, Feb 27 2014
A051179(k) for k from 0 to 5 are in the sequence. No other members of A051179 are in the sequence, because phi(2^(2^k)-1) = Product_{j=1..k-1} phi(2^(2^j)+1) and phi(2^(2^5)+1) < 2^(2^5) so if k > 5, phi(2^(2^k)-1) < Product_{j=1..k-1} 2^(2^j) = 2^(2^k-1) = phi(2^(2^k)). - Robert Israel, Mar 31 2015
Number of terms < 10^k, k=1,2,3,...: 2, 3, 10, 17, 36, 68, 142, 306, 651, 1267, 2567, 5236, 10755, ..., . - Robert G. Wilson v, Apr 10 2019
Conjecture: Except for the first two terms, all terms are composite and congruent to either 2 or 3 (mod 6). - Robert G. Wilson v, Apr 10 2019
Paul Kinlaw has noticed that up to 10^13 the only counterexample to the above conjecture is a(7424) = 3044760173455. - Giovanni Resta, May 23 2019

Examples

			phi(3) = phi(4) = 2, so 3 is in the sequence.
phi(15) = phi(16) = 8, so 15 is in the sequence.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 15, pp 5, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems Number Theory, Sect. B36.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a001274 n = a001274_list !! (n-1)
    a001274_list = map (+ 1) $ elemIndices 0 $
                               zipWith (-) (tail a000010_list) a000010_list
    -- Reinhard Zumkeller, May 20 2014, Mar 31 2011
    
  • Magma
    [n: n in [1..3*10^5] | EulerPhi(n) eq EulerPhi(n+1)]; // Vincenzo Librandi, Apr 14 2015
  • Maple
    select(n -> numtheory:-phi(n) = numtheory:-phi(n+1), [$1..10^5]); # Robert Israel, Mar 31 2015
  • Mathematica
    Reap[For[n = 1; k = 2; f1 = 1, k <= 10^9, k++, f2 = EulerPhi[k]; If[f1 == f2, Print["a(", n, ") = ", k - 1]; Sow[k - 1]; n++]; f1 = f2]][[2, 1]] (* Jean-François Alcover, Mar 29 2011, revised Dec 26 2013 *)
    Flatten[Position[Partition[EulerPhi[Range[200000]],2,1],{x_,x_}]] (* Harvey P. Dale, Dec 27 2015 *)
    Select[Range[1000], EulerPhi[#] == EulerPhi[# + 1] &] (* Alonso del Arte, Oct 03 2014 *)
    SequencePosition[EulerPhi[Range[200000]],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 01 2018 *)
    k = 8; lst = {1, 3}; While[k < 200000, If[ !PrimeQ[k +1], ep = EulerPhi[k +1]; If[ EulerPhi[k] == ep, AppendTo[lst, k]]; If[ep == EulerPhi[k +2], AppendTo[lst, k +1]]]; k += 6]; lst (* Robert G. Wilson v, Apr 10 2019 *)
  • PARI
    is(n)=eulerphi(n)==eulerphi(n+1) \\ Charles R Greathouse IV, Feb 27 2014
    
  • PARI
    list(lim)=my(v=List(),old=1); forfactored(n=2,lim\1+1, my(new=eulerphi(n)); if(old==new, listput(v,n[1]-1)); old=new); Vec(v) \\ Charles R Greathouse IV, Jul 17 2022
    

Formula

Conjecture: a(n) ~ C*n^3*log(n), where C = 9/Pi^2 = 0.91189... - Thomas Ordowski, Oct 21 2014
Sum_{n>=1} 1/a(n) is in the interval (1.4324884, 7.8358) (Kinlaw et al., 2020; an upper bound 441702 was given by Bayless and Kinlaw, 2016). - Amiram Eldar, Oct 15 2020

Extensions

More terms from David W. Wilson

A003276 Numbers k such that the multiplicative group of residues prime to k, M_k, is isomorphic to M_{k+1}.

Original entry on oeis.org

1, 3, 15, 104, 495, 975, 22935, 32864, 57584, 131144, 491535, 2539004, 3988424, 6235215, 7378371, 13258575, 17949434, 25637744, 26879684, 29357475, 32235735, 41246864, 48615735, 184611375, 229944855, 257278724, 290849624, 429461864, 550666515, 671054835, 706075095
Offset: 1

Views

Author

Keywords

References

  • K. Miller, Solutions of phi(n) = phi(n+1) for 1 <= n <= 500000. Unpublished, 1972. [Cf. Math. Comp., Vol. 27, p. 447, 1973.]
  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 225.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A001274.

Programs

  • PARI
    {my(z=znstar(1));for(n=1,10^10,my(z1=znstar(n+1)); if(z[1]==z1[1]&&z[2]==z1[2],print1(n,", "));z=z1;); } \\ Joerg Arndt, Mar 17 2016
    
  • PARI
    list(lim)=my(v=List(),old=[1,[]]); forfactored(n=2,lim\1+1, my(cur=znstar(n)[1..2]); if(old==cur, listput(v,n[1]-1)); old=cur); Vec(v) \\ Charles R Greathouse IV, Jul 17 2022

Extensions

More terms from David W. Wilson

A290304 Values of uphi(k) = uphi(k+1).

Original entry on oeis.org

1, 12, 24, 120, 96, 180, 432, 744, 720, 864, 840, 1200, 1260, 1680, 2520, 1728, 2784, 2880, 3744, 4032, 5040, 2592, 4224, 5040, 5760, 11520, 11880, 9216, 18000, 20160, 17280, 12480, 17280, 20160, 28080, 20160, 23040, 21600, 32256, 30240, 52080, 34560, 57600
Offset: 1

Views

Author

Amiram Eldar, Jul 26 2017

Keywords

Comments

The values of unitary totient function of numbers such that k and k+1 have the same value.
The unitary version of A003275.

Crossrefs

Programs

  • Mathematica
    uphi[n_] := If[n==1, 1, (Times @@ (Table[#[[1]]^#[[2]] - 1, {1}] & /@ FactorInteger[n]))[[1]]]; a={}; u1=0; For[k=0, k<10^5, k++; u2=uphi[k]; If[u1==u2, a = AppendTo[a, u1]]; u1=u2]; a

Formula

a(n) = A047994(A287055(n)).

A294030 Values of bphi(k) = bphi(k+1), where bphi is the bi-unitary analog of Euler's totient function (A116550).

Original entry on oeis.org

1, 9, 14, 42, 161, 161, 798, 1400, 86156, 123656, 419430, 387868, 508797, 772121, 870233, 4162866, 8754569, 126168912, 126991491, 128007618, 131491736
Offset: 1

Views

Author

Amiram Eldar, Oct 22 2017

Keywords

Comments

The bi-unitary totient function of numbers k such that k and k+1 have the same function value (A293184).

Examples

			9 is in the sequence since 9 = bphi(14) = bphi(15).
		

Crossrefs

The bi-unitary version of A003275.

Programs

  • Mathematica
    bphi[1] = 1; bphi[n_] := With[{pp = Power @@@ FactorInteger[n]}, Count[Range[n], m_ /; Intersection[pp, Power @@@ FactorInteger[m]] == {}]]; a={}; b1=0; Do[b2 = bphi[k]; If[b1 == b2, a = AppendTo[a, b1]]; b1 = b2, {k, 1, 10^2}]; a (* after Jean-François Alcover at A116550 *)

Formula

a(n) = A116550(A293184(n)).

Extensions

a(10)-a(11) from Michel Marcus, Nov 14 2017
a(12)-a(21) from Amiram Eldar, Jul 16 2022
Showing 1-4 of 4 results.