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

A032741 a(0) = 0; for n > 0, a(n) = number of proper divisors of n (divisors of n which are less than n).

Original entry on oeis.org

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

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Number of d < n which divide n.
Call an integer k between 1 and n a "semi-divisor" of n if n leaves a remainder of 1 when divided by k, i.e., n == 1 (mod k). a(n) gives the number of semi-divisors of n+1. - Joseph L. Pe, Sep 11 2002
a(n+1) is also the number of k, 0 <= k <= n-1, such that C(n,k) divides C(n,k+1). - Benoit Cloitre, Oct 17 2002
a(n+1) is also the number of factors of the n-th degree polynomial x^n + x^(n-1) + x^(n-2) + ... + x^2 + x + 1. Example: 1 + x + x^2 + x^3 = (1+x)(1+x^2) implies a(4)=2.
a(n) is also the number of factors of the n-th Fibonacci polynomial. - T. D. Noe, Mar 09 2006
Number of partitions of n into 2 parts with the second dividing the first. - Franklin T. Adams-Watters, Sep 20 2006
Number of partitions of n+1 into exactly one q and at least one q+1. Example: a(12)=5; indeed, we have 13 = 7 + 6 = 5 + 4 + 4 = 4 + 3 + 3 + 3 = 3 + 2 + 2 + 2 + 2 + 2 = 2 + 11*1.
Differences of A002541. - George Beck, Feb 12 2012
For n > 1: number of ones in row n+1 of triangle A051778. - Reinhard Zumkeller, Dec 03 2014
For n > 0, a(n) is the number of strong divisors of n. - Omar E. Pol, May 03 2015
a(n) is also the number of factors of the (n-1)-th degree polynomial ((x+1)^n-1)/x. Example: for n=6, ((x+1)^6-1)/x = x^5 + 6*x^4 + 15*x^3 + 20*x^2 + 15*x + 6 = (2+x)(1+x+x^2)(3+3x+x^2) implies a(6)=3. - Federico Provvedi, Oct 09 2018
Consider the polynomial P(n,z) = Sum_{i=1..q} d(i)*z^(i-1) where d(1), d(2), ..., d(q) are are the q ordered divisors of n. The sequence lists the numbers of zeros of P(n,z) strictly inside the unit circle. - Michel Lagneau, Apr 06 2025

Examples

			a(6) = 3 since the proper divisors of 6 are 1, 2, 3.
		

References

  • André Weil, Number Theory, An approach through history, From Hammurapi to Legendre, Birkhäuser, 1984, page 5.

Crossrefs

Column 2 of A122934.
Cf. A003238, A001065, A027749, A027751 (list of proper divisors).

Programs

  • GAP
    Concatenation([0],List([1..100],n->Tau(n)-1)); # Muniru A Asiru, Oct 09 2018
    
  • Haskell
    a032741 n = if n == 0 then 0 else a000005 n - 1
    -- Reinhard Zumkeller, Jul 31 2014
    
  • Maple
    A032741 := proc(n)
        if n = 0 then
            0 ;
        else
            numtheory[tau](n)-1 ;
        end if;
    end proc: # R. J. Mathar, Feb 03 2013
  • Mathematica
    Prepend[DivisorSigma[0, Range[99]]-1, 0] (* Jayanta Basu, May 25 2013 *)
  • PARI
    a(n) = if(n<1,0,numdiv(n)-1)
    
  • PARI
    {a(n)=polcoeff(2*sum(m=1,n\2+1,sumdiv(m,d,log(1-x^(m/d) +x*O(x^n) )^(2*d)/(2*d)!)), n)} \\ Paul D. Hanna, Aug 21 2014
    
  • Python
    from sympy import divisor_count
    def A032741(n): return divisor_count(n)-1 if n else 0 # Chai Wah Wu, Mar 14 2023

Formula

