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

A003238 Number of rooted trees with n vertices in which vertices at the same level have the same degree.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 11, 16, 19, 26, 27, 40, 41, 53, 61, 77, 78, 104, 105, 134, 147, 175, 176, 227, 233, 275, 294, 350, 351, 438, 439, 516, 545, 624, 640, 774, 775, 881, 924, 1069, 1070, 1265, 1266, 1444, 1521, 1698, 1699
Offset: 1

Views

Author

Keywords

Comments

Also, number of sequences of positive integers b_1, b_2, ..., b_k such that 1 + b_1*(1 + b_2*(...(1 + b_k) ... )) = n. If you take mu(b_1)*mu(b_2)*...*mu(b_k) for each sequence you get 1's 0's and -1's. Add them up and you get the terms for A007554. - Christian G. Bower, Oct 15 1998
Note that this applies also to planar rooted trees and other similar objects (mountain ranges, parenthesizations) encoded by A014486. - Antti Karttunen, Sep 07 2000
Equals sum of (n-1)-th row terms of triangle A152434. - Gary W. Adamson, Dec 04 2008
Equals the eigensequence of A051731, the inverse binomial transform. - Gary W. Adamson, Dec 26 2008
From Emeric Deutsch, Aug 18 2012: (Start)
The considered rooted trees are called generalized Bethe trees; in the Goldberg-Livshitz reference they are called uniform trees.
Also, a(n) = number of partitions of n-1 in which each part is divisible by the next. Example: a(5)=5 because we have 4, 31, 22, 211, and 1111.
There is a simple bijection between generalized Bethe trees with n+1 vertices and partitions of n in which each part is divisible by the next (the parts are given by the number of edges at the successive levels). We have the correspondences: number of edges --- sum of parts; root degree --- last part; number of leaves --- first part; height --- number of parts. (End)
a(n+1) = a(n) + 1 if and only if n is prime. - Jon Perry, Nov 24 2012
According to the MathOverflow link, log(a(n)) ~ log(4)*log(n)^2, and a more precise asymptotic expansion is similar to that of A018819 and hence A000123, so the conjecture in the Formula section is partly correct. - Andrey Zabolotskiy, Jan 22 2017

Examples

			a(4) = 3 because we have the path P(4), the tree Y, and the star \|/ . - _Emeric Deutsch_, Aug 18 2012
The planted achiral trees with up to 7 nodes are:
 1  -
 1  (-)
 2  (--),     ((-))
 3  (---),    ((--)),      (((-)))
 5  (----),   ((-)(-)),    ((---)),    (((--))),     ((((-))))
 6  (-----),  ((----)),    (((-)(-))), (((---))),    ((((--)))), (((((-)))))
10 (------), ((-)(-)(-)), ((--)(--)), (((-))((-))), ((-----)),  (((----))), ((((-)(-)))), ((((---)))), (((((--))))), ((((((-)))))). - _Gus Wiseman_, Jan 12 2017
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A122934 (offset by 1).

Programs

  • Haskell
    a003238 n = a003238_list !! (n-1)
    a003238_list = 1 : f 1 where
       f x = (sum (map a003238 $ a027750_row x)) : f (x + 1)
    -- Reinhard Zumkeller, Dec 20 2014
    
  • JavaScript
    a = new Array();
    for (i = 1; i < 50; i++) a[i] = 1;
    for (i = 3; i < 50; i++) for (j = 2; j < i; j++) if (i % j == 1) a[i] += a[j];
    document.write(a + "
    "); // Jon Perry, Nov 20 2012
  • Maple
    with(numtheory): aa := proc (n) if n = 0 then 1 else add(aa(divisors(n)[i]-1), i = 1 .. tau(n)) end if end proc: a := proc (n) options operator, arrow: aa(n-1) end proc: seq(a(n), n = 1 .. 48); # Emeric Deutsch, Aug 18 2012
    A003238:= proc(n) option remember; uses numtheory; add(A003238(m),m=divisors(n-1)) end proc;
    A003238(1):= 1;
    [seq(A003238(n),n=1..48)]; # Robert Israel, Mar 10 2014
  • Mathematica
    (* b = A068336 *) b[1] = 1; b[n_] := b[n] = 1 + Sum[b[k], {k, Divisors[n-1]}]; a[n_] := b[n]/2; a[1] = 1; Table[ a[n], {n, 1, 48}] (* Jean-François Alcover, Dec 20 2011, after Ralf Stephan *)
    achi[n_]:=If[n===1,1,Total[achi/@Divisors[n-1]]];Array[achi,50] (* Gus Wiseman, Jan 12 2017 *)
  • PARI
    seq(n) = {my(v=vector(n)); v[1]=1; for(i=2, n, v[i]=sumdiv(i-1, d, v[d])); v} \\ Andrew Howroyd, Jun 08 2025

Formula

Shifts one place left under inverse Moebius transform: a(n+1) = Sum_{k|n} a(k).
Conjecture: log(a(n)) is asymptotic to c*log(n)^2 where 0.4 < c < 0.5 - Benoit Cloitre, Apr 13 2004
For n > 1, a(n) = (1/2) * A068336(n) and Sum_{k = 1..n} a(k) = A003318(n). - Ralf Stephan, Mar 27 2004
Generating function P(x) for the sequence with offset 2 obeys P(x) = x^2*(1 + Sum_{n >= 1} P(x^n)/x^n). [Harary & Robinson]. - R. J. Mathar, Sep 28 2011
a(n) = 1 + sum of a(i) such that n == 1 (mod i). - Jon Perry, Nov 20 2012
From Ilya Gutkovskiy, Apr 28 2019: (Start)
G.f.: x * (1 + Sum_{n>=1} a(n)*x^n/(1 - x^n)).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n)/n)) = Sum_{n>=1} a(n+1)*x^n/n. (End)

