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.

Previous Showing 21-30 of 47 results. Next

A167766 Minimum numbers whose phi of phi are multiples of the n-th prime: the n-th term is the minimum integer x such that: prime(n) | phi(phi(x)), prime(n) being the n-th prime.

Original entry on oeis.org

5, 19, 23, 59, 47, 107, 479, 383, 283, 467, 1367, 1187, 167, 347, 1319, 643, 2837, 2203, 2153, 3413, 587, 5693, 1997, 359, 5827, 1619, 2063, 2999, 4799, 3167, 1019, 1579, 5483, 3343, 7159, 3023, 12569, 1307, 4679, 2083, 719, 3623, 4597, 3863, 18917, 4783
Offset: 1

Views

Author

Fred Schneider, Nov 11 2009

Keywords

Comments

These minimal integers are always prime. To be clear, the phi function referred to here is Euler's totient function.

Examples

			The first term is 5. phi(5) = 4 and phi(4)=2. 2 is a multiple of the first prime 2. 5 is the lowest such number x where 2 divides phi(phi(x)).
		

Crossrefs

Cf. A010554.

Programs

  • Maple
    with(numtheory): P:=proc(n) local a,k; a:=ithprime(n);
    for k from 1 to 10^3 do if frac(phi(phi(ithprime(k)))/a)=0
    then RETURN(ithprime(k)); break; fi; od; end:
    seq(P(i),i=1..46); # Paolo P. Lava, Oct 10 2018
  • Mathematica
    a[n_] := (p=Prime[n]; k=1; While[k++; x=Prime[k]; Mod[ EulerPhi[ EulerPhi[x]], p] != 0]; x); Table[a[n], {n, 50}] (* Jean-François Alcover, Sep 14 2011 *)
  • PARI
    /* not the most efficient implementation */ ppp(a,b)= { forprime(p=a,b, v = 2*p + 1; v2 = 1; minv = 100000000; while (v2 <= minv || v <=minv, /* print ("Checking ",v, " for ",p); */ while(!isprime(v), v += 2*p /*; print ("Checking ",v, " for ",p)*/ ); if (v%(p*p)==1, /* don't do this step if: p^2 | v-1 */ v2 = v , v2 = 2*v + 1; while (!isprime(v2) && v2 < minv, v2 += 2*v ) ); if (v2 < minv, minv = v2; ); v += 2*p ); print (p," => ",minv) ) }

A167767 First of 3 or more consecutive integers with equal values of phi(phi(n)).

Original entry on oeis.org

1, 2, 7, 8, 20, 31, 32, 33, 146, 211, 314, 384, 626, 674, 1754, 2694, 2695, 5186, 11714, 12242, 17329, 17613, 19310, 25544, 35774, 36728, 38018, 40227, 42626, 56834, 65731, 91106, 97724, 110971, 117536, 131071, 131072, 155821, 161734, 164174
Offset: 1

Views

Author

Fred Schneider, Nov 11 2009

Keywords

Comments

Let p2(n) = phi(phi(n)). This list shows numbers n such that p2(n) = p2(n+1) = p2(n+2) = x for some x.
Here phi is Euler's totient function.

Examples

			p2(1) = p2(2) = p2(3) = 1, p2(7) = p2(8) = p2(9) = 2.
		

Crossrefs

Cf. A167768.