a(n) = tau(n)-1 = A000005(n)-1. Cf. A039653.
G.f.: Sum_{n>=1} x^(2*n)/(1-x^n). - Michael Somos, Apr 29 2003
G.f.: Sum_{i>=1} (1-x^i+x^(2*i))/(1-x^i). - Jon Perry, Jul 03 2004
a(n) = Sum_{k=1..floor(n/2)} A051731(n-k,k). - Reinhard Zumkeller, Nov 01 2009
G.f.: 2*Sum_{n>=1} Sum_{d|n} log(1 - x^(n/d))^(2*d) / (2*d)!. - Paul D. Hanna, Aug 21 2014
Dirichlet g.f.: zeta(s)*(zeta(s)-1). - Geoffrey Critzer, Dec 06 2014
a(n) = Sum_{k=1..n-1} binomial((n-1) mod k, k-1). - Wesley Ivan Hurt, Sep 26 2016
a(n) = Sum_{i=1..n-1} floor(n/i)-floor((n-1)/i). - Wesley Ivan Hurt, Nov 15 2017
a(n) = Sum_{i=1..n-1} 1-sign(i mod (n-i)). - Wesley Ivan Hurt, Sep 27 2018
Sum_{k=1..n} a(k) ~ n*log(n) + 2*(gamma - 1)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022

Extensions

Typos in definition corrected by Omar E. Pol, Dec 13 2008

A025527 a(n) = n!/lcm{1,2,...,n} = (n-1)!/lcm{C(n-1,0), C(n-1,1), ..., C(n-1,n-1)}.

Original entry on oeis.org

1, 1, 1, 2, 2, 12, 12, 48, 144, 1440, 1440, 17280, 17280, 241920, 3628800, 29030400, 29030400, 522547200, 522547200, 10450944000, 219469824000, 4828336128000, 4828336128000, 115880067072000, 579400335360000, 15064408719360000
Offset: 1

Views

Author

Clark Kimberling, Dec 11 1999

Keywords

Comments

a(n) = a(n-1) iff n is prime. Thus a(1)=a(2)=a(3)=1 is the only triple in this sequence. - Franz Vrabec, Sep 10 2005
a(k) = a(k+1) for k in A006093. - Lekraj Beedassy, Aug 03 2006
Partial products of A048671. - Peter Luschny, Sep 09 2009

Examples

			a(5) = 2 as 5!/lcm(1..5) = 120/60 = 2.
		

Crossrefs

Programs

Formula

a(n) = A000142(n)/A003418(n) = A000254(n)/A025529(n). - Franz Vrabec, Sep 13 2005
log a(n) = n log n - 2n + O(n/log^4 n). (The error term can be improved. On the Riemann Hypothesis it is O(n^k) for any k > 1/2.) - Charles R Greathouse IV, Oct 16 2012
a(n) = A205957(n), 1 <= n <= 11. - Daniel Forgues, Apr 22 2014
Conjecture: a(A006093(n)) = phi(A000142(A006093(n))) / phi(A003418(A006093(n))), where phi is the Euler totient function. - Fred Daniel Kline, Jun 03 2017

A027749 Take the list 1,2,3,4,... and replace each n with all d > 1 that divide n.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 2, 3, 6, 7, 2, 4, 8, 3, 9, 2, 5, 10, 11, 2, 3, 4, 6, 12, 13, 2, 7, 14, 3, 5, 15, 2, 4, 8, 16, 17, 2, 3, 6, 9, 18, 19, 2, 4, 5, 10, 20, 3, 7, 21, 2, 11, 22, 23, 2, 3, 4, 6, 8, 12, 24, 5, 25, 2, 13, 26, 3, 9, 27, 2, 4, 7, 14, 28, 29, 2, 3, 5, 6, 10, 15, 30, 31, 2, 4, 8, 16, 32, 3, 11, 33, 2, 17, 34, 5, 7, 35
Offset: 1

Views

Author

Keywords

Comments

a(A002541(n)+1)=n; a(A002541(n)+2)=A020639(n+1). - Reinhard Zumkeller, Nov 22 2003
Seen as a triangle read by rows: T(1,1)=1 and T(n,k)=A027750(n,k+1) for n>1, 1<=k<A000005(n). - Reinhard Zumkeller, Oct 01 2012

Crossrefs