Extensions

Description improved by Christian G. Bower, Oct 15 1998

A038046 Shifts left under transform T where Ta is (identity) DCONV a.

Original entry on oeis.org

1, 1, 3, 6, 12, 17, 32, 39, 63, 81, 120, 131, 213, 226, 311, 377, 503, 520, 742, 761, 1031, 1169, 1442, 1465, 2008, 2093, 2558, 2801, 3465, 3494, 4591, 4622, 5628, 6054, 7111, 7390, 9321, 9358, 10899, 11616, 13873, 13914, 17070, 17113, 20063, 21509, 24462
Offset: 1

Views

Author

Keywords

Comments

Eigensequence of triangle A126988. (i.e. the sequence shifts upon multiplication from the left by triangle A126988). - Gary W. Adamson, Apr 27 2009
Number of planted achiral trees with a distinguished leaf. - Gus Wiseman, Jul 31 2018

Examples

			From _Gus Wiseman_, Jul 31 2018: (Start)
The a(5) = 12 planted achiral trees with a distinguished leaf:
  (Oooo), (oOoo), (ooOo), (oooO),
  ((O)(o)), ((o)(O)),
  ((Ooo)), ((oOo)), ((ooO)),
  (((Oo))), (((oO))),
  ((((O)))).
(End)
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n, (m-> m*
          add(a(d)/d, d=numtheory[divisors](m)))(n-1))
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 09 2019
  • Mathematica
    a[n_]:=If[n==1,1,Sum[d*a[(n-1)/d],{d,Divisors[n-1]}]];
    Array[a,30] (* Gus Wiseman, Jul 31 2018 *)

Formula

a(1) = 1; a(n > 1) = Sum_{d|(n-1)} d * a((n-1)/d). - Gus Wiseman, Jul 31 2018
G.f. A(x) satisfies: A(x) = x * (1 + Sum_{j>=1} j*A(x^j)). - Ilya Gutkovskiy, May 09 2019

A007557 Shifts left when inverse Moebius transform applied twice.

Original entry on oeis.org

1, 1, 3, 5, 10, 12, 24, 26, 43, 52, 78, 80, 133, 135, 189, 219, 295, 297, 428, 430, 584, 642, 804, 806, 1100, 1123, 1395, 1494, 1856, 1858, 2428, 2430, 2977, 3143, 3739, 3811, 4790, 4792, 5654, 5930, 7072, 7074, 8656
Offset: 1

Views

Author

Keywords

Comments

Equals eigensequence of triangle A127170 (the square of the inverse Mobius transform). - Gary W. Adamson, Apr 27 2009

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Sum[ DivisorSigma[0, (n - 1)/d]*a[d], {d, Divisors[n - 1]}]; a[1] = 1; Table[a[n], {n, 1, 43}] (* Jean-François Alcover, Dec 12 2011, after Vladeta Jovovic *)

Formula

a(n+1) = Sum_{d divides n} tau(n/d)*a(d). - Vladeta Jovovic, Jan 24 2003
From Ilya Gutkovskiy, Apr 30 2019: (Start)
G.f. A(x) satisfies: A(x) = x * (1 + Sum_{i>=1} Sum_{j>=1} A(x^(i*j))).
G.f.: A(x) = Sum_{n>=1} a(n)*x^n = x * (1 + Sum_{i>=1} Sum_{j>=1} a(i)*x^(i*j)/(1 - x^(i*j))). (End)

