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-10 of 57 results. Next

A083534 First difference sequence of A007617. Difference between consecutive values not being in the range of phi (A000010).

Original entry on oeis.org

2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2
Offset: 1

Views

Author

Labos Elemer, May 20 2003

Keywords

Comments

a(n) is either 2 or 1 since odd numbers are in A007619.
If a(n) = 1 then A007619(n+1) is an even number not in the range of phi.

Examples

			{11,13,14,15,17} are not in the range of phi and the corresponding differences are {2,1,1,2}.
		

Crossrefs

Programs

  • Haskell
    a083534 n = a083534_list !! (n-1)
    a083534_list = zipWith (-) (tail a007617_list) a007617_list
    -- Reinhard Zumkeller, Nov 26 2015
    
  • Mathematica
    t0[x_] := Table[j, {j, 1, x}]; t=Table[EulerPhi[w], {w, 1, 10000}]; u=Union[%]; c=Complement[t0[10000], u]; Delete[c-RotateRight[c], 1]
  • PARI
    list(lim) = {my(k1 = 3, k2 = 3); while(k1 < lim, until(!istotient(k2), k2++); print1(k2 - k1, ", "); k1 = k2); } \\ Amiram Eldar, Feb 22 2025

Formula

a(n) = A007617(n+1) - A007617(n).

A350085 a(n) is the smallest totient number k > 1 such that A007617(n)*k is a nontotient number, or 0 if no such number exists.

Original entry on oeis.org

30, 10, 2, 10, 22, 2, 22, 6, 2, 2, 54, 10, 2, 22, 22, 6, 2, 18, 2, 10, 2, 2, 6, 6, 2, 2, 2, 2, 22, 10, 6, 10, 2, 2, 2, 2, 18, 6, 2, 10, 6, 2, 2, 10, 6, 2, 2, 2, 30, 10, 2, 6, 2, 6, 106, 2, 2, 2, 10, 2, 22, 6, 2, 2, 18, 2, 2, 6, 6, 46, 2, 2, 2, 6, 2, 2, 2, 2, 10, 2
Offset: 1

Views

Author

Jianing Song, Dec 12 2021

Keywords

Comments

