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

A014197 Number of numbers m with Euler phi(m) = n.

Original entry on oeis.org

2, 3, 0, 4, 0, 4, 0, 5, 0, 2, 0, 6, 0, 0, 0, 6, 0, 4, 0, 5, 0, 2, 0, 10, 0, 0, 0, 2, 0, 2, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 4, 0, 3, 0, 2, 0, 11, 0, 0, 0, 2, 0, 2, 0, 3, 0, 2, 0, 9, 0, 0, 0, 8, 0, 2, 0, 0, 0, 2, 0, 17, 0, 0, 0, 0, 0, 2, 0, 10, 0, 2, 0, 6, 0, 0, 0, 6, 0, 0, 0, 3
Offset: 1

Views

Author

Keywords

Comments

Carmichael conjectured that there are no 1's in this sequence. - Jud McCranie, Oct 10 2000
Number of cyclotomic polynomials of degree n. - T. D. Noe, Aug 15 2003
Let v == 0 (mod 24), w = v + 24, and v < k < q < w, where k and q are integer. It seems that, for most values of v, there is no b such that b = a(k) + a(q) and b > a(v) + a(w). The first case where b > a(v) + a(w) occurs at v = 888: b = a(896) + a(900) = 15 + 4, b > a(888) + a(912), or 19 > 8 + 7. The first case where v < n < w and a(n) > a(v) + a(w) occurs at v = 2232: a(2240) > a(2232) + a(2256), or 27 > 7 + 8. - Sergey Pavlov, Feb 05 2017
One elementary result relating to phi(m) is that if m is odd, then phi(m)=phi(2m) because 1 and 2 both have phi value 1 and phi is multiplicative. - Roderick MacPhee, Jun 03 2017

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B39, pp. 144-146.
  • Joe Roberts, Lure of The Integers, The Mathematical Association of America, 1992, entry 32, page 182.

Crossrefs

Cf. A000010, A002202, A032446 (bisection), A049283, A051894, A055506, A057635, A057826, A058277 (nonzero terms), A058341, A063439, A066412, A070243 (partial sums), A070633, A071386 (positions of odd terms), A071387, A071388 (positions of primes), A071389 (where prime(n) occurs for the first time), A082695, A097942 (positions of records), A097946, A120963, A134269, A219930, A280611, A280709, A280712, A296655 (positions of positive even terms), A305353, A305656, A319048, A322019.
For records see A131934.
Column 1 of array A320000.

