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

A005179 Smallest number with exactly n divisors.

Original entry on oeis.org

1, 2, 4, 6, 16, 12, 64, 24, 36, 48, 1024, 60, 4096, 192, 144, 120, 65536, 180, 262144, 240, 576, 3072, 4194304, 360, 1296, 12288, 900, 960, 268435456, 720, 1073741824, 840, 9216, 196608, 5184, 1260, 68719476736, 786432, 36864, 1680, 1099511627776, 2880
Offset: 1

Views

Author

N. J. A. Sloane, David Singmaster

Keywords

Comments

A number n is called ordinary iff a(n)=A037019(n). Brown shows that the ordinary numbers have density 1 and all squarefree numbers are ordinary. See A072066 for the extraordinary or exceptional numbers. - M. F. Hasler, Oct 14 2014
All terms are in A025487. Therefore, a(n) is even for n > 1. - David A. Corneth, Jun 23 2017 [corrected by Charles R Greathouse IV, Jul 05 2023]

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.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 52.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 86.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 89.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a005179 n = succ $ fromJust $ elemIndex n $ map a000005 [1..]
    -- Reinhard Zumkeller, Apr 01 2011
    
  • Maple
    A005179_list := proc(SearchLimit, ListLength)
    local L, m, i, d; m := 1;
    L := array(1..ListLength,[seq(0,i=1..ListLength)]);
    for i from 1 to SearchLimit while m <= ListLength do
      d := numtheory[tau](i);
      if d <= ListLength and 0 = L[d] then L[d] := i;
      m := m + 1; fi
    od:
    print(L) end: A005179_list(65537,18);
    # If a '0' appears in the list the search limit has to be increased. - Peter Luschny, Mar 09 2011
    # alternative
    # Construct list of ordered lists of factorizations of n with
    # minimum divisors mind.
    # Returns a list with A001055(n) entries if called with mind=2.
    # Example: print(ofact(10^3,2))
    ofact := proc(n,mind)
        local fcts,d,rec,r ;
        fcts := [] ;
        for d in numtheory[divisors](n) do
            if d >= mind then
                if d = n then
                    fcts := [op(fcts),[n]] ;
                else
                    # recursive call supposed one more factor fixed now
                    rec := procname(n/d,max(d,mind)) ;
                    for r in rec do
                        fcts := [op(fcts),[d,op(r)]] ;
                    end do:
                end if;
            end if;
        end do:
        return fcts ;
    end proc:
    A005179 := proc(n)
        local Lexp,a,eList,cand,maxxrt ;
        if n = 1 then
            return 1;
        end if;
        Lexp := ofact(n,2) ;
        a := 0 ;
        for eList in Lexp do
            maxxrt := ListTools[Reverse](eList) ;
            cand := mul( ithprime(i)^ ( op(i,maxxrt)-1),i=1..nops(maxxrt)) ;
            if a =0 or cand < a then
                a := cand ;
            end if;
        end do:
        a ;
    end proc:
    seq(A005179(n),n=1..40) ; # R. J. Mathar, Jun 06 2024
  • Mathematica
    a = Table[ 0, {43} ]; Do[ d = Length[ Divisors[ n ]]; If[ d < 44 && a[[ d ]] == 0, a[[ d]] = n], {n, 1, 1099511627776} ]; a
    (* Second program: *)
    Function[s, Map[Lookup[s, #] &, Range[First@ Complement[Range@ Max@ #, #] - 1]] &@ Keys@ s]@ Map[First, KeySort@ PositionIndex@ Table[DivisorSigma[0, n], {n, 10^7}]] (* Michael De Vlieger, Dec 11 2016, Version 10 *)
    mp[1, m_] := {{}}; mp[n_, 1] := {{}}; mp[n_?PrimeQ, m_] := If[m < n, {}, {{n}}]; mp[n_, m_] := Join @@ Table[Map[Prepend[#, d] &, mp[n/d, d]], {d, Select[Rest[Divisors[n]], # <= m &]}]; mp[n_] := mp[n, n]; Table[mulpar = mp[n] - 1; Min[Table[Product[Prime[s]^mulpar[[j, s]], {s, 1, Length[mulpar[[j]]]}], {j, 1, Length[mulpar]}]], {n, 1, 100}] (* Vaclav Kotesovec, Apr 04 2021 *)
    a[n_] := Module[{e = f[n] - 1}, Min[Times @@@ ((Prime[Range[Length[#], 1, -1]]^#) & /@ e)]]; Array[a, 100] (* Amiram Eldar, Jul 26 2025 using the function f by T. D. Noe at A162247 *)
  • PARI
    (prodR(n,maxf)=my(dfs=divisors(n),a=[],r); for(i=2,#dfs, if( dfs[i]<=maxf, if(dfs[i]==n, a=concat(a,[[n]]), r=prodR(n/dfs[i],min(dfs[i],maxf)); for(j=1,#r, a=concat(a,[concat(dfs[i],r[j])]))))); a); A005179(n)=my(pf=prodR(n,n),a=1,b); for(i=1,#pf, b=prod(j=1,length(pf[i]),prime(j)^(pf[i][j]-1)); if(bA005179(n)", ")) \\ R. J. Mathar, May 26 2008, edited by M. F. Hasler, Oct 11 2014
    
  • Python
    from math import prod
    from sympy import isprime, divisors, prime
    def A005179(n):
        def mult_factors(n):
            if isprime(n):
                return [(n,)]
            c = []
            for d in divisors(n,generator=True):
                if 1Chai Wah Wu, Aug 17 2024

Formula

a(p) = 2^(p-1) for primes p: a(A000040(n)) = A061286(n); a(p^2) = 6^(p-1) for primes p: a(A001248(n)) = A061234(n); a(p*q) = 2^(q-1)*3^(p-1) for primes p<=q: a(A001358(n)) = A096932(n); a(p*m*q) = 2^(q-1) * 3^(m-1) * 5^(p-1) for primes pA005179(A007304(n)) = A061299(n). - Reinhard Zumkeller, Jul 15 2004 [This can be continued to arbitrarily many distinct prime factors since no numbers in A072066 (called "exceptional" or "extraordinary") are squarefree. - Jianing Song, Jul 18 2025]
a(p^n) = (2*3...*p_n)^(p-1) for p > log p_n / log 2. Unpublished proof from Andrzej Schinzel. - Thomas Ordowski, Jul 22 2005
If p is a prime and n=p^k then a(p^k)=(2*3*...*s_k)^(p-1) where (s_k) is the numbers of the form q^(p^j) for every q and j>=0, according to Grost (1968), Theorem 4. For example, if p=2 then a(2^k) is the product of the first k members of the A050376 sequence: number of the form q^(2^j) for j>=0, according to Ramanujan (1915). - Thomas Ordowski, Aug 30 2005
a(2^k) = A037992(k). - Thomas Ordowski, Aug 30 2005
a(n) <= A037019(n) with equality except for n in A072066. - M. F. Hasler, Jun 15 2022

Extensions

More terms from David W. Wilson

A007416 The minimal numbers: sequence A005179 arranged in increasing order.

Original entry on oeis.org

1, 2, 4, 6, 12, 16, 24, 36, 48, 60, 64, 120, 144, 180, 192, 240, 360, 576, 720, 840, 900, 960, 1024, 1260, 1296, 1680, 2520, 2880, 3072, 3600, 4096, 5040, 5184, 6300, 6480, 6720, 7560, 9216, 10080, 12288, 14400, 15120, 15360, 20160, 25200, 25920, 27720, 32400, 36864, 44100
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that there is no x < k such that A000005(x) = A000005(k). - Benoit Cloitre, Apr 28 2002
A047983(a(n)) = 0. - Reinhard Zumkeller, Nov 03 2015
Subsequence of A025487. If some m in A025487 is the first term in that sequence having its number of divisors, m is in this sequence. - David A. Corneth, Aug 31 2019

References

  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 86.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A025487; A002182 is a subsequence.
Cf. A000005, A047983, A166721 (subsequence of squares).
Cf. A053212 and A064787 (the sequence {A000005(a(n))} and its inverse permutation).

Programs

  • Haskell
    a007416 n = a007416_list !! (n-1)
    a007416_list = f 1 [] where
       f x ts = if tau `elem` ts then f (x + 1) ts else x : f (x + 1) (tau:ts)
                where tau = a000005' x
    -- Reinhard Zumkeller, Apr 18 2015
  • Maple
    for n from 1 to 10^5 do
      t:= numtheory:-tau(n);
      if not assigned(B[t]) then B[t]:= n fi;
    od:
    sort(map(op,[entries(B)]));# Robert Israel, Nov 11 2015
  • Mathematica
    A007416 = Reap[ For[ s = 1, s <= 10^5, s++, If[ Abs[ Product[ DivisorSigma[0, i] - DivisorSigma[0, s], {i, 1, s-1}]] > 0, Print[s]; Sow[s]]]][[2, 1]] (* Jean-François Alcover, Nov 19 2012, after Pari *)
  • PARI
    for(s=1,10^6,if(abs(prod(i=1,s-1,numdiv(i)-numdiv(s)))>0,print1(s,",")))
    
  • PARI
    is(n)=my(d=numdiv(n));for(i=1,n-1,if(numdiv(i)==d, return(0))); 1 \\ Charles R Greathouse IV, Feb 20 2013
    
  • PARI
    A283980(n,f=factor(n))=prod(i=1, #f~, my(p=f[i, 1]); if(p==2, 6, nextprime(p+1))^f[i, 2])
    A025487do(e) = my(v=List([1, 2]), i=2, u = 2^e, t); while(v[i] != u, if(2*v[i] <= u, listput(v, 2*v[i]); t = A283980(v[i]); if(t <= u, listput(v, t))); i++); Set(v)
    winnow(v,lim=v[#v])=my(m=Map(),u=List()); for(i=1,#v, if(v[i]>lim, break); my(t=numdiv(v[i])); if(!mapisdefined(m,t), mapput(m,t,0); listput(u,v[i]))); m=0; Vec(u)
    list(lim)=winnow(A025487do(logint(lim\1-1,2)+1),lim) \\ Charles R Greathouse IV, Nov 17 2022
    

A009775 Exponential generating function is tanh(log(1+x)).

Original entry on oeis.org

0, 1, -1, 0, 6, -30, 90, 0, -2520, 22680, -113400, 0, 7484400, -97297200, 681080400, 0, -81729648000, 1389404016000, -12504636144000, 0, 2375880867360000, -49893498214560000, 548828480360160000, 0, -151476660579404160000
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(0) = 0, a(4n+3) = 0, a(n) = (-1)^[n == 2, 5, 8 mod 8] * n!/2^floor(n/2). - Ralf Stephan, Mar 06 2004
From Peter Bala, Nov 25 2011: (Start)
(1): a(n) = i*n!/2^(n+1)*{(i-1)^(n+1)-(-1-i)^(n+1)} for n>=1.
The function tanh(log(1+x)) is a disguised form of the rational function (x^2+2*x)/(x^2+2*x+2). Observe that
(2): (x^2+2*x)/(x^2+2*x+2) = d/dx[x - atan((x^2+2*x)/(2*x+2))].
Hence, with an offset of 1, the egf for this sequence is
(3): x - atan((x^2+2*x)/(2*x+2)) = x^2/2! - x^3/3! + 6*x^5/5!- 30*x^6/6! + 90*x^7/7! - ....
This sequence is closely related to the series reversion of the function E(x)-1, where E(x) = sec(x)+tan(x) is the egf for the sequence of zigzag numbers A000111. Under the change of variable x -> sec(x)+tan(x)-1 the rational function (x^2+2*x)/(2*x+2) transforms to tan(x). Hence atan((x^2+2*x)/(2*x+2)) is the inverse function of sec(x)+tan(x)-1.
Recurrence relation:
(4): 2*a(n)+2*n*a(n-1)+n*(n-1)*a(n-2) = 0 with a(1) = 1, a(2) = -1.
(End)

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997

A046979 Denominators of Taylor series for exp(x)*sin(x).

Original entry on oeis.org

1, 1, 1, 3, 1, 30, 90, 630, 1, 22680, 113400, 1247400, 1, 97297200, 681080400, 10216206000, 1, 1389404016000, 12504636144000, 237588086736000, 1, 49893498214560000, 548828480360160000, 12623055048283680000, 1, 3786916514485104000000, 49229914688306352000000
Offset: 0

Views

Author

Keywords

Examples

			1*x + 1*x^2 + 1/3*x^3 - 1/30*x^5 - 1/90*x^6 - 1/630*x^7 + 1/22680*x^9 + 1/113400*x^10 + ...
		

References

  • G. W. Caunt, Infinitesimal Calculus, Oxford Univ. Press, 1914, p. 477.

Crossrefs

Essentially the same as absolute values of A007415.

Programs

  • Maple
    a:= n-> denom(coeff(series(sin(x)/exp(x), x, n+1), x, n)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 17 2017
  • Mathematica
    Denominator[CoefficientList[Series[Exp[x]Sin[x],{x,0,30}],x] ] (* Harvey P. Dale, Feb 14 2015 *)
  • PARI
    a(n) = if (n % 4, n!/2^floor(n/2), 1); \\ Michel Marcus, Oct 12 2015

Formula

a(4n) = 1, a(n) = n!/2^floor(n/2).

A046981 Denominators of Taylor series for exp(x)*cos(x).

Original entry on oeis.org

1, 1, 1, 3, 6, 30, 1, 630, 2520, 22680, 1, 1247400, 7484400, 97297200, 1, 10216206000, 81729648000, 1389404016000, 1, 237588086736000, 2375880867360000, 49893498214560000, 1, 12623055048283680000, 151476660579404160000, 3786916514485104000000
Offset: 0

Views

Author

Keywords

Examples

			1+1*x-1/3*x^3-1/6*x^4-1/30*x^5+1/630*x^7+1/2520*x^8+1/22680*x^9-...
		

References

  • G. W. Caunt, Infinitesimal Calculus, Oxford Univ. Press, 1914, p. 477.

Crossrefs

Absolute values are essentially the same as A007452.

Programs

  • Mathematica
    Denominator/@CoefficientList[Series[Exp[x]Cos[x],{x,0,30}],x] (* Harvey P. Dale, Jun 28 2011 *)

Formula

a(4n+2) = 1, a(n) = n!/2^[n/2].

A007452 Expand cos x / exp x and invert nonzero coefficients.

Original entry on oeis.org

1, -1, 0, 3, -6, 30, 0, -630, 2520, -22680, 0, 1247400, -7484400, 97297200, 0, -10216206000, 81729648000, -1389404016000, 0, 237588086736000, -2375880867360000, 49893498214560000, 0, -12623055048283680000
Offset: 0

Views

Author

Keywords

Crossrefs

Absolute values are essentially the same as A046981, where zeros are replaced by ones.

Formula

a(4n+2) = 0, a(n) = (-1)^[n == 1, 4, 7 mod 8] * n!/2^floor(n/2). - Ralf Stephan, Mar 06 2004

A090932 a(n) = n! / 2^floor(n/2).

Original entry on oeis.org

1, 1, 1, 3, 6, 30, 90, 630, 2520, 22680, 113400, 1247400, 7484400, 97297200, 681080400, 10216206000, 81729648000, 1389404016000, 12504636144000, 237588086736000, 2375880867360000, 49893498214560000, 548828480360160000, 12623055048283680000, 151476660579404160000
Offset: 0

Views

Author

Jon Perry, Feb 26 2004

Keywords

Comments

Number of permutations of the n-th row of Pascal's triangle.
Can be seen as the multiplicative equivalent to the generalized pentagonal numbers. - Peter Luschny, Oct 13 2012
a(n) is the number of permutations of [n] in which all ascents start at an even position. For example, a(3) = 3 counts 213, 312, 321. - David Callan, Nov 25 2021

Examples

			From _Rigoberto Florez_, Apr 07 2017: (Start)
a(5) = 5!/2^2 = 120/4 = 30.
a(6) = 6!/2^3 = 1*6*15 = 90.
a(7) = 7!/2^3 = 3*10*21 = 630. (End)
		

Crossrefs

The function appears in several expansions: A009775, A046979, A046981, A007415, A007452.

Programs

  • Magma
    [Factorial(n) / 2^Floor(n/2): n in [0..25]]; // Vincenzo Librandi, May 14 2011
    
  • Maple
    a:= n-> n!/2^floor(n/2): seq(a(n), n=0..40);
  • Mathematica
    Table[n!/2^Floor[n/2], {n, 0, 21}] (* Michael De Vlieger, Jul 25 2016 *)
    nxt[{n_,a_,b_}]:={n+1,b,a Binomial[n,2]}; NestList[nxt,{2,1,1},30][[All,2]] (* Harvey P. Dale, Aug 26 2022 *)
  • PARI
    a(n)=n!/2^floor(n/2)
    
  • Python
    from math import factorial
    def A090932(n): return factorial(n)>>(n>>1) # Chai Wah Wu, Jan 18 2023
  • Sage
    @CachedFunction
    def A090932(n):
        if n == 0 : return 1
        fact = n//2 if is_even(n) else n
        return fact * A090932(n-1)
    [A090932(n) for n in (0..21)] # Peter Luschny, Oct 13 2012
    

Formula

a(n) = binomial(n-1, 2) * a(n-2).
E.g.f.: (1+x)/(1-1/2*x^2).
E.g.f.: G(0) where G(k) = 1 + x/(1 - x/(x + 2/G(k+1) )) ; (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 27 2012
G.f.: G(0), where G(k)= 1 + (2*k+1)*x/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 28 2013
a(n) = (n+1)!/A093968(n+1). - Anton Zakharov, Jul 25 2016
a(n) ~ sqrt(2*Pi*n)*exp(-n)*n^n/2^floor(n/2). - Ilya Gutkovskiy, Jul 25 2016
From Rigoberto Florez, Apr 07 2017: (Start)
if n=2k, n! / 2^k = t(1)t(3)t(5)...t(2k-1),
if n=2k+1, n! / 2^k = t(2)t(4)t(6)...t(2k),
if n=2k, n! / 2^k = (t(k)-t(0))*(t(k)-t(1))*...*(t(k)-t(k-1)),
with t(i)= i-th triangular number. (End)
From Amiram Eldar, Feb 25 2022: (Start)
Sum_{n>=0} 1/a(n) = cosh(sqrt(2)) + sinh(sqrt(2))/sqrt(2).
Sum_{n>=0} (-1)^n/a(n) = cosh(sqrt(2)) - sinh(sqrt(2))/sqrt(2). (End)

Extensions

Edited by Ralf Stephan, Sep 07 2004
Showing 1-7 of 7 results.