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.

A242970 Decimal expansion of the constant rho = lim f(n)^(1/n), where f(n) = A214833(n) is the number of arithmetic formulas for n (cf. comments).

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Jun 09 2014

Keywords

Comments

This is the constant ρ, given on page 2 of E. K. Gnang and others. From the abstract: "An arithmetic formula is an expression involving only the constant 1, and the binary operations of addition and multiplication, with multiplication by 1 not allowed. We obtain an asymptotic formula for the number of arithmetic formulas evaluating to n as n goes to infinity, solving a conjecture of E. K. Gnang and D. Zeilberger."
More precisely: Let f(n) = A214833(n) be the number of arithmetic formulas for n. Then there exist constants c > 0 and ρ > 4 such that f(n) ~ c*ρ^n/n^(3/2) as n -> oo where ρ = 4.076561785276046... given in this sequence, and c = 0.145691854699979... given in A242955. - M. F. Hasler, May 04 2017

Examples

			ρ = 4.07656178527604619860402285281502026...
		

Crossrefs

The constant c = lim f(n)*n^(3/2)/rho^n is given in A242955.
Cf. A214833.

Formula

f(n) = A214833(n) ~ c*ρ^n/n^(3/2) = A242955*A242970^n/n^(3/2) as n -> oo, thus rho = A242970 = lim f(n)^(1/n) = lim f(n+1)/f(n) = lim (1+1/n)^(3/2)*f(n+1)/f(n), the latter expression being the most accurate/rapidly converging of the three. The values for n = 999, however, yield only 6 correct decimals (4.076559...). - M. F. Hasler, May 04 2017

Extensions

Edited by M. F. Hasler, May 03 2017

A242955 Decimal expansion of the constant c = lim f(n)*n^(3/2)/rho^n where f(n) = A214833(n) is the number of arithmetic formulas for n, and rho = A242970.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Jun 09 2014

Keywords

Comments

This is the constant c given on page 2 of E. K. Gnang and others.
Gnang et al. find f(n) = A214833(n) ~ c*rho^n/n^(3/2) as n -> oo, with rho given in A242970, and c given by the present sequence. - M. F. Hasler, May 04 2017

Examples

			c = 0.1456918546999792945604248360579...
		

Crossrefs

The constant rho is given in A242970.
Cf. A214833.

Extensions

Offset corrected, definition improved, more terms from M. F. Hasler, May 04 2017

A213923 Minimal lengths of formulas representing n only using addition, multiplication and the constant 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 9, 11, 11, 11, 13, 15, 13, 15, 15, 15, 15, 17, 15, 17, 17, 17, 19, 21, 17, 19, 19, 17, 19, 21, 19, 21, 19, 21, 21, 21, 19, 21, 21, 21, 21, 23, 21, 23, 23, 21, 23, 25, 21, 23, 23, 23, 23, 25, 21, 23, 23, 23, 25, 27, 23, 25, 25, 23, 23, 25, 25, 27, 25, 27, 25, 27, 23, 25, 25, 25, 25, 27, 25
Offset: 1

Views

Author

Jonathan Vos Post, Mar 06 2013

Keywords

