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 21 results. Next

A014684 In the sequence of positive integers subtract 1 from each prime number.

Original entry on oeis.org

1, 1, 2, 4, 4, 6, 6, 8, 9, 10, 10, 12, 12, 14, 15, 16, 16, 18, 18, 20, 21, 22, 22, 24, 25, 26, 27, 28, 28, 30, 30, 32, 33, 34, 35, 36, 36, 38, 39, 40, 40, 42, 42, 44, 45, 46, 46, 48, 49, 50, 51, 52, 52, 54, 55, 56, 57, 58, 58, 60, 60, 62, 63, 64, 65, 66, 66, 68, 69, 70, 70, 72
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a014684 n = n - fromIntegral (a010051 n)
    -- Reinhard Zumkeller, Sep 10 2013
    
  • Magma
    [n - (IsPrime(n) select 1 else 0): n in [1..80]]; // Bruno Berselli, Jul 18 2016
    
  • Mathematica
    Table[If[PrimeQ[n],n-1,n],{n,100}] (* Harvey P. Dale, Aug 27 2015 *)
  • Python
    from sympy import isprime
    def A014684(n): return n-int(isprime(n)) # Chai Wah Wu, Oct 14 2023

Formula

a(n) = A005171(n) + n - 1.
a(n) = phi(n!)/phi((n-1)!). - Vladeta Jovovic, Nov 30 2002
For n > 3: a(n) = A113523(n) = A179278(n). - Reinhard Zumkeller, Jul 08 2010
a(n) = n - A010051(n). - Reinhard Zumkeller, Sep 10 2013

Extensions

More terms from Andrew J. Gacek (andrew(AT)dgi.net)

A053047 a(n) is the first (and maximal) power of 2 arising during iterations of the Euler phi function with initial value n!.

Original entry on oeis.org

1, 2, 2, 8, 32, 64, 128, 1024, 1024, 8192, 65536, 262144, 1048576, 4194304, 16777216, 268435456, 4294967296, 8589934592, 17179869184, 274877906944, 549755813888, 8796093022208, 140737488355328, 1125899906842624
Offset: 1

Views

Author

Labos Elemer, Feb 25 2000

Keywords

Examples

			For n = 10, the initial value is 10! = 3628800 and the iteration chain is {3628800, 829440, 221184, 73728, 24576, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}. The first power of 2 is the 6th element, arising after 5 iterations of phi, and its value is 8192.
		

Crossrefs

Formula

a(n) = 2^A053048(n). - Amiram Eldar, Aug 17 2024

A053048 a(n) is the number of terminal iterations applied to powers of 2 arising in the iterations of the Euler phi function with initial value n!.

Original entry on oeis.org

0, 1, 1, 3, 5, 6, 7, 10, 10, 13, 16, 18, 20, 22, 24, 28, 32, 33, 34, 38, 39, 43, 47, 50, 54, 57, 57, 60, 63, 66, 69, 74, 77, 82, 85, 87, 89, 91, 93, 98, 103, 105, 107, 112, 114, 119, 124, 128, 130, 135, 139, 143, 147, 148, 153, 157, 158, 162, 166, 170, 174, 178, 179
Offset: 1

Views

Author

Labos Elemer, Feb 25 2000

Keywords

Examples

			For n = 10, the initial value is 10! = 3628800 and the iteration chain is {3628800, 829440, 221184, 73728, 24576, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}. The first power of 2 is 8192, after which phi is applied 13 additional times to reach the stationary value 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max@ IntegerExponent[ FixedPointList[ EulerPhi, n!], 2]; Array[a, 63] (* Giovanni Resta, May 30 2018 *)

Formula

a(n) = log_2(A053047(n)). - Amiram Eldar, Aug 17 2024

A366759 a(n) = phi(n!-1), where phi is Euler's totient function (A000010).

Original entry on oeis.org

1, 4, 22, 96, 718, 5038, 38544, 329780, 3503640, 33166848, 479001598, 6223425864, 87178291198, 1168577230080, 20915909651520, 332351050332096, 6293831116536216, 121458761380686016, 2432882508925834560, 48311155748401677120, 1113688776127971818016
Offset: 2

Views

Author

Sean A. Irvine, Oct 20 2023

Keywords

Crossrefs