Programs

  • Haskell
    a027749 n k = a027749_tabf !! (n-1) !! (k-1)
    a027749_row n = a027749_tabf !! n
    a027749_tabf = [1] : map tail (tail a027750_tabf)
    -- Reinhard Zumkeller, Oct 01 2012, Oct 19 2011, Jul 11 2011
  • Mathematica
    Join[{1},Flatten[Rest[Divisors[#]]&/@Range[40]]] (* Harvey P. Dale, Jun 28 2011 *)

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)
Keyword tabf added by Reinhard Zumkeller, Oct 01 2012

A320222 Number of unlabeled rooted trees with n nodes in which the non-leaf branches directly under any given node are all equal.

Original entry on oeis.org

1, 1, 2, 4, 9, 18, 39, 78, 161, 324, 658, 1316, 2657, 5314, 10668, 21347, 42777, 85554, 171290, 342580, 685498, 1371037, 2742733, 5485466, 10972351, 21944711, 43892080, 87784323, 175574004, 351148008, 702307038, 1404614076, 2809249582, 5618499824, 11237042426
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2018

Keywords

Comments

This is a weaker condition than achirality (cf. A003238).

Examples

			The a(1) = 1 through a(6) = 18 rooted trees:
  o  (o)  (oo)   (ooo)    (oooo)     (ooooo)
          ((o))  ((oo))   ((ooo))    ((oooo))
                 (o(o))   (o(oo))    (o(ooo))
                 (((o)))  (oo(o))    (oo(oo))
                          (((oo)))   (ooo(o))
                          ((o)(o))   (((ooo)))
                          ((o(o)))   ((o(oo)))
                          (o((o)))   ((oo(o)))
                          ((((o))))  (o((oo)))
                                     (o(o)(o))
                                     (o(o(o)))
                                     (oo((o)))
                                     ((((oo))))
                                     (((o)(o)))
                                     (((o(o))))
                                     ((o((o))))
                                     (o(((o))))
                                     (((((o)))))
		

Crossrefs

Programs

  • Mathematica
    saue[n_]:=Sum[If[SameQ@@DeleteCases[ptn,1],If[DeleteCases[ptn,1]=={},1,saue[DeleteCases[ptn,1][[1]]]],0],{ptn,IntegerPartitions[n-1]}];
    Table[saue[n],{n,15}]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + sum(k=2, n-1, (n-1)\k*v[k])); v} \\ Andrew Howroyd, Oct 26 2018

Formula

a(n) = 1 + Sum_{k = 2..n-1} floor((n-1)/k) * a(k).
a(n) ~ c * 2^n, where c = 0.3270422384018894564479397100499014525700668391191792769625407295138546463... - Vaclav Kotesovec, Sep 07 2019

A320230 Matula-Goebel numbers of rooted trees in which the non-leaf branches directly under any given node are all equal.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 34, 36, 37, 38, 40, 41, 43, 44, 46, 48, 49, 50, 52, 53, 54, 56, 58, 59, 61, 62, 64, 67, 68, 71, 72, 74, 76, 79, 80, 81, 82, 83, 86, 88, 89, 92, 96, 97
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2018

Keywords

Comments

A number is in the sequence iff it belongs to A070776 and its prime indices already belong to the sequence. A prime index of n is a number m such that prime(m) divides n.

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    smakQ[n_]:=And[SameQ@@DeleteCases[primeMS[n],1],And@@smakQ/@DeleteCases[primeMS[n],1]];Select[Range[100],smakQ[#]&]
  • PARI
    is(n) = while((n>>=valuation(n,2)) > 1, isprimepower(n,&n) || return(0); n=primepi(n)); 1; \\ Kevin Ryde, Apr 04 2021

A320269 Matula-Goebel numbers of lone-child-avoiding rooted trees in which the non-leaf branches directly under any given node are all equal (semi-achirality).

Original entry on oeis.org

1, 4, 8, 14, 16, 28, 32, 38, 49, 56, 64, 76, 86, 98, 106, 112, 128, 152, 172, 196, 212, 214, 224, 256, 262, 304, 326, 343, 344, 361, 392, 424, 428, 448, 454, 512, 524, 526, 608, 622, 652, 686, 688, 722, 766, 784, 848, 856, 886, 896, 908, 1024, 1042, 1048, 1052
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2018

Keywords

Comments

First differs from A331871 in lacking 1589.
Lone-child-avoiding means there are no unary branchings.
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.

Examples

			The sequence of rooted trees together with their Matula-Goebel numbers begins:
    1: o
    4: (oo)
    8: (ooo)
   14: (o(oo))
   16: (oooo)
   28: (oo(oo))
   32: (ooooo)
   38: (o(ooo))
   49: ((oo)(oo))
   56: (ooo(oo))
   64: (oooooo)
   76: (oo(ooo))
   86: (o(o(oo)))
   98: (o(oo)(oo))
  106: (o(oooo))
  112: (oooo(oo))
  128: (ooooooo)
  152: (ooo(ooo))
  172: (oo(o(oo)))
  196: (oo(oo)(oo))
		

Crossrefs

The same-tree version is A291441.
Not requiring lone-child-avoidance gives A320230.
The enumeration of these trees by vertices is A320268.
The semi-lone-child-avoiding version is A331936.
If the non-leaf branches are all different instead of equal we get A331965.
The fully-achiral case is A331967.
Achiral rooted trees are counted by A003238.
MG-numbers of lone-child-avoiding rooted trees are A291636.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    hmakQ[n_]:=And[!PrimeQ[n],SameQ@@DeleteCases[primeMS[n],1],And@@hmakQ/@primeMS[n]];Select[Range[1000],hmakQ[#]&]

Extensions

Updated with corrected terminology by Gus Wiseman, Feb 06 2020

A003988 Triangle with subscripts (1,1),(2,1),(1,2),(3,1),(2,2),(1,3), etc. in which entry (i,j) is [ i/j ].

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 1, 0, 0, 5, 2, 1, 0, 0, 6, 2, 1, 0, 0, 0, 7, 3, 1, 1, 0, 0, 0, 8, 3, 2, 1, 0, 0, 0, 0, 9, 4, 2, 1, 1, 0, 0, 0, 0, 10, 4, 2, 1, 1, 0, 0, 0, 0, 0, 11, 5, 3, 2, 1, 1, 0, 0, 0, 0, 0, 12, 5, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 13, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 14, 6, 4, 2, 2, 1, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Another version of A010766.

Crossrefs

Row sums are in A006218. Antidiagonal sums are in A002541.

Programs

  • Haskell
    a003988 n k = (n + 1 - k) `div` k
    a003988_row n = zipWith div [n,n-1..1] [1..n]
    a003988_tabl = map a003988_row [1..]
    -- Reinhard Zumkeller, Apr 13 2012
  • Mathematica
    t[n_, k_] := Quotient[n, k]; Table[t[n-k+1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 21 2013 *)

Formula

From Franklin T. Adams-Watters, Jan 28 2006: (Start)
T(n,k) = Sum_{i=1..k} A077049(n,i).
G.f.: (1/(1-x))*Sum_{k>0} x^k*y^k/(1-x^k) = (1/(1-x))*Sum_{k>0} x^k * y / (1 - x^k y) = (1/(1-x)) * Sum_{k>0} x^k * Sum_{d|k} y^d = A(x,y)/(1-x) where A(x,y) is the g.f. of A077049. (End)
T(n,k) = floor((n + 1 - k) / k). - Reinhard Zumkeller, Apr 13 2012

Extensions

More terms from James Sellers

A320268 Number of unlabeled series-reduced rooted trees with n nodes where the non-leaf branches directly under any given node are all equal.

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 6, 9, 16, 26, 44, 70, 119, 189, 314, 506, 830, 1336, 2186, 3522, 5737, 9266, 15047, 24313, 39444, 63759, 103322, 167098, 270616, 437714, 708676, 1146390, 1855582, 3002017, 4858429, 7860454, 12720310, 20580764, 33303260, 53884144, 87190964
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2018

Keywords

Comments

This is a weaker condition than achirality (cf. A167865).
A rooted tree is series-reduced if every non-leaf node has at least two branches.

Examples

			The a(3) = 1 through a(8) = 9 rooted trees:
  (oo)  (ooo)  (oooo)   (ooooo)   (oooooo)    (ooooooo)
               (o(oo))  (o(ooo))  (o(oooo))   (o(ooooo))
                        (oo(oo))  (oo(ooo))   (oo(oooo))
                                  (ooo(oo))   (ooo(ooo))
                                  ((oo)(oo))  (oooo(oo))
                                  (o(o(oo)))  (o(o(ooo)))
                                              (o(oo)(oo))
                                              (o(oo(oo)))
                                              (oo(o(oo)))
		

Crossrefs

Programs

  • Mathematica
    saum[n_]:=Sum[If[DeleteCases[ptn,1]=={},1,saum[DeleteCases[ptn,1][[1]]]],{ptn,Select[IntegerPartitions[n-1],And[Length[#]!=1,SameQ@@DeleteCases[#,1]]&]}];
    Array[saum,20]
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(n=3, n, v[n] = 1 + sum(k=2, n-2, (n-1)\k*v[k])); v} \\ Andrew Howroyd, Oct 26 2018

Formula

a(1) = 1; a(2) = 0; a(n > 2) = 1 + Sum_{k = 2..n-2} floor((n-1)/k) * a(k).

A320224 a(1) = 1; a(n > 1) = Sum_{k = 1..n-1} Sum_{d|k, d < k} a(d).

Original entry on oeis.org

1, 0, 1, 2, 3, 4, 6, 7, 10, 12, 16, 17, 25, 26, 33, 38, 48, 49, 65, 66, 84, 92, 109, 110, 142, 146, 172, 184, 219, 220, 274, 275, 323, 341, 390, 400, 484, 485, 551, 578, 669, 670, 792, 793, 904, 952, 1062, 1063, 1243, 1250, 1408, 1458, 1632, 1633, 1870, 1890
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2018

Keywords

Crossrefs

Programs

  • Magma
    sol:=[1]; for n in [2..56] do Append(~sol, &+[sol[d]*Floor((n-1)/d-1):d in [1..n-1]]); end for; sol; // Marius A. Burtea, Sep 07 2019
    
  • Mathematica
    sau[n_]:=If[n==1,1,Sum[sau[d],{k,n-1},{d,Most[Divisors[k]]}]];
    Table[sau[n],{n,60}]
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(n=2, #v, v[n]=sum(k=1, n-1, v[k]*((n-1)\k - 1))); v} \\ Andrew Howroyd, Sep 07 2019

Formula

a(1) = 1; a(n > 1) = Sum_{d = 1..n-1} a(d) * floor((n-1)/d - 1).
G.f. A(x) satisfies A(x) = x + (x/(1 - x)) * Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, Sep 06 2019

A344551 a(n) = Sum_{k=1..n} k^floor((n-k)/k).

Original entry on oeis.org

1, 2, 3, 5, 6, 11, 12, 20, 27, 40, 41, 93, 94, 133, 208, 328, 329, 658, 659, 1217, 1746, 2269, 2270, 5768, 6269, 8330, 12777, 20253, 20254, 45253, 45254, 74390, 113867, 146652, 161211, 401275, 401276, 532367, 886818, 1412574, 1412575, 3053234, 3053235, 4889475, 8396664
Offset: 1

Views

Author

Wesley Ivan Hurt, May 22 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[k^Floor[(n - k)/k], {k, n}], {n, 80}]
  • PARI
    a(n) = sum(k=1, n, k^(n\k-1)); \\ Seiichi Manyama, Jun 06 2021
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1-k*x^k))/(1-x)) \\ Seiichi Manyama, Jun 06 2021

Formula

a(n) ~ 3^((n - 3 - mod(n,3))/3). - Vaclav Kotesovec, May 28 2021
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 - k*x^k). - Seiichi Manyama, Jun 06 2021
Showing 1-10 of 42 results. Next