Examples

			a(3) = 5 because for n = 3, the minimum is length = 5, formula = "11+1+" or "111++".
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember;
           1+ `if`(n=1, 0, min(seq(a(i)+a(n-i), i=1..n/2),
           seq(a(d)+a(n/d), d=divisors(n) minus {1, n})))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 07 2013
  • Mathematica
    a[n_] := a[n] = 1 + If[n == 1, 0, Min[Join[Table[a[i] + a[n-i], {i, 1, n/2}], Table[a[d] + a[n/d], {d, Divisors[n] ~Complement~ {1, n}}]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 01 2017, after Alois P. Heinz *)

Formula

a(n) = 2*A005245(n)-1.

A214836 Number of formula representations of n using addition, multiplication, exponentiation and the constant 1.

Original entry on oeis.org

1, 1, 2, 7, 18, 58, 180, 613, 2076, 7270, 25752, 92918, 338432, 1246092, 4624536, 17290646, 65047436, 246079536, 935484928, 3571960668, 13692523960, 52675401248, 203299385584, 786949008100, 3054440440486, 11884949139900, 46351113658232, 181153317512536
Offset: 1

Views

Author

Alois P. Heinz, Mar 07 2013

Keywords

Examples

			a(1) = 1: 1.
a(2) = 1: 11+.
a(3) = 2: 111++, 11+1+.
a(4) = 7: 1111+++, 111+1++, 11+11++, 111++1+, 11+1+1+, 11+11+*, 11+11+^.
a(5) = 18: 11111++++, 1111+1+++, 111+11+++, 1111++1++, 111+1+1++, 111+11+*+, 111+11+^+, 11+111+++, 11+11+1++, 111++11++, 11+1+11++, 1111+++1+, 111+1++1+, 11+11++1+, 111++1+1+, 11+1+1+1+, 11+11+*1+, 11+11+^1+.
All formulas are given in postfix (reverse Polish) notation but other notations would give the same results.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=1, 1,
           add(a(i)*a(n-i), i=1..n-1)+
           add(a(d)*a(n/d), d=divisors(n) minus {1, n})+
           add(a(root(n, p))*a(p), p=divisors(igcd(seq(i[2],
               i=ifactors(n)[2]))) minus {0,1}))
        end:
    seq(a(n), n=1..40);
  • Mathematica
    a[n_] := a[n] = If[n==1, 1, Sum[a[i]*a[n-i], {i, 1, n-1}] + Sum[a[d]*a[n/d], {d, Divisors[n] ~Complement~ {1, n}}] + Sum[a[n^(1/p)] * a[p], {p, Divisors[GCD @@ Table[i[[2]], {i, FactorInteger[n]}]] ~Complement~ {0, 1}}]]; Array[a, 40] (* Jean-François Alcover, Apr 11 2017, translated from Maple *)

A214843 Number of formula representations of n using addition, exponentiation and the constant 1.

Original entry on oeis.org

1, 1, 2, 6, 16, 48, 152, 502, 1694, 5832, 20420, 72472, 260096, 942304, 3441584, 12658128, 46842920, 174289108, 651610504, 2446686568, 9222628592, 34886505168, 132387975040, 503857644160, 1922782984688, 7355686851696, 28203617340756, 108368274550664
Offset: 1

Views

Author

Alois P. Heinz, Mar 08 2013

Keywords

Examples

			a(1) = 1: 1.
a(2) = 1: 11+.
a(3) = 2: 111++, 11+1+.
a(4) = 6: 1111+++, 111+1++, 11+11++, 111++1+, 11+1+1+, 11+11+^.
a(5) = 16: 11111++++, 1111+1+++, 111+11+++, 1111++1++, 111+1+1++, 111+11+^+, 11+111+++, 11+11+1++, 111++11++, 11+1+11++, 1111+++1+, 111+1++1+, 11+11++1+, 111++1+1+, 11+1+1+1+, 11+11+^1+.
All formulas are given in postfix (reverse Polish) notation but other notations would give the same results.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=1, 1,
           add(a(i)*a(n-i), i=1..n-1)+
           add(a(root(n, p))*a(p), p=divisors(igcd(seq(i[2],
               i=ifactors(n)[2]))) minus {0, 1}))
        end:
    seq(a(n), n=1..40);
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Sum[a[i]*a[n-i], {i, 1, n-1}] + Sum[a[n^(1/p)] * a[p], {p, Divisors[GCD @@ FactorInteger[n][[All, 2]]] ~Complement~ {0, 1} } ];
    Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)

A214835 Total sum of lengths of formula representations of n using addition, multiplication and the constant 1.

Original entry on oeis.org

1, 3, 10, 42, 144, 564, 2064, 7944, 30252, 117000, 453192, 1768480, 6917504, 27163232, 106923648, 421931308, 1668250408, 6608054656, 26215991648, 104154492224, 414324786144, 1650080158832, 6578448714144, 26251704924528, 104850927048448, 419119282453408
Offset: 1

