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

A003095 a(n) = a(n-1)^2 + 1 for n >= 1, with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 5, 26, 677, 458330, 210066388901, 44127887745906175987802, 1947270476915296449559703445493848930452791205, 3791862310265926082868235028027893277370233152247388584761734150717768254410341175325352026
Offset: 0

Views

Author

Keywords

Comments

Number of binary trees of height less than or equal to n. [Corrected by Orson R. L. Peters, Jan 03 2020]
The rightmost digits cycle (0,1,2,5,6,7,0,1,2,5,6,7,...). - Jonathan Vos Post, Jul 21 2005
Apart from the initial term, a subsequence of A008318. - Reinhard Zumkeller, Jan 17 2008
Partial sums of A001699. - Jonathan Vos Post, Feb 17 2010
Corresponds to the second and second last diagonals of A119687. - John M. Campbell, Jul 25 2011
This is a divisibility sequence. - Michael Somos, Jan 01 2013
Sum_{n>=1} 1/a(n) = 1.739940825174794649210636285335916041018367182486941... . - Vaclav Kotesovec, Jan 30 2015
From Vladimir Vesic, Oct 03 2015: (Start)
Forming Herbrand's domains of formula: (∃x)(∀y)(∀z)(∃k)(P(x)∨Q(y)∧R(k))
where: x->a
k->f(y,z)
we get:
H0 = {a}
H1 = {a, f(a,a)}
H2 = {a, f(a,a), f(a,f(a,a)), f(f(a,a),a), f(f(a,a),f(a,a))}
...
The number of elements in each domain follows this sequence.
(End)
It is an open question whether or not this sequence satisfies Benford's law [Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
This is a strong divisibility sequence; see A329429. - Clark Kimberling, Nov 13 2019
From Peter Bala, Oct 31 2022: (Start)
Let k be a positive integer. Clearly, the sequence obtained by reducing a(n) modulo k is eventually periodic. Conjectures:
1) The sequence obtained by reducing a(n) modulo 2^k is eventually periodic with period 2.
2) The sequence obtained by reducing a(n) modulo 10^k is eventually periodic with period 6 (the case k = 1 is noted above).
3) The sequence obtained by reducing a(n) modulo 20^k is eventually periodic with period 6.
4) For n >= floor(k/2) and for 1 <= i <= 6, the value of a(6*n+i) mod 10^k is a constant independent of n. The digits of these 6 constant integers, when read from right to left, are the first k digits of the 10-adic numbers A318135 (i = 1), A318136 (i = 2), A318137 (i = 3), A318138 (i = 4), A318139 (i = 5) and A318140 (i = 6), respectively. An example is given below.
n a(6*n+1) mod 10^11
1 10066388901
2 72084948901
3 67988948901
4 61588948901
5 01588948901
6 01588948901
7 01588948901
... ...
A318135 begins 1, 0, 9, 8, 4, 9, 8, 8, 5, 1, 0, 2, .... (End)

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 443-448.
  • R. K. Guy, How to factor a number, Proc. 5th Manitoba Conf. Numerical Math., Congress. Num. 16 (1975), 49-89.
  • R. Penrose, The Emperor's New Mind, Oxford, 1989, p. 122.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A137560, which enumerates binary trees of height less than n and exactly j leaf nodes. - Robert Munafo, Nov 03 2009

Programs

Formula

a(n) = B_{n-1}(1) where B_n(x) = 1 + x*B_{n-1}(x)^2 is the generating function of trees of height <= n.
a(n) is asymptotic to c^(2^n) where c=1.2259024435287485386279474959130085213... (see A076949). - Benoit Cloitre, Nov 27 2002
c = b^(1/4) where b is the constant in Bottomley's formula in A004019. a(n) appears very asymptotic to c^(2^n) - Sum_{k>=1} A088674(k)/(2*c^(2^n))^(2*k-1). - Gerald McGarvey, Nov 17 2007
a(n) = Sum_{i=1..n} A001699(i). - Jonathan Vos Post, Feb 17 2010
G.f. = x + 2*x^2 + 5*x^3 + 26*x^4 + 677*x^5 + 458330*x^6 + 210066388901*x^7 + ... . - Michael Somos, Jan 01 2013
a(2n) mod 2 = 0 ; a(2n+1) mod 2 = 1. - Altug Alkan, Oct 04 2015
a(n) + a(n-1) = A213437(n). - Peter Bala, Feb 03 2017
0 = a(n)^2*(+a(n+1) + a(n+2)) + a(n+1)^2*(-a(n+1) - a(n+2) - a(n+3)) + a(n+2)^3 for all n>=0. - Michael Somos, Feb 10 2017
a(n) = A091980(2^(n-1)) for n > 0. - Alois P. Heinz, Jul 11 2019