Programs

  • Mathematica
    EulerPhi[Range[2,25]!-1] (* Paolo Xausa, Oct 21 2023 *)
  • PARI
    {a(n) = eulerphi(n!-1)}
    
  • Python
    from math import factorial
    from sympy import totient
    def A366759(n): return totient(factorial(n)-1) # Chai Wah Wu, Oct 20 2023

Formula

a(n) = A000010(A033312(n)).

A055929 Euler totient function of the factorial of prime(n).

Original entry on oeis.org

1, 2, 32, 1152, 8294400, 1194393600, 64210599936000, 20804234379264000, 4229084764616785920000, 1396531754239566739931136000000, 1256878578815610065938022400000000, 2046959290878571310305421983481856000000000, 4853749870531268290996216607232176947200000000000
Offset: 1

Views

Author

Labos Elemer, Jul 17 2000

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[Prime[n]!]; Array[a, 12] (* Amiram Eldar, Jun 03 2024 *)
  • PARI
    a(n) = eulerphi(prime(n)!); \\ Amiram Eldar, Jun 03 2024

Formula

a(n) = phi(prime(n)!) = A000010(A039716(n)) = A048855(prime(n)).

Extensions

a(12)-a(13) from Amiram Eldar, Jun 03 2024

A076358 a(n) = numerator(n!/phi(n!)).

Original entry on oeis.org

1, 2, 3, 3, 15, 15, 35, 35, 35, 35, 77, 77, 1001, 1001, 1001, 1001, 17017, 17017, 323323, 323323, 323323, 323323, 676039, 676039, 676039, 676039, 676039, 676039, 2800733, 2800733, 86822723, 86822723, 86822723, 86822723, 86822723, 86822723
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Comments

Denominator of Product_{p<=n, p prime} (1 - 1/p). - Franz Vrabec, Jan 28 2014

Crossrefs