Programs

  • GAP
    a := function(n)
    local S, T, R, max, i, k, r;
    S:=[];
    for i in DivisorsInt(n)+1 do
        if IsPrime(i)=true then
            S:=Concatenation(S,[i]);
        fi;
    od;
    T:=[];
    for k in [1..Size(S)] do
        T:=Concatenation(T,[S[k]/(S[k]-1)]);
    od;
    max := n*Product(T);
    R:=[];
    for r in [1..Int(max)] do
        if Phi(r)=n then
            R:=Concatenation(R,[r]);
        fi;
    od;
    return Size(R);
    end; # Miles Englezou, Oct 22 2024
  • Magma
    [#EulerPhiInverse(n): n in [1..100]]; // Marius A. Burtea, Sep 08 2019
    
  • Maple
    with(numtheory): A014197:=n-> nops(invphi(n)): seq(A014197(n), n=1..200);
  • Mathematica
    a[1] = 2; a[m_?OddQ] = 0; a[m_] := Module[{p, nmax, n, k}, p = Select[ Divisors[m]+1, PrimeQ]; nmax = m*Times @@ (p/(p - 1)); n = m; k = 0; While[n <= nmax, If[EulerPhi[n] == m, k++]; n++]; k]; Array[a, 92] (* Jean-François Alcover, Dec 09 2011, updated Apr 25 2016 *)
    With[{nn = 116}, Function[s, Function[t, Take[#, nn] &@ ReplacePart[t, Map[# -> Length@ Lookup[s, #] &, Keys@ s]]]@ ConstantArray[0, Max@ Keys@ s]]@ KeySort@ PositionIndex@ Array[EulerPhi, Floor[nn^(3/2)] + 10]] (* Michael De Vlieger, Jul 19 2017 *)
  • PARI
    A014197(n,m=1) = { n==1 && return(1+(m<2)); my(p,q); sumdiv(n, d, if( d>=m && isprime(d+1), sum( i=0,valuation(q=n\d,p=d+1), A014197(q\p^i,p))))} \\ M. F. Hasler, Oct 05 2009
    
  • PARI
    a(n) = invphiNum(n); \\ Amiram Eldar, Nov 15 2024 using Max Alekseyev's invphi.gp
    
  • Python
    from sympy import totient, divisors, isprime, prod
    def a(m):
        if m == 1: return 2
        if m % 2: return 0
        X = (x + 1 for x in divisors(m))
        nmax=m*prod(i/(i - 1) for i in X if isprime(i))
        n=m
        k=0
        while n<=nmax:
            if totient(n)==m:k+=1
            n+=1
        return k
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jul 18 2017, after Mathematica code
    

Formula

Dirichlet g.f.: Sum_{n>=1} a(n)*n^-s = zeta(s)*Product_(1+1/(p-1)^s-1/p^s). - Benoit Cloitre, Apr 12 2003
Limit_{n->infinity} (1/n) * Sum_{k=1..n} a(k) = zeta(2)*zeta(3)/zeta(6) = 1.94359643682075920505707036... (see A082695). - Benoit Cloitre, Apr 12 2003
From Christopher J. Smyth, Jan 08 2017: (Start)
Euler transform = Product_{n>=1} (1-x^n)^(-a(n)) = g.f. of A120963.
Product_{n>=1} (1+x^n)^a(n)
= Product_{n>=1} ((1-x^(2n))/(1-x^n))^a(n)
= Product_{n>=1} (1-x^n)^(-A280712(n))
= Euler transform of A280712 = g.f. of A280611.
(End)
a(A000010(n)) = A066412(n). - Antti Karttunen, Jul 18 2017
From Antti Karttunen, Dec 04 2018: (Start)
a(A000079(n)) = A058321(n).
a(A000142(n)) = A055506(n).
a(A017545(n)) = A063667(n).
a(n) = Sum_{d|n} A008683(n/d)*A070633(d).
a(n) = A056239(A322310(n)).
(End)

A055487 Least m such that phi(m) = n!.

Original entry on oeis.org

1, 3, 7, 35, 143, 779, 5183, 40723, 364087, 3632617, 39916801, 479045521, 6227180929, 87178882081, 1307676655073, 20922799053799, 355687465815361, 6402373865831809, 121645101106397521, 2432902011297772771, 51090942186005065121, 1124000727844660550281, 25852016739206547966721, 620448401734814833377121, 15511210043338862873694721, 403291461126645799820077057, 10888869450418352160768000001, 304888344611714964835479763201
Offset: 1

Views

Author

Labos Elemer, Jun 28 2000

Keywords

Comments

Erdős believed (see Guy reference) that phi(x) = n! is solvable.
Factorial primes of the form p = A002981(m)! + 1 = k! + 1 give the smallest solutions for some m (like m = 1,2,3,11) as follows: phi(p) = p-1 = A002981(m)!.
According to Tattersall, in 1950 H. Gupta showed that phi(x) = n! is always solvable. - Joseph L. Pe, Oct 01 2002
A123476(n) is a solution to the equation phi(x)=n!. - T. D. Noe, Sep 27 2006
From M. F. Hasler, Oct 04 2009: (Start)
Conjecture: Unless n!+1 is prime (i.e., n in A002981), a(n)=pq where p is the least prime > sqrt(n!) such that (p-1) | n! and q=n!/(p-1)+1 is prime.
Probably "least prime > sqrt(n!)" can also be replaced by "largest prime <= ceiling(sqrt(n!))". The case "= ceiling(...)" occurs for n=5, sqrt(120) = 10.95..., p=11, q=13.
a(n) is the first element in row n of the table A165773, which lists all solutions to phi(x)=n!. Thus a(n) = A165773((Sum_{kA055506(k)) + 1). The last element of each row (i.e., the largest solution to phi(x)=n!) is given in A165774. (End)

References

  • R. K. Guy, (1981): Unsolved problems In Number Theory, Springer - page 53.
  • Tattersall, J., "Elementary Number Theory in Nine Chapters", Cambridge University Press, 2001, p. 162.

Crossrefs

Programs

  • Mathematica
    Array[Block[{k = 1}, While[EulerPhi[k] != #, k++]; k] &[#!] &, 10] (* Michael De Vlieger, Jul 12 2018 *)

Formula

a(n) = Min{m : phi(m) = n!} = Min{m : A000010(m) = A000142(n)}.

Extensions

More terms from Don Reble, Nov 05 2001
a(21)-a(28) from Max Alekseyev, Jul 09 2014

A055486 Number of solutions to sigma(x) = n!.

Original entry on oeis.org

1, 0, 1, 3, 4, 15, 33, 111, 382, 1195, 3366, 14077, 53265, 229603, 910254, 4524029, 18879944, 91336498, 561832582, 2801857644, 14652294729, 78894985156, 408373652461, 2378940665083, 11939275822636, 71931330299023, 392274481206066, 2626331088771946
Offset: 1

Views

Author

Labos Elemer, Jun 28 2000

Keywords

Examples

			For n = 9, solutions to sigma(x) = n! = 362880 form a set {97440, ..., 361657} of size 382, so a(9) = 382.
		

References

  • R. K. Guy (1981): Unsolved Problems In Number Theory, B39.

Crossrefs

Programs

  • Maple
    with(numtheory): for f from 1 to 9 do fac := f!: k := 0:for n from 1 to fac do if sigma(n)=fac then k := k+1: fi: od: print( k); od:

Formula

a(n) = A054973(n!) = Cardinality[{x; A000203(x) = A000142(n)}].

Extensions

More terms from Jud McCranie, Oct 09 2000
a(13)-a(14) from Donovan Johnson, Nov 22 2008
a(15) from Ray Chandler, Jan 13 2009
a(16)-a(28) from Max Alekseyev, Jan 23 2012

A165773 Numbers n for which phi(n) = m! for some integer m, where phi = A000010.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 14, 18, 35, 39, 45, 52, 56, 70, 72, 78, 84, 90, 143, 155, 175, 183, 225, 231, 244, 248, 286, 308, 310, 350, 366, 372, 396, 450, 462, 779, 793, 803, 905, 925, 1001, 1045, 1085, 1107, 1209, 1221, 1281, 1287, 1395, 1425, 1448, 1485, 1558, 1575
Offset: 1

Views

Author

M. F. Hasler, Oct 02 2009

Keywords

Comments

A subsequence of A032447. Can be read as "fuzzy" table, where the m-th row contains A055506(m) numbers with phi=m!, ranging from A055487(m) to A165774(m). See there for more information.
A log-log plot shows the components of this sequence better. - T. D. Noe, Jun 21 2012

Examples

			The table looks as follows:
1,2, /* A055506(1)=2 numbers for which phi(n) = 1! = 1 */
3,4,6, /* A055506(2)=3 numbers for which phi(n) = 2! = 2 */
7,9,14,18, /* A055506(3)=4 numbers for which phi(n) = 3! = 6 */
35,39,45,52,56,70,72,78,84,90, /* A055506(4)=10 numbers for which phi(n) = 4! = 24 */
143,155,175,183,225,231,244,248,286,308,310,350,366,372,396,450,462, /* A055506(5)=17 numbers for which phi(n) = 5! = 120 */ ...
		

Programs

  • PARI
    for(m=1,8, for( n=f=m!,f*(m+1), eulerphi(n)==f & print1(n","));print())

Extensions

Fixed references to A055506, A055487 and A165774 - M. F. Hasler, Oct 04 2009

A165774 Largest solution to phi(x) = n!, where phi() is Euler totient function (A000010).

Original entry on oeis.org

2, 6, 18, 90, 462, 3150, 22050, 210210, 1891890, 19969950, 219669450, 2847714870, 37020293310, 520843112790, 7959363061650, 135309172048050, 2300255924816850, 41996101027370490, 797925919520039310, 16504589035937252250, 347097774991217099850, 7751850308137181896650, 179602728970220622816750, 4493489228616853106091450, 112337230715421327652286250, 2958213742172761628176871250, 79871771038664563960775523750, 2279417465795734863803670716250
Offset: 1

Views

Author

M. F. Hasler, Oct 04 2009

Keywords

Comments

All solutions to phi(x) = n! belong to the interval [n!,(n+1)!] and are listed in the n-th row of A165773 (when written as table with row lengths A055506). Thus this sequence gives the last element in these rows, i.e., a(n) = A165773(Sum_{k=1..n} A055506(k)).
All terms in this sequence are even, since if x is an odd solution to phi(x) = n!, then 2x is a larger solution because phi(2x) = phi(2)*phi(x) = phi(x).
Most terms (and any term divisible by 4) are divisible by 3, since if x = 2^k*y is a solution with k>1 and gcd(y,2*3) = 1, then x*3/2 = 2^(k-1)*3*y is a larger solution because phi(2^(k-1)*3) = 2^(k-2)*(3-1) = 2^(k-1) = phi(2^k).
For the same reason, most terms are divisible by 5, since if x=2^k*y is a solution with k>2 and gcd(y,2*5) = 1, then x*5/4 is a larger solution.
Also, any term of the form x = 2^k*3^m*y with k,m>1 must be divisible by 7 (else x*7/6 would be a larger solution), and so on.
Experimentally, a(n) = c(n)*(n+1)! with a coefficient c(n) ~ 2^(-n/10) (e.g., c(1) = c(2) = 1, c(10) ~ 0.5).

Examples

			a(1) = 2 is the largest among the A055506(1) = 2 solutions {1,2} to phi(n) = 1! = 1.
a(4) = 90 is the largest among the A055506(4) = 10 solutions {35, 39, 45, 52, 56, 70, 72, 78, 84, 90} to phi(n) = 4! = 24.
See A165773 for more examples.
		

Crossrefs

Programs

Extensions

Edited and terms a(12)-a(28) added by Max Alekseyev, Jan 26 2012, Jul 09 2014
Showing 1-5 of 5 results.