Extensions

Additional comments from Cyril Banderier, Jun 05 2000
Minor edits by Vaclav Kotesovec, Oct 04 2014
Initial term clarified by Clark Kimberling, Nov 13 2019

A001699 Number of binary trees of height n; or products (ways to insert parentheses) of height n when multiplication is non-commutative and non-associative.

Original entry on oeis.org

1, 1, 3, 21, 651, 457653, 210065930571, 44127887745696109598901, 1947270476915296449559659317606103024276803403, 3791862310265926082868235028027893277370233150300118107846437701158064808916492244872560821
Offset: 0

Views

Author

Keywords

Comments

Approaches 1.5028368...^(2^n), see A077496. Row sums of A065329 as square array. - Henry Bottomley, Oct 29 2001. Also row sum of square array A073345 (AK).

Examples

			G.f. = 1 + x + 3*x^2 + 21*x^3 + 651*x^4 + 457653*x^5 + ... - _Michael Somos_, Jun 02 2019
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 307.
  • I. M. H. Etherington, On non-associative combinations, Proc. Royal Soc. Edinburgh, 59 (Part 2, 1938-39), 153-162.
  • I. M. H. Etherington, Some problems of non-associative combinations (I), Edinburgh Math. Notes, 32 (1940), pp. i-vi. Part II is by A. Erdelyi and I. M. H. Etherington, and is on pages vii-xiv of the same issue.
  • T. K. Moon, Enumerations of binary trees, types of trees and the number of reversible variable length codes, submitted to Discrete Applied Mathematics, 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Row sums of A065329.
Column sums of A335919, A335920.