Conjecture: a(n) != 0 for all n.
Records: 30 (A007617(n) = 3), 54 (A007617(n) = 21), 106 (A007617(n) = 90), 2010 (A007617(n) = 450), ...
By definition, a totient number N > 1 is a term if and only if there exists a nontotient r such that: (i) k*r is a totient for totient numbers 2 <= k < N; (ii) N*r is a nontotient. No term can be of the form m*m', where m > 1 is a totient and m' > 1 is in A301587 (otherwise m*r is a totient implies m*m'*r is a totient).
Conjecture: every totient number > 1 which is not of the form m*m', where m > 1 is a totient and m' > 1 is in A301587, appears in this sequence. For example, the numbers 2, 6, 10, 18, 22, 28, 30 first appears when A005277(n) = 34, 86, 68, 186, 14, 902, 318.
Most of the terms are of the form prime-1, but there are some exceptions. Here is a list of distinct such instances [not(prime-1), the corresponding least nontotient]: [54, 21], [110, 10450], [342, 29214], [506, 63250], [3422, 100050], [294, 118062], [2162, 235824], [1210, 308660], [930, 395070], ... That is, instead of k being invphi(prime), in these cases it appears that k is invphi(prime^q). - Michel Marcus, Jun 25 2023

Examples

			A007617(55) = 90. N = 106 is a totient number > 1 such that 90*k is a totient for totient numbers 2 <= k < N, and 90*N is a nontotient, so a(55) = 106.
A007617(307) = 450. N = 2010 is a totient number > 1 such that 450*k is a totient for totient numbers 2 <= k < N, and 450*N is a nontotient, so a(307) = 2010.
A007617(637) = 902. N = 28 is a totient number > 1 such that 902*k is a totient for totient numbers 2 <= k < N, and 902*N is a nontotient, so a(637) = 28.
A007617(194495) = 241010. N = 100 is a totient number > 1 such that 241010*k is a totient for totient numbers 2 <= k < N, and 241010*N is a nontotient, so a(194495) = 100. Note that although 100 = 10*10 is a product of 2 totient number > 1, neither factor is in A301587, so nothing prevents that 100 is a term of this sequence.
		

Crossrefs

Programs

  • PARI
    b(n) = if(!istotient(n), for(k=2, oo, if(istotient(k) && !istotient(n*k), return(k))))
    list(lim) = my(v=[]); for(n=1, lim, if(!istotient(n), v=concat(v,b(n)))); v \\ gives a(n) for A007617(n) <= lim

A378510 The least totient number k with exactly n solutions to the equation phi(x) = k, where all the solutions are nontotient numbers (A007617).

Original entry on oeis.org

30, 116, 42, 456, 780, 1140, 1368, 1380, 3420, 4356, 5104, 20196, 9396, 1980, 15876, 8316, 4860, 16380, 79464, 239976, 15720, 69300, 129960, 70000, 90360, 141680, 263160, 835380, 802296, 706680, 236808, 39960, 205800, 2898840, 3200904, 598920, 664440, 2723400
Offset: 2

Views

Author

Amiram Eldar, Nov 29 2024

Keywords

Comments

The least term k of A378509 such that A014197(k) = n.

Crossrefs

Programs

  • Mathematica
    seq[len_] := Module[{v = Table[0, {len+1}], c = 0, k = 2, s, ns}, While[c < len, s = PhiInverse[k]; ns = Length[s]; If[0 < ns <= len + 1 && AllTrue[s, PhiMultiplicity[#] == 0 &] && v[[ns]] == 0, v[[ns]] = k; c++]; k += 2]; Rest[v]]; seq[10] (* using David M. Bressoud's CNT.m *)
  • PARI
    lista(len) = {my(v = vector(len+1), c = 0, k = 2, s, ns, ans); while(c < len, s = invphi(k); ns = #s; ans = 1; for(i = 1, ns, if(istotient(s[i]), ans = 0; break)); if(ans && ns > 0 && ns <= len + 1 && v[ns] == 0, c++; v[ns] = k); k += 2); vecextract(v,"^1");} \\ using Max Alekseyev's invphi.gp

Formula

a(n) >= A007374(n).

A067006 Smallest number for which the totient is divisible by the n-th nontotient number, that is, the n-th term of A007617.

Original entry on oeis.org

7, 11, 29, 19, 23, 53, 29, 31, 103, 191, 43, 47, 101, 53, 81, 59, 311, 67, 103, 71, 149, 191, 79, 83, 173, 181, 283, 197, 101, 103, 107, 121, 229, 709, 367, 311, 127, 131, 269, 137, 139, 569, 293, 149, 151, 229, 463, 317, 163, 167, 1021, 173, 349, 179, 181, 547
Offset: 1

Views

Author

Labos Elemer, Dec 22 2001

Keywords

Examples

			14 = A007617(7) is not totient of any other number, but phi(29) = 28 is divisible by 14 and 29 is the smallest number of which the totient is a multiple of 14, so a(7)=29.
		

Crossrefs

Formula

a(n) = min_{x : mod(phi(x), A007617(n)) = 0}. For all nontotient numbers x, q*x+1 is prime with large enough q and a divisor of phi(q*x+1) = q*x is x, the selected nontotient number. [Corrected by Sean A. Irvine, Nov 28 2023]

A002202 Values taken by totient function phi(m) (A000010).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 28, 30, 32, 36, 40, 42, 44, 46, 48, 52, 54, 56, 58, 60, 64, 66, 70, 72, 78, 80, 82, 84, 88, 92, 96, 100, 102, 104, 106, 108, 110, 112, 116, 120, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150, 156, 160, 162, 164, 166, 168, 172, 176
Offset: 1

Views

Author

Keywords

Comments

These are the numbers n such that for some m the multiplicative group mod m has order n.
Maier & Pomerance show that there are about x * exp(c (log log log x)^2)/log x members of this sequence up to x, with c = 0.81781465... (A234614); see the paper for details on making this precise. - Charles R Greathouse IV, Dec 28 2013
A264739(a(n)) = 1; a(n) occurs A058277(n) times in A007614. - Reinhard Zumkeller, Nov 26 2015
There are no odd numbers > 2 in the sequence and the even numbers that are not in the sequence are in A005277. - Bernard Schott, May 13 2020

References

  • J. W. L. Glaisher, Number-Divisor Tables. British Assoc. Math. Tables, Vol. 8, Camb. Univ. Press, 1940, p. 64.
  • 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

Cf. A002110, A005277, A007614, A007617 (complement).
Cf. A083533 (first differences), A264739.
Cf. A006093 (a subsequence).

Programs

  • Haskell
    import Data.List.Ordered (insertSet)
    a002202 n = a002202_list !! (n-1)
    a002202_list = f [1..] (tail a002110_list) [] where
       f (x:xs) ps'@(p:ps) us
         | x < p = f xs ps' $ insertSet (a000010' x) us
         | otherwise = vs ++ f xs ps ws
         where (vs, ws) = span (<= a000010' x) us
    -- Reinhard Zumkeller, Nov 22 2015
  • Maple
    with(numtheory); t1 := [seq(nops(invphi(n)), n=1..300)]; t2 := []: for n from 1 to 300 do if t1[n] <> 0 then t2 := [op(t2), n]; fi; od: t2;
    # second Maple program:
    q:= n-> is(numtheory[invphi](n)<>[]):
    select(q, [$1..176])[];  # Alois P. Heinz, Nov 13 2024
  • Mathematica
    phiQ[m_] := Select[Range[m+1, 2m*Product[(1-1/(k*Log[k]))^(-1), {k, 2, DivisorSigma[0, m]}]], EulerPhi[#] == m &, 1 ] != {}; Select[Range[176], phiQ] (* Jean-François Alcover, May 23 2011, after Maxim Rytin *)
  • PARI
    lst(lim)=my(P=1,q,v);forprime(p=2,default(primelimit), if(eulerphi(P*=p)>=lim,q=p;break));v=vecsort(vector(P/q*lim\eulerphi(P/q),k,eulerphi(k)),,8);select(n->n<=lim,v) \\ Charles R Greathouse IV, Apr 16 2012
    
  • PARI
    select(istotient,vector(100,i,i)) \\ Charles R Greathouse IV, Dec 28 2012
    

A005277 Nontotients: even numbers k such that phi(m) = k has no solution.

Original entry on oeis.org

14, 26, 34, 38, 50, 62, 68, 74, 76, 86, 90, 94, 98, 114, 118, 122, 124, 134, 142, 146, 152, 154, 158, 170, 174, 182, 186, 188, 194, 202, 206, 214, 218, 230, 234, 236, 242, 244, 246, 248, 254, 258, 266, 274, 278, 284, 286, 290, 298, 302, 304, 308, 314, 318
Offset: 1

Views

Author

Keywords

Comments

If p is prime then the following two statements are true. I. 2p is in the sequence iff 2p+1 is composite (p is not a Sophie Germain prime). II. 4p is in the sequence iff 2p+1 and 4p+1 are composite. - Farideh Firoozbakht, Dec 30 2005
Another subset of nontotients consists of the numbers j^2 + 1 such that j^2 + 2 is composite. These numbers j are given in A106571. Similarly, let b be 3 or a number such that b == 1 (mod 4). For any j > 0 such that b^j + 2 is composite, b^j + 1 is a nontotient. - T. D. Noe, Sep 13 2007
The Firoozbakht comment can be generalized: Observe that if k is a nontotient and 2k+1 is composite, then 2k is also a nontotient. See A057192 and A076336 for a connection to Sierpiński numbers. This shows that 271129*2^j is a nontotient for all j > 0. - T. D. Noe, Sep 13 2007

Examples

			There are no values of m such that phi(m)=14, so 14 is a term of the sequence.
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 44 at p. 91.
  • R. K. Guy, Unsolved Problems in Number Theory, B36.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 91.

Crossrefs

See A007617 for all numbers k (odd or even) such that phi(m) = k has no solution.
All even numbers not in A002202. Cf. A000010.

Programs

  • Haskell
    a005277 n = a005277_list !! (n-1)
    a005277_list = filter even a007617_list
    -- Reinhard Zumkeller, Nov 22 2015
    
  • Magma
    [n: n in [2..400 by 2] | #EulerPhiInverse(n) eq 0]; // Marius A. Burtea, Sep 08 2019
  • Maple
    A005277 := n -> if type(n,even) and invphi(n)=[] then n fi: seq(A005277(i),i=1..318); # Peter Luschny, Jun 26 2011
  • Mathematica
    searchMax = 320; phiAnsYldList = Table[0, {searchMax}]; Do[phiAns = EulerPhi[m]; If[phiAns <= searchMax, phiAnsYldList[[phiAns]]++ ], {m, 1, searchMax^2}]; Select[Range[searchMax], EvenQ[ # ] && (phiAnsYldList[[ # ]] == 0) &] (* Alonso del Arte, Sep 07 2004 *)
    totientQ[m_] := Select[ Range[m +1, 2m*Product[(1 - 1/(k*Log[k]))^(-1), {k, 2, DivisorSigma[0, m]}]], EulerPhi[#] == m &, 1] != {}; (* after Jean-François Alcover, May 23 2011 in A002202 *) Select[2 Range@160, ! totientQ@# &] (* Robert G. Wilson v, Mar 20 2023 *)
  • PARI
    is(n)=n%2==0 && !istotient(n) \\ Charles R Greathouse IV, Mar 04 2017
    

Formula

a(n) = 2*A079695(n). - R. J. Mathar, Sep 29 2021
{k: k even and A014197(k) = 0}. - R. J. Mathar, Sep 29 2021

Extensions

More terms from Jud McCranie, Oct 13 2000

A007366 Numbers k such that phi(x) = k has exactly 2 solutions.

Original entry on oeis.org

1, 10, 22, 28, 30, 46, 52, 54, 58, 66, 70, 78, 82, 102, 106, 110, 126, 130, 136, 138, 148, 150, 166, 172, 178, 190, 196, 198, 210, 222, 226, 228, 238, 250, 262, 268, 270, 282, 292, 294, 306, 310, 316, 330, 342, 346, 358, 366, 372, 378, 382, 388, 418, 430, 438
Offset: 1

Views

Author

Keywords

Comments

Contains {2*3^(6k+1): k >= 1} as a subsequence. This is the simplest proof for the infinity of these numbers (see Sierpiński, Exercise 12, p. 237). - Franz Vrabec, Aug 21 2021
The smaller of the solutions to phi(x) = a(n) is given by A271983(n). It is conjectured that the larger solution is 2*A271983(n); or equivalently, all terms in A271983 are odd. - Jianing Song, Nov 08 2022

Examples

			10 = phi(11) = phi(22).
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • Wacław Sierpiński, Elementary Theory of Numbers, Warszawa, 1964.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Number of solutions: A007617 (0), this sequence (2), A007367 (3), A060667 (4), A060668 (5), A060669 (6), A060670 (7), A060671 (8), A060672 (9), A060673 (10), A060674 (11), A060675 (12).

Programs

  • Maple
    select(nops@numtheory:-invphi=2, [$1..1000]); # Robert Israel, Dec 20 2017
  • Mathematica
    a = Table[ 0, {500} ]; Do[ p = EulerPhi[ n ]; If[ p < 501, a[ [ p ] ]++ ], {n, 1, 500} ]; Select[ Range[ 500 ], a[ [ # ] ] == 2 & ]
    (* Second program: *)
    With[{nn = 1325}, TakeWhile[Union@ Select[KeyValueMap[{#1, Length@ #2} &, PositionIndex@ Array[EulerPhi, nn]], Last@ # == 2 &][[All, 1]], # < nn/3 &] ] (* Michael De Vlieger, Dec 20 2017 *)
  • PARI
    is(k) = invphiNum(k) == 2 \\ Amiram Eldar, Nov 16 2024, using Max Alekseyev's invphi.gp

Formula

#({phi^(-1)(a(n))}) = 2. - Torlach Rush, Dec 22 2017

A007367 Numbers k such that phi(x) = k has exactly 3 solutions.

Original entry on oeis.org

2, 44, 56, 92, 104, 116, 140, 164, 204, 212, 260, 296, 332, 344, 356, 380, 392, 444, 452, 476, 524, 536, 564, 584, 588, 620, 632, 684, 692, 716, 744, 764, 776, 836, 860, 884, 932, 956, 980, 1004, 1016, 1112, 1124, 1136, 1172, 1196, 1284, 1292, 1304
Offset: 1

Views

Author

Keywords

Comments

From Torlach Rush, Jul 23 2018: (Start)
For known terms:
- The greatest common divisor of the three solutions is the distance of the middle solution from the least solution and is half the distance of the middle solution to the largest solution.
- If the number of distinct prime factors of k equals the number of solutions of k = phi(x), then the greatest common divisor of the solutions is the least solution divided by the number of solutions.
- Except for a(1), if the largest prime factor is the same for all solutions and is equal to the greatest common divisor of all solutions then the distance from a(n) to the least solution is gcd({k: phi(k) = a(n)}) + 2. (End)
By Ford's theorem on Euler totient function, this sequence is infinite. - Jianing Song, Jul 18 2018

Examples

			phi(69) = phi(92) = phi(138) = 44, so 44 is a term.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 44, p. 17, Ellipses, Paris, 2008.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Number of solutions: A007617 (0), A007366 (2), this sequence (3), A060667 (4), A060668 (5), A060669 (6), A060670 (7), A060671 (8), A060672 (9), A060673 (10), A060674 (11), A060675 (12).

Programs

  • Haskell
    a007367 n = a007367_list !! (n-1)
    a007367_list = map fst $
                   filter ((== 3) . snd) $ zip a002202_list a058277_list
    -- Reinhard Zumkeller, Nov 25 2015
    
  • Mathematica
    a = Table[ 0, {1500} ]; Do[ p = EulerPhi[ n ]; If[ p < 1501, a[ [ p ] ]++ ], {n, 1, 1500} ]; Select[ Range[ 1500 ], a[ [ # ] ] == 3 & ]
    Take[Select[Tally[EulerPhi[Range[50000]]],#[[2]]==3&][[All,1]],50]//Sort (* Harvey P. Dale, Apr 02 2018 *)
  • PARI
    is(k) = invphiNum(k) == 3 \\ Amiram Eldar, Nov 17 2024, using Max Alekseyev's invphi.gp

A063512 Least number starting a chain of exactly 2n-1 consecutive integers that do not have totient inverses.

Original entry on oeis.org

3, 13, 73, 401, 241, 865, 8405, 4033, 10567, 14261, 35171, 64521, 112691, 134641, 256831, 159121, 1214533, 597081, 2277139, 1039681, 5972401, 2307317, 12033793, 9403681, 5313463, 23777761, 84502091, 19773769, 159227791, 9377213, 146793539, 114748705, 245856241
Offset: 1

Views

Author

Labos Elemer, Aug 22 2001

Keywords

Comments

(3/8)*n*log(log(n)) < phi(n) < n for n > 30.

Examples

			n=6: a(6)=865 because it is the first number initiating a chain of exactly 2*6-1=11 consecutive integers, {865,...,875}, such that each has no totient inverse.
		

Crossrefs

Programs

  • Mathematica
    a = Table[0, {5*10^7}]; Do[b = EulerPhi[n]/2; If[b < 5*10^7 + 1, a[[b]]++ ], {n, 3, 5*10^8}]; (* used to find a(7) *) Do[ If[ a[[n]] == a[[n + 1]] == a[[n + 2]] == a[[n + 3]] == a[[n + 4]] == a[[n + 5]] == a[[n + 6]] == 0, Print[2n - 1]], {n, 1, 5*10^7 -6}]

Formula

a(n) = Min{x : invphi(x+j) is empty exactly for j=0..2n-2}.

Extensions

Edited and extended by Robert G. Wilson v, May 28 2002 and Jul 11 2002
David Wasserman pointed out that a(21) was incorrect and supplied a better description on Jul 10 2002
a(29) and a(31)-a(33) from Donovan Johnson, Oct 20 2011

A060668 Numbers k such that phi(x) = k has exactly 5 solutions.

Original entry on oeis.org

8, 20, 220, 272, 300, 368, 416, 456, 500, 656, 732, 848, 876, 1092, 1160, 1212, 1236, 1328, 1376, 1424, 1568, 1624, 1716, 1808, 2144, 2244, 2336, 2420, 2460, 2480, 2528, 2556, 2768, 3056, 3080, 3252, 3320, 3344, 3536, 3560, 3612, 3728, 3732, 3900, 4016
Offset: 1

Views

Author

Robert G. Wilson v, Apr 18 2001

Keywords

Examples

			8 = phi(15) = phi(16) = phi(20) = phi(24) = phi(30).
		

Crossrefs

Cf. A000010.
Number of solutions: A007617 (0), A007366 (2), A007367 (3), A060667 (4), this sequence (5), A060669 (6), A060670 (7), A060671 (8), A060672 (9), A060673 (10), A060674 (11), A060675 (12).

Programs

  • Mathematica
    a = Table[ 0, {5000} ]; Do[ p = EulerPhi[ n ]; If[ p < 5001, a[[ p ]]++ ], {n, 1, 15000} ]; Select[ Range[ 5000 ], a[[ # ]] == 5 & ]
  • PARI
    is(n)=sum(k=1,n,eulerphi(k)==n)==5 \\ Charles R Greathouse IV, Mar 03 2014
    
  • PARI
    is(k) = invphiNum(k) == 5 \\ Amiram Eldar, Nov 17 2024, using Max Alekseyev's invphi.gp
Showing 1-10 of 57 results. Next