Programs

  • Mathematica
    Numerator[#/EulerPhi[#]]&/@(Range[40]!) (* Harvey P. Dale, Apr 16 2016 *)
  • PARI
    a(n) = denominator(prod(p=1, n, if (isprime(p),(1-1/p), 1))); \\ Michel Marcus, Jan 28 2014
    
  • PARI
    first(n) = {my(res = vector(n), q = 2); res[1] = 1; res[2] = 1/2; forprime(p = 3, n, for(k = q + 1, p - 1, res[k] = res[k-1] ); res[p] = res[p-1]*(1-1/p); q = p; ); for(k = precprime(n)+1, n, res[k] = res[k-1] ); vector(n, i, denominator(res[i])) } \\ David A. Corneth, May 22 2020

Formula

a(n) = numerator(A000142(n)/A048855(n)).

A076359 a(n) = denominator(n!/phi(n!)).

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 8, 8, 8, 8, 16, 16, 192, 192, 192, 192, 3072, 3072, 55296, 55296, 55296, 55296, 110592, 110592, 110592, 110592, 110592, 110592, 442368, 442368, 13271040, 13271040, 13271040, 13271040, 13271040, 13271040, 477757440
Offset: 1

Views

Author

Labos Elemer, Oct 08 2002

Keywords

Comments

Numerator of Product_{p<=n, p prime} (1 - 1/p). - Franz Vrabec, Jan 28 2014

Crossrefs

Programs

  • Maple
    P:= 1: p:= 1:  v:= 1:
    while p < 100 do q:= nextprime(p);
       for i from p to q-1 do A[i]:= v od;
       P:= P * (1-1/q);
       v:= numer(P);
       p:= q;
    od:
    seq(A[i],i=1..q-1); # Robert Israel, Oct 18 2018
  • Mathematica
    dnf[n_]:=With[{nn=n!},Denominator[nn/EulerPhi[nn]]]; Array[dnf,40] (* Harvey P. Dale, Feb 21 2015 *)
  • PARI
    a(n) = numerator(prod(p=1, n, if (isprime(p),(1-1/p), 1))); \\ Michel Marcus, Jan 28 2014

Formula

a(n) = denominator(A000142(n)/A048855(n)).
a(n) = A038110(A036234(n)). - Robert Israel, Oct 18 2018

A275985 Least k such that n divides phi(k!) (k > 0).

Original entry on oeis.org

1, 3, 6, 4, 10, 6, 14, 4, 7, 10, 22, 6, 26, 14, 10, 5, 34, 7, 38, 10, 14, 22, 46, 6, 11, 26, 9, 14, 58, 10, 62, 5, 22, 34, 14, 7, 74, 38, 26, 10, 82, 14, 86, 22, 10, 46, 94, 6, 21, 11, 34, 26, 106, 9, 22, 14, 38, 58, 118, 10, 122, 62, 14, 6, 26, 22, 134, 34, 46, 14, 142, 7, 146
Offset: 1

Views

Author

Altug Alkan, Aug 15 2016

Keywords

Examples

			a(4) = 4 because 4 divides phi(4!) = 8.
		

Crossrefs

Cf. A048855.

Programs

  • Maple
    A:= proc(n) option remember;
        local F,p,e,t,k;
        F:= ifactors(n)[2];
        if nops(F)=1 then
          p:= F[1][1];
          e:= F[1][2];
          if p = 2 then
             t:= 1; if e=1 then return 3 fi;
          else
             t:= 0
          fi;
          for k from 2*p by p do
            t:= t + padic:-ordp(k,p);
            if t >= e then return k fi;
            if isprime(k+1) then
              t:= t+padic:-ordp(k,p);
              if t >= e then return(k+1) fi;
            fi;
          od
        else
          max(seq(procname(t[1]^t[2]), t=F))
        fi
    end proc:
    A(1):= 1:
    map(A, [$1..100]); # Robert Israel, Aug 15 2016
  • Mathematica
    With[{ep=Table[{EulerPhi[k!],k},{k,200}]},Table[SelectFirst[ep,Divisible[#[[1]],n]&],{n,80}]][[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 22 2018 *)
  • PARI
    a(n) = {my(k = 1); while(eulerphi(k!) % n, k++); k; }

Formula

From Robert Israel, Aug 15 2016: (Start)
If m and n are coprime then a(m*n) = max(a(m),a(n)).
a(n) <= 2n, with equality iff n is an odd prime.
Suppose p is an odd prime. Then
a(p) = 2p
If 2p+1 is prime then a(p^2) = 2p+1 and a(p^3) = 3p.
Otherwise a(p^2) = 3p and a(p^3) = 4p. (End)

A366760 a(n) = phi(n!+1), where phi is Euler's totient function (A000010).

Original entry on oeis.org

1, 1, 2, 6, 20, 110, 612, 4970, 39600, 337680, 3298900, 39916800, 442155168, 6151996372, 83387930692, 1282826630160, 19089488332800, 355148307803520, 5427568925856000, 119931789135468100, 2432901890279317572, 49902667163053013232, 1073067539495604750240
Offset: 0

Views

Author

Sean A. Irvine, Oct 20 2023

Keywords

Crossrefs

Programs

  • Mathematica
    EulerPhi[Range[0,25]!+1] (* Paolo Xausa, Oct 21 2023 *)
  • PARI
    {a(n) = eulerphi(n!+1)}
    
  • Python
    from math import factorial
    from sympy import totient
    def A366760(n): return totient(factorial(n)+1) # Chai Wah Wu, Oct 20 2023

Formula

a(n) = A000010(A038507(n)).

A053046 a(n) is the number of terms that are not powers of 2 among the iterates of the Euler phi function when it is iterated with initial value n!.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 3, 3, 5, 5, 5, 6, 7, 8, 9, 9, 9, 11, 13, 13, 15, 15, 15, 16, 16, 17, 20, 21, 22, 23, 24, 24, 25, 25, 26, 28, 30, 32, 34, 34, 34, 36, 38, 38, 40, 40, 40, 41, 43, 43, 44, 45, 46, 49, 49, 50, 53, 54, 55, 56, 57, 58, 61, 61, 62, 63, 64, 64, 65, 66, 67, 69, 71, 73, 74
Offset: 1

Views

Author

Labos Elemer, Feb 25 2000

Keywords

Comments

Non-powers of 2 arise at the beginning of iteration chains without interruption. Analogous to A053036.

Examples

			For n = 10, the initial value is 10! = 3628800 and the iteration chain is {3628800, 829440, 221184, 73728, 24576, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}. Its length is 19 and there are 5 values that are not powers of 2: 10!, ..., 24576. Thus a(10) = 5.
		

Crossrefs

Formula

a(n) = 1 + A053044(n) - A053045(n). - R. J. Mathar, Jan 09 2017
Showing 1-10 of 21 results. Next