Programs

  • Maple
    s := proc(n) local i,j,ans; ans := [ 1 ]; for i to n do ans := [ op(ans),2*(add(j,j=ans)-ans[ i ])*ans[ i ]+ans[ i ]^2 ] od; RETURN(ans); end; s(10);
  • Mathematica
    a[0] = 1; a[n_] := a[n] = 2*a[n-1]*Sum[a[k], {k, 0, n-2}] + a[n-1]^2; Table[a[n], {n, 0, 9}] (* Jean-François Alcover, May 16 2012 *)
    a[ n_] := If[ n < 2, Boole[n >= 0], With[{u = a[n - 1], v = a[n - 2]}, u (u + v + u/v)]]; (* Michael Somos, Jun 02 2019 *)
  • PARI
    {a(n) = if( n<=1, n>=0, a(n-1) * (a(n-1) + a(n-2) + a(n-1) / a(n-2)))}; /* Michael Somos, 2000 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def a(n): return 1 if n <= 1 else a(n-1) * (a(n-1) + a(n-2) + a(n-1)//a(n-2))
    print([a(n) for n in range(10)]) # Michael S. Branicky, Nov 10 2022 after Michael Somos

Formula

a(n+1) = 2*a(n)*(a(0) + ... + a(n-1)) + a(n)^2.
a(n+1) = a(n)^2 + a(n) + a(n)*sqrt(4*a(n)-3), if n > 0.
a(n) = A003095(n+1) - A003095(n) = A003095(n)^2 - A003095(n) + 1. - Henry Bottomley, Apr 26 2001; offset of LHS corrected by Anindya Bhattacharyya, Jun 21 2013
a(n) = A059826(A003095(n-1)).
From Peter Bala, Feb 03 2017: (Start)
a(n) = Product_{k = 1..n} A213437(k).
a(n) + a(n-1) = A213437(n+1) - A213437(n). (End)
a(n) = -a(n-2)^3 + a(n-1)^2 + 3*a(n-1)*a(n-2) + 2*a(n-2)^2 + 2*a(n-1) - 4*a(n-2) (see Narváez link for proof). - Boštjan Gec, Oct 10 2024

Extensions

Minor edits by Vaclav Kotesovec, Oct 04 2014

A056207 Number of binary trees of height <= n.

Original entry on oeis.org

3, 24, 675, 458328, 210066388899, 44127887745906175987800, 1947270476915296449559703445493848930452791203, 3791862310265926082868235028027893277370233152247388584761734150717768254410341175325352024
Offset: 1

Views

Author

Todd K. Moon (Todd.Moon(AT)ece.usu.edu), Aug 02 2000

Keywords

References

  • Todd K. Moon, "Enumerations of binary trees, types of trees and the number of reversible variable length codes," submitted to Discrete Applied Mathematics, 2000.

Crossrefs

Programs

  • Python
    from itertools import accumulate
    def f(anm1, _): return anm1**2 + 4*anm1 + 3
    def aupton(terms): return list(accumulate([3]*terms, f))
    print(aupton(8)) # Michael S. Branicky, Mar 24 2021

Formula

a(n) = d(n) + a(n-1), d(n) = A001699(n) is the number of binary trees of depth exactly n.
a(n) = A003095(n+2) - 2 = A004019(n+1) - 1 = a(n-1)^2 + 4*a(n-1) + 3.

Extensions

More terms from Henry Bottomley, Jul 09 2001

A088674 Coefficients of the eigenfunction of a sequence transformation.

Original entry on oeis.org

1, 3, 6, 45, 126, 750, 2796, 19389, 75894, 449562, 2027796, 12211794, 57895596, 332787324, 1677545304, 9766642077, 50378641830, 286825948194, 1529968671492, 8729259097158, 47374697101572, 269062276076868, 1484430536591592
Offset: 0

Views

Author

Michael Somos, Oct 04 2003

Keywords

Comments

G.f. A(x) satisfies A(x^2) = (A(x/2)-1)/x - A(x/2)^2/2.
B(x) := 1/(2*x) - x*A(x^2) satisfies B(x)^2 + 1 = B(2*x^2).
Define f(n, c) := x - Sum_{k>=0} a(k)/(2*x)^(2*k+1) where x = c^(2^n). Then A003095(n+1) = A004019(n) + 1 = f(n, 1.502836801...). Also, A062013(n) = f(n, 1.78050350...). - Michael Somos, Jun 07 2021

Examples

			G.f. = A(x) = 1 + 3*x + 6*x^2 + 45*x^3 + 126*x^4 + 750*x^5 + 2796*x^6 + ...
B(x) = 1/(2*x) - x - 3*x^3 - 6*x^5 - 45*x^7 - 126*x^9 - 750*x^11 - ... - _Michael Somos_, Jul 11 2019
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[n < 0, 0, Module[{A = 1 + O[x], m = 2}, While[m < n + 2, m *= 2; A = (Normal[ 1/x - Sqrt[ 1/x^2 - 2/x - 2*(Normal[A] /. x -> x^2) + O[x]^(m - 2)]] /. x -> 2*x) + O[x]^(m - 1) //PowerExpand]; SeriesCoefficient[A, n]]]; (* Michael Somos, Jun 07 2021 *)
  • PARI
    {a(n) = my(A, m); if( n < 0, 0, m=2; A = 1 + O(x); while( m < n+2, m*=2; A = subst(1/x - sqrt(2*(subst((1/2)/x - A, x, x^2) - 1/x)), x, 2*x)); polcoeff(A, n))};

A115590 a(0) = 0; a(n) = (1+a(n-1))^3 for n > 0.

Original entry on oeis.org

0, 1, 8, 729, 389017000, 58871587162270593034051001, 204040901322752673844230437877671861543858084850895762746141813554591014612008
Offset: 0

Views

Author

Paolo Bonzini, Mar 15 2006; corrected Apr 06 2006 and Jan 19 2007

Keywords

Comments

Take the rooted ternary tree of depth n, with (3^(n+1) - 1) / 2 labeled nodes. Let the number of rooted subtrees be a(n). For example, for n = 1 the a(2) = 8 subtrees are:
R...R...R...R......R.......R...R.......R
.../....|....\..../.\...../|...|\...../|\
..o.....o.....o..o...o...o.o...o.o...o.o.o
Then a(n+1) = (1+a(n))^3.

Crossrefs

Programs

  • Mathematica
    {0}~Join~RecurrenceTable[{a[n]==(a[n-1]+1)^3, a[0]==1},a,{n,0,8}] (* Vaclav Kotesovec, May 21 2015 *)

Formula

As for A004019, it follows from Aho and Sloane that there is a constant c such that a(n) is the nearest integer to c^(3^n). In fact a(n) = nearest integer to b^(3^n) - 1 where b = 2.0804006677503193521177452323719035237099784935372250879749088464344434056773788...

Extensions

Name edited by Michael De Vlieger, Dec 21 2023

A355108 Maximal number of root ancestral configurations among matching gene trees and species trees with n leaves.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 15, 25, 35, 55, 80, 130, 182, 286, 416, 676, 936, 1456, 2106, 3406, 4758, 7462, 10842, 17602, 24372, 37912, 54837, 88687, 123891, 194299, 282309, 458329, 634349, 986389, 1426439, 2306539, 3221843, 5052451, 7340711, 11917231, 16500521
Offset: 1

Views

Author

Noah A Rosenberg, Jun 19 2022

Keywords

Comments

An ancestral configuration is a set of gene lineages present immediately before a node of a species tree is reached, looking backward in time, and a root ancestral configuration is an ancestral configuration at the root node. The term a(n) gives the largest number of root ancestral configurations among pairs (G,S) where G is a labeled gene tree topology, S is a bijectively labeled species tree topology, G and S have n leaves, and G=S.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 0, (g-> (f->
         (1+a(f))*(1+a(n-f)))(min(g, n-g/2)))(2^ilog2(n)))
        end:
    seq(a(n), n=1..42);  # Alois P. Heinz, Jun 19 2022
  • Mathematica
    b[n_] := b[n] = If[n == 1, 1, 1+Max[Table[b[i] b[n-i], {i, n-1}]]];
    a[n_] := b[n]-1;
    Array[a, 42] (* Jean-François Alcover, Jun 25 2022 *)

Formula

a(n) = max_{i=1..floor(n/2)} (a(i)+1)*(a(n-i)+1), with a(1)=0.
a(n) = A091980(n) - 1.
a(2^n) = A004019(n) = A003095(n)^2.

A060136 Square array read by antidiagonals with T(n,k)=T(n,k-1)^2+n*T(n,k-1)+1 and T(n,0)=0.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 5, 3, 1, 0, 26, 13, 4, 1, 0, 677, 183, 25, 5, 1, 0, 458330, 33673, 676, 41, 6, 1, 0, 210066388901, 1133904603, 458329, 1805, 61, 7, 1, 0, 44127887745906175987802, 1285739649838492213, 210066388900, 3263441, 3966
Offset: 0

Views

Author

Henry Bottomley, Mar 05 2001

Keywords

Crossrefs

Rows include A003095, A002065, A004019. Columns include A000004, A000012, A000027 (offset), A001844. Cf. A060137.

A360826 a(1) = 1, a(n) = (k+1)*(2*k+1), where k = Product_{i=1..n-1} a(i).

Original entry on oeis.org

1, 6, 91, 597871, 213122969971321411, 9680343693975641657052402556458789711774336036960631
Offset: 1

Views

Author

Ivan N. Ianakiev, Feb 22 2023

Keywords

Comments

A sequence of pairwise relatively prime triangular (and also hexagonal) numbers.
As a clarification to the problem definition by Sierpinski, here we show that only one triangular (hexagonal) seed is needed to produce such a sequence.
This sequence can be used for proving the infinitude of primes.
In general: Let m = 2*q, for any q > 0. There are infinitely many sequences of pairwise coprime m-gonal numbers, whose first term is any positive m-gonal number and whose general term is of the form a(n) = (k + 1)*((q - 1)*k + 1), where k = Product_{i=1..n-1} a(i).

References

  • W. Sierpinski, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #42.

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_]:=Module[{k=Product[a[i],{i,1,n-1}]},(k+1)*(2*k+1)];
    a/@Range[6]
    Join[{1}, RecurrenceTable[{a[2] == 6, a[n+1] == (1 + a[n]*(Sqrt[1 + 8*a[n]] - 3)/4) * (1 + 2*a[n]*(Sqrt[1 + 8*a[n]] - 3)/4)}, a, {n, 2, 8}]] (* Vaclav Kotesovec, May 05 2023 *)
  • PARI
    a(n) = if (n==1, 1, my(k = prod(i=1,n-1, a(i))); (k+1)*(2*k+1)); \\ Michel Marcus, Mar 25 2025

Formula

a(1) = 1, a(n) = (k+1)*(2*k+1), where k = Product_{i=1..n-1} a(i).
a(n) ~ c^(3^n), where c = 1.1784502032269064445225839284451956694752084180050932315805089054871825498... - Vaclav Kotesovec, May 05 2023

A368326 a(0) = 0; a(n) = (1+a(n-1))^4 for n > 0.

Original entry on oeis.org

0, 1, 16, 83521, 48663522406470666256, 5608079543150183734470340565498778265577622654664540468785094021747120982222401
Offset: 0

Views

Author

Michael De Vlieger, Dec 21 2023

Keywords

Crossrefs

Programs

  • Mathematica
    {0}~Join~NestList[(# + 1)^4 &, 1, 5]

A368327 a(0) = 0; a(n) = (1+a(n-1))^5 for n > 0.

Original entry on oeis.org

0, 1, 32, 39135393, 91801241053644953553642221885011784224
Offset: 0

Views

Author

Michael De Vlieger, Dec 21 2023

Keywords

Crossrefs

Programs

  • Mathematica
    {0}~Join~NestList[(# + 1)^5 &, 1, 5]
Showing 1-10 of 16 results. Next