Views

Author

Alois P. Heinz, Mar 07 2013

Keywords

Examples

			a(1) = 1: 1.
a(2) = 3: 11+.
a(3) = 10: 111++, 11+1+.
a(4) = 42: 1111+++, 111+1++, 11+11++, 111++1+, 11+1+1+, 11+11+*.
a(5) = 144: 11111++++, 1111+1+++, 111+11+++, 1111++1++, 111+1+1++, 111+11+*+, 11+111+++, 11+11+1++, 111++11++, 11+1+11++, 1111+++1+, 111+1++1+, 11+11++1+, 111++1+1+, 11+1+1+1+, 11+11+*1+.
		

Crossrefs

Cf. A005245, A214833 (number of formula representations), A213923 (minimal length of formula), A005408(n-1) (maximal length of formula).

A373446 Number of distinct ways of expressing n using only addition, multiplication (with all factors greater than 1), necessary parentheses, and the number 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 6, 7, 10, 10, 18, 19, 27, 30, 50, 53, 80, 85, 133, 146, 209, 223, 350, 382, 544, 597, 886, 962, 1385, 1507, 2197, 2426, 3422, 3740, 5413, 5941, 8295, 9159, 12994, 14298, 19947, 21982, 30763, 34111, 47005, 51895, 72202, 79974, 109468, 121545, 167032, 185276, 252534, 280427, 382274, 425703, 575650, 640243, 867942
Offset: 1

Views

Author

Daniel W. Grace, Jun 05 2024

Keywords

Comments

Expressions that are the same after commuting their terms are not considered distinct from one another.
Parentheses are used around a sum which is being multiplied, but not otherwise.

Examples

			a(10)=10, as 10 can be expressed in the following ways:
  1+1+1+1+1+1+1+1+1+1
  (1+1)*(1+1)+1+1+1+1+1+1
  (1+1)*(1+1)+(1+1)*(1+1)+1+1
  (1+1)*(1+1)*(1+1)+1+1
  (1+1)*(1+1+1)+1+1+1+1
  (1+1)*(1+1+1)+(1+1)*(1+1)
  (1+1)*(1+1+1+1)+1+1
  (1+1+1)*(1+1+1)+1
  (1+1)*(1+1+1+1+1)
  (1+1)*((1+1)*(1+1)+1).
		

Crossrefs

Programs

  • Python
    from itertools import count,islice
    from collections import Counter
    from math import comb
    from sympy import divisors
    def euler_transform(x):
        xlist = []
        z = []
        y = []
        for n,x in enumerate(x,1):
            xlist.append(x)
            z.append(sum(d*xlist[d-1] for d in divisors(n)))
            yy = (z[-1]+sum(zz*yy for zz,yy in zip(z,reversed(y))))//n
            yield yy
            y.append(yy)
    def factorizations(n,fmin=2):
        if n == 1:
            yield []
            return
        for d in divisors(n,generator=True):
            if d < fmin: continue
            for f in factorizations(n//d,d):
                yield [d]+f
    def A373446_generator():
        alist = []
        def bgen():
            blist = []
            for n in count(1):
                b = 0
                for p in factorizations(n):
                    if len(p) == 1: continue
                    m = 1
                    for k,c in Counter(p).items():
                        m *= comb(alist[k-1]-blist[k-1]+c-1,c)
                    b += m
                yield b
                blist.append(b)
        for a in euler_transform(bgen()):
            yield a
            alist.append(a)
    print(list(islice(A373446_generator(),60))) # Pontus von Brömssen, Jun 13 2024

Formula

a(n) >= a(n-1) since, if "+1" is appended to each expression used to calculate a(n-1), then each of the resulting expressions equate to n and are distinct from each other. There may or may not be other ways to express n that do not include an isolated "+1", hence the greater-than possibility.
Showing 1-7 of 7 results.