Extensions

More terms from Vladeta Jovovic, Jan 24 2003

A318583 a(1) = a(2) = 1; for n > 2, a(n+2) = Sum_{d|n} mu(n/d)*a(d).

Original entry on oeis.org

1, 1, 1, 0, 0, -1, -1, -2, -2, -2, -3, -2, -4, 0, -5, 1, -5, 3, -6, 7, -7, 10, -6, 13, -7, 17, -7, 21, -5, 22, -6, 31, -7, 30, -4, 35, -2, 33, -3, 39, 1, 34, 0, 42, -1, 33, 7, 39, 6, 23, 7, 32, 12, 16, 11, 18, 15, -1, 21, 4, 20, -27, 19, -21, 29, -52, 34, -56, 33, -85, 39, -80, 38, -130, 37
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 29 2018

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local k,n,x; x:=[1,1]: for n from 3 to q do
    x:=[op(x),add(mobius((n-2)/k)*x[k],k=divisors(n-2))]; od; op(x); end:
    P(75); # Paolo P. Lava, May 15 2019
  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = Sum[a[d] MoebiusMu[(n - 2)/d], {d, Divisors[n - 2]}]; Table[a[n], {n, 75}]
  • PARI
    A318583(n) = if(n<=2,1,sumdiv(n-2,d,moebius((n-2)/d)*A318583(d))); \\ (A non-memoized implementation) - Antti Karttunen, Aug 29 2018
    
  • PARI
    \\ A faster implementation:
    up_to = 16384;
    A318583list(up_to) = { my(u=vector(up_to)); u[1] = u[2] = 1; for(n=3, up_to, u[n] = sumdiv(n-2,d,moebius((n-2)/d)*u[d])); (u); };
    v318583 = A318583list(up_to);
    A318583(n) = v318583[n]; \\ Antti Karttunen, Aug 29 2018

Formula

G.f.: Sum_{n>=1} a(n+2)*x^n/(1 - x^n).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n+2)/n)) = Sum_{n>=1} a(n)*x^n/n.