Programs

  • Magma
    [n: n in [1..2*10^5] | EulerPhi(EulerPhi(n)) eq EulerPhi(EulerPhi(n + 1)) and EulerPhi(EulerPhi(n)) eq EulerPhi(EulerPhi(n + 2))]; // Vincenzo Librandi, Jun 24 2016
  • Mathematica
    Select[Range[100], EulerPhi[EulerPhi[#]] == EulerPhi[EulerPhi[# + 1]] && EulerPhi[EulerPhi[#]] == EulerPhi[EulerPhi[# + 2]] &] (* G. C. Greubel, Jun 23 2016 *)
    SequencePosition[EulerPhi[EulerPhi[Range[170000]]],{x_,x_,x_}][[;;, 1]] (* Harvey P. Dale, Sep 02 2025 *)
  • PARI
    isok(n) = (eulerphi(eulerphi(n)) == eulerphi(eulerphi(n+1))) && (eulerphi(eulerphi(n)) == eulerphi(eulerphi(n+2))) \\ Michel Marcus, Jul 12 2013
    

Formula

{n: A010554(n) = A010554(n+1) = A010554(n+2)}. - R. J. Mathar, Nov 12 2009

Extensions

Edited by N. J. A. Sloane, Nov 12 2009
Extended by R. J. Mathar, Nov 12 2009

A219029 a(n) = n - 1 - phi(phi(n)).

Original entry on oeis.org

-1, 0, 1, 2, 2, 4, 4, 5, 6, 7, 6, 9, 8, 11, 10, 11, 8, 15, 12, 15, 16, 17, 12, 19, 16, 21, 20, 23, 16, 25, 22, 23, 24, 25, 26, 31, 24, 31, 30, 31, 24, 37, 30, 35, 36, 35, 24, 39, 36, 41, 34, 43, 28, 47, 38, 47, 44, 45, 30, 51, 44, 53, 50, 47, 48, 57, 46, 51, 48
Offset: 1

Views

Author

V. Raman, Nov 10 2012

Keywords

Comments

There are exactly n - 1 - phi(phi(n)) non-primitive roots for n, less than n, if n is prime.
a(n) will be the same as A219027(n) except when n is a member of A033949 or n = 1, i.e., n is not 2, 4, prime, power of a prime, twice a prime, or twice a prime power.

Crossrefs

Cf. A008330 (number of primitive roots for the n-th prime).
Cf. A046144 (number of primitive roots for n).
Cf. A010554 (value of phi(phi(n))).

Programs

  • Magma
    [(n - 1 - EulerPhi(EulerPhi(n))): n in [1..70] ]; // Vincenzo Librandi, Jan 26 2013
  • Mathematica
    Table[n - (EulerPhi[EulerPhi[n]] + 1), {n, 75}] (* Alonso del Arte, Nov 17 2012 *)
  • PARI
    for(n=1,100,print1(n-1-eulerphi(eulerphi(n))","))
    

Formula

a(n) = n - 1 - A010554(n). - V. Raman, Nov 22 2012

A231772 Smallest positive number which has exactly n primitive roots, or 0 if no such number exists.

Original entry on oeis.org

8, 1, 5, 0, 11, 0, 19, 0, 17, 0, 23, 0, 29, 0, 0, 0, 41, 0, 81, 0, 67, 0, 47, 0, 53, 0, 0, 0, 59, 0, 0, 0, 97, 0, 0, 0, 109, 0, 0, 0, 83, 0, 0, 0, 139, 0, 0, 0, 113, 0, 0, 0, 107, 0, 163, 0, 0, 0, 0, 0, 199, 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, 0, 149, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Arkadiusz Wesolowski, Nov 13 2013

Keywords

Comments

If n >= 3 and n is odd, then a(n) = 0.

Crossrefs

Programs

  • Mathematica
    nn = 100; t = Join[{1}, Table[p = PrimitiveRoot[n]; If[IntegerQ[p], EulerPhi[EulerPhi[n]], 0], {n, 2, 2*nn}]]; Table[s = Position[t, n, 1, 1]; If[s == {}, 0, s[[1, 1]]], {n, 0, nn}] (* T. D. Noe, Nov 14 2013 *)
  • PARI
    r=77; print1(8, ", ", 1, ", "); for(n=2, r, m=0; for(c=2*n+1, n^2+1, if(n%2==1, break); e=eulerphi(c); if(e==lcm(znstar(c)[2])&&eulerphi(e)==n, m=1; print1(c, ", "); break)); if(m==0, print1(0, ", ")));

A163379 a(n) = phi(phi(tau(n))).

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Jul 25 2009

Keywords

Crossrefs

Programs

  • Mathematica
    EulerPhi[EulerPhi[DivisorSigma[0, Range[100]]]] (* G. C. Greubel, Dec 20 2016 *)
  • PARI
    vector(100, n, eulerphi(eulerphi(numdiv(n)))) \\ G. C. Greubel, Dec 20 2016

Formula

Extensions

More terms added by G. C. Greubel, Dec 20 2016

A216321 phi(delta(n)), n >= 1, with phi = A000010 (Euler's totient) and delta = A055034 (degree of minimal polynomials with coefficients given in A187360).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 4, 2, 6, 4, 2, 4, 10, 4, 4, 4, 6, 4, 6, 4, 8, 8, 4, 8, 4, 4, 6, 6, 4, 8, 8, 4, 12, 8, 4, 10, 22, 8, 12, 8, 8, 8, 12, 6, 8, 8, 6, 12, 28, 8, 8, 8, 6, 16, 8, 8, 20, 16, 10, 8, 24, 8, 12, 12, 8, 12, 8, 8, 24, 16, 18, 16, 40, 8, 16, 12
Offset: 1

Views

Author

Wolfdieter Lang, Sep 21 2012

Keywords

Comments

If n belongs to A206551 (cyclic multiplicative group Modd n) then there exist precisely a(n) primitive roots Modd n. For these n values the number of entries in row n of the table A216319 with value delta(n) (the row length) is a(n). Note that a(n) is also defined for the complementary n values from A206552 (non-cyclic multiplicative group Modd n) for which no primitive root Modd n exists.
See also A216322 for the number of primitive roots Modd n.

Examples

			a(8) = 2 because delta(8) = 4 and phi(4) = 2. There are 2 primitive roots Modd 8, namely 3 and 5 (see the two 4s in row n=8 of A216320). 8 = A206551(8).
a(12) = 2 because delta(12) = 4 and phi(4) = 2. But there is no primitive root Modd 12, because 4 does not show up in row n=12 of A216320. 12 = A206552(1).
		

Crossrefs

Cf. A000010, A055034, A216319, A216320, A216322, A010554 (analog in modulo n case).

Programs

Formula

a(n) = phi(delta(n)), n >= 1, with phi = A000010 (Euler's totient) and delta = A055034 with delta(1) = 1 and delta(n) = phi(2*n)/2 if n >= 2.

A219028 Number of non-primitive roots for prime(n), less than prime(n).

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 8, 12, 12, 16, 22, 24, 24, 30, 24, 28, 30, 44, 46, 46, 48, 54, 42, 48, 64, 60, 70, 54, 72, 64, 90, 82, 72, 94, 76, 110, 108, 108, 84, 88, 90, 132, 118, 128, 112, 138, 162, 150, 114, 156, 120, 142, 176, 150, 128, 132, 136, 198, 188, 184, 190
Offset: 1

Views

Author

V. Raman, Nov 10 2012

Keywords

Crossrefs

Cf. A008330 (number of primitive roots for the n-th prime, less than n-th prime).
Cf. A046144 (number of primitive roots for n, less than n).
Cf. A010554 (value of phi(phi(n))).

Programs

  • Mathematica
    Table[c=Prime[n];c-1-EulerPhi[EulerPhi[c]],{n,70}] (* Harvey P. Dale, Feb 12 2013 *)
  • PARI
    forprime(i=2,600,p=0;for(q=1,i-1,if(znorder(Mod(q,i))!=eulerphi(i),p++));print1(p","))

Formula

a(n) = p - 1 - phi(phi(p)), where p is the n-th prime.
a(n) = p - 1 - A008330(n) = p - 1 - A010554(p), where p is the n-th prime. - V. Raman, Nov 22 2012

A231773 Numbers k such that there are no numbers with k primitive roots.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 14, 15, 17, 19, 21, 23, 25, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 13 2013

Keywords

Comments

Numbers k such that A231772(k) = 0.

Crossrefs

Programs

  • PARI
    r=95; for(n=2, r, m=0; for(c=2*n+1, n^2+1, if(n%2==1, break); e=eulerphi(c); if(e==lcm(znstar(c)[2])&&eulerphi(e)==n, m=1; break)); if(m==0, print1(n, ", ")));

Formula

a(n) = A007617(n) for n <= 16.

A307308 Self-composition of the Euler totient function (A000010).

Original entry on oeis.org

1, 2, 6, 15, 42, 106, 280, 702, 1778, 4398, 10910, 26678, 65172, 157656, 380524, 912846, 2185906, 5216588, 12433166, 29564544, 70189672, 166245574, 392909240, 926290066, 2178881218, 5114469170, 11985221654, 28049398284, 65588182636, 153277006212, 358073997608
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 02 2019

Keywords

Crossrefs

Programs

  • Mathematica
    g[x_] := g[x] = Sum[MoebiusMu[k] x^k/(1 - x^k)^2, {k, 1, 31}]; a[n_] := a[n] = SeriesCoefficient[g[g[x]], {x, 0, n}]; Table[a[n], {n, 31}]

Formula

G.f.: g(g(x)), where g(x) = Sum_{k>=1} mu(k)*x^k/(1 - x^k)^2 is the g.f. of A000010.

A378507 The smallest number k such that the equation phi(phi(x)) = k has exactly n solutions.

Original entry on oeis.org

10, 56, 6, 1, 84, 312, 2, 200, 464, 36, 108, 4, 12, 88, 816, 264, 440, 360, 552, 120, 224, 8, 3696, 1320, 928, 176, 624, 1472, 832, 5728, 24, 4560, 1080, 2000, 16, 2848, 72, 1312, 1872, 80, 1120, 216, 880, 336, 23360, 448, 3808, 10608, 648, 528, 352, 9280, 32
Offset: 2

Views

Author

Amiram Eldar, Nov 29 2024

Keywords

Comments

The smallest number k such that A378506(k) = n.
If phi(phi(x)) = k has a solution, then according to Carmichael's totient function conjecture there is at least one another number y != x such that phi(y) = phi(x) and then y is also a solution. Therefore, according to this conjecture, a(1) does not exist.

Crossrefs

Programs

  • Mathematica
    s[n_] := Sum[PhiMultiplicity[k], {k, PhiInverse[n]}]; seq[len_] := Module[{v = Table[0, {len+1}], c = 0, k = 1, ns}, While[c < len, ns = s[k]; If[0 < ns <= len + 1 && v[[ns]] == 0, v[[ns]] = k; c++]; k++]; Rest[v]]; seq[30] (* using David M. Bressoud's CNT.m *)
  • PARI
    s(n) = vecsum(apply(x -> invphiNum(x), invphi(n))); \\ using Max Alekseyev's invphi.gp
    lista(len) = {my(v = vector(len+1), c = 0, k = 1, ns); while(c < len, ns = s(k); if(ns > 0 && ns <= len + 1 && v[ns] == 0, c++; v[ns] = k); k++); vecextract(v,"^1");}
Previous Showing 21-30 of 47 results. Next