A317581 a(1) = 1; a(n > 1) = 1 + Sum_{d|n, d

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 0, 1, 2, 0, -2, 0, 2, 2, 1, 0, -2, 0, -2, 2, 2, 0, 4, 1, 2, 0, -2, 0, -6, 0, 0, 2, 2, 2, 7, 0, 2, 2, 4, 0, -6, 0, -2, -2, 2, 0, -4, 1, -2, 2, -2, 0, 4, 2, 4, 2, 2, 0, 16, 0, 2, -2, 1, 2, -6, 0, -2, 2, -6, 0, -12, 0, 2, -2, -2, 2, -6, 0, -4
Offset: 1

Views

Author

Gus Wiseman, Jul 31 2018

Keywords

Comments

If p is prime, a(p^k) = 0 if k is odd, 1 if k is even. - Robert Israel, Aug 01 2018

Crossrefs

Programs

  • Maple
    f:= n -> 1 + add(numtheory:-mobius(n/d)*procname(d),d=numtheory:-divisors(n) minus {n}):
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Aug 01 2018
  • Mathematica
    a[n_]:=1+Sum[MoebiusMu[n/d]*a[d],{d,Most[Divisors[n]]}];
    Array[a,100]
  • Python
    from sympy import mobius, divisors
    def A317581(n): return 1 + (0 if n == 1 else sum(mobius(n//d)*A317581(d) for d in divisors(n,generator=True) if d < n)) # Chai Wah Wu, Jan 14 2022

A343188 a(1) = a(2) = a(3) = 1; a(n+3) = Sum_{d|n} mu(n/d) * a(d).

Original entry on oeis.org

1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -2, -2, -1, -3, -2, -2, -3, -2, -1, -4, 0, -2, -3, 0, 0, -4, 4, 0, -3, 5, 3, -4, 9, 2, -2, 11, 5, -1, 15, 4, 0, 16, 10, -1, 20, 9, 1, 24, 12, 0, 25, 12, 1, 28, 16, 0, 25, 19, 2, 26, 22, 1, 26, 21, -2, 28, 25, 0, 20, 24, -2, 23, 30, -3, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = a[2] = a[3] = 1; a[n_] := a[n] = Sum[MoebiusMu[(n - 3)/d] a[d], {d, Divisors[n - 3]}]; Table[a[n], {n, 75}]

A343189 a(1) = ... = a(4) = 1; a(n+4) = Sum_{d|n} mu(n/d) * a(d).

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -1, -2, -2, -3, -1, -3, -1, -4, 0, -3, 0, -5, 2, -4, 1, -5, 4, -5, 6, -6, 5, -4, 8, -6, 8, -5, 11, -5, 10, -6, 17, -6, 11, -3, 21, -7, 12, -3, 26, -5, 12, -4, 33, -4, 11, -1, 37, -5, 11, -2, 42, -1, 7, -1, 48, -2, 1, 3, 58, -3
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = a[2] = a[3] = a[4] = 1; a[n_] := a[n] = Sum[MoebiusMu[(n - 4)/d] a[d], {d, Divisors[n - 4]}]; Table[a[n], {n, 75}]

A343190 a(1) = ... = a(5) = 1; a(n+5) = Sum_{d|n} mu(n/d) * a(d).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -2, -2, -1, -2, -1, -3, -2, -2, -2, -1, -3, -3, 0, -3, 0, -3, -2, -1, -1, -1, -2, -2, 1, -1, 3, -3, -1, 2, 2, 2, -1, -2, 5, 4, 4, -2, 1, 5, 7, 6, -1, 0, 10, 7, 10, 0, 0, 9, 14, 9, 0, 2, 12, 15, 14, -1, 3, 14, 18
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = a[2] = a[3] = a[4] = a[5] = 1; a[n_] := a[n] = Sum[MoebiusMu[(n - 5)/d] a[d], {d, Divisors[n - 5]}]; Table[a[n], {n, 75}]

A143809 Eigentriangle of the Mobius transform, (A054525).

Original entry on oeis.org

1, -1, 1, -1, 0, 0, 0, -1, 0, -1, -1, 0, 0, 0, -2, 1, -1, 0, 0, 0, -3, -1, 0, 0, 0, 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, 0, -3, 1, -1, 0, 0, 2, 0, 0, 0, 0, -3, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, 3, 0, 0, 0, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, -1, 0, 0, 0
Offset: 1

Views

Author

Gary W. Adamson, Sep 01 2008

Keywords

Comments

The eigentriangle of the Mobius transform may be defined by the operation consisting of the termwise product of A054525 row terms and the first n terms of A007554, where A007554: (1, 1, 0, -1, -2, -3, -3,...) = the eigensequence of A054525.
This triangle has the following properties:
Sum of n-th row terms = rightmost term of next row.
Right border = A007554, the eigensequence of the Mobius transform.
Row sums = A007554 shifted one place to the left: (1, 0, -1, -2, -3,...).
Left border = mu(n), A008683.
A054525 = the Mobius transform and A007554 = the eigensequence of A054525.

Examples

			First few rows of the triangle:
   1;
  -1,  1;
  -1,  0, 0;
   0, -1, 0, -1;
  -1,  0, 0,  0, -2;
   1, -1, 0,  0,  0, -3;
  -1,  0, 0,  0,  0,  0, -3;
   0,  0, 0,  1,  0,  0,  0, -4;
   0,  0, 0,  0,  0,  0,  0,  0, -3;
   1, -1, 0,  0,  2,  0,  0,  0,  0, -3;
   ...
Row 6 = (1, -1, 0, 0, 0, -3) = termwise product of row 6 of the Mobius transform (1, -1, -1, 0, 0, 1) and the first 6 terms of A007554, (the eigensequence of the Mobius transform): (1, 1, 0, -1, -2, -3).
		

Crossrefs

Formula

Triangle read by rows, A054525 * (A007554 * 0^(n-k)); 1<=k<=n

A346034 a(1) = 1, a(2) = 0; a(n+2) = Sum_{d|n} mu(n/d) * a(d).

Original entry on oeis.org

1, 0, 1, -1, 0, -1, -1, -1, -2, 0, -3, 1, -4, 3, -5, 5, -5, 6, -6, 10, -7, 11, -6, 15, -7, 14, -7, 19, -5, 17, -6, 23, -7, 18, -4, 24, -2, 16, -3, 23, 1, 13, 0, 17, -1, 7, 7, 14, 6, -7, 7, 0, 12, -13, 11, -14, 15, -33, 21, -27, 20, -57, 19, -50, 29, -73, 34, -79, 33, -96
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 01 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[2] = 0; a[n_] := a[n] = Sum[MoebiusMu[(n - 2)/d] a[d], {d, Divisors[n - 2]}]; Table[a[n], {n, 1, 70}]
    nmax = 70; A[] = 0; Do[A[x] = x + x^2 Sum[MoebiusMu[k] A[x^k], {k, 1, nmax}] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x] // Rest

Formula

G.f. A(x) satisfies: A(x) = x + x^2 * Sum_{k>=1} mu(k) * A(x^k).
Showing 1-10 of 11 results. Next