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

A070960 a(1) = 1; a(n) = n!*(3/2) for n>=2.

Original entry on oeis.org

1, 3, 9, 36, 180, 1080, 7560, 60480, 544320, 5443200, 59875200, 718502400, 9340531200, 130767436800, 1961511552000, 31384184832000, 533531142144000, 9603560558592000, 182467650613248000, 3649353012264960000, 76636413257564160000, 1686001091666411520000, 38778025108327464960000
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), May 24 2002

Keywords

Comments

Let g be a permutation of [1..n] having, say, j_i cycles of length i, with Sum_i i*j_i = n; sequence gives Sum_{g} Sum_{i} (j_1 + j_2). - N. J. A. Sloane, Jul 22 2009
a(n) is the greatest integer that can be obtained from the integers {1, 2, 3, ..., n} using each number at most once and the operators +, -, *, /.

Examples

			a(5) = 180 because the greatest number we can obtain using 1, 2, 3, 4, 5 is 180 which is (1+2)*3*4*5.
		

Crossrefs

Programs

  • Haskell
    a070960 n = if n == 1 then 1 else 3 * a000142 n `div` 2
    a070960_list = map (flip div 2) fs where fs = 3 : zipWith (*) [2..] fs
    -- Reinhard Zumkeller, Aug 31 2014
    
  • Mathematica
    s=3;lst={1, s};Do[s+=n*s+s;AppendTo[lst, s], {n, 1, 5!, 1}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 08 2008 *)
    Join[{1},(3*Range[2,20]!)/2] (* Harvey P. Dale, Jun 15 2022 *)
  • PARI
    a(n) = if (n==1, 1, n!*3/2); \\ Michel Marcus, Dec 03 2022

Formula

E.g.f.: x*(2+x)/(1-x)/2. - Vladeta Jovovic, Dec 15 2002
a(n) = A245334(n,n-2), n > 1. - Reinhard Zumkeller, Aug 31 2014
From Amiram Eldar, Jan 15 2023: (Start)
Sum_{n>=1} 1/a(n) = (2*e-1)/3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - 2/(3*e). (End)
a(n) = A000142(n) + A001710(n) for n>=2. - Alois P. Heinz, Feb 20 2024

Extensions

Edited by N. J. A. Sloane, Jul 22 2009

A060316 a(n) is the smallest natural number we cannot obtain from n, n+1, n+2, n+3, n+4, n+5 and the operators +, -, *, /, using each number only once.

Original entry on oeis.org

76, 284, 433, 734, 842, 1102, 1228, 1366, 1652, 709, 859, 879, 943, 1070, 1091, 749, 829, 530, 628, 653, 677, 202, 342, 293, 248, 238, 247, 245, 253, 336, 251, 147, 125, 155, 127, 163, 139, 133, 149, 181, 157, 153, 155, 169, 162, 157, 131, 174, 176, 169
Offset: 0

Views

Author

Jean-Marc Rebert, Mar 28 2001

Keywords

Comments

Asymptotically the sequence tends to 13. The first n for which a(n) equals the limit is n=83. - Gilles A.Fleury, Oct 18 2008

Examples

			u(0)=76 is the smallest natural number we can't obtain with 0, 1, 2, 3, 4, 5 and the operators +, -, *, /, using each number only once.
		

Crossrefs

Extensions

More terms from Koksal Karakus (karakusk(AT)hotmail.com), May 28 2002

A141494 a(n) is the "highest smallest" positive integer that cannot be obtained from the (n-1) optimized integers (to be defined for each n) using each number at most once and the three operators +, -, *.

Original entry on oeis.org

1, 2, 5, 18, 70, 406
Offset: 1

Views

Author

Gilles A.Fleury, Aug 10 2008, Aug 24 2008; revised Oct 05 2008

Keywords

Comments

This sequence is a kind of optimized version of the sequence A060315 for which the inputs are the integers {0,1,...,n-1}. Here the inputs are optimized so that the smallest positive integer, that cannot be obtained, is maximized.
Further terms may be hard to find. Some additional terms (still to be proved) could be a(7)=2876, a(8)=24756, a(9)=346404. If anyone has found higher numbers please contact me.

Examples

			a(4)=18 because every integer can be calculated up to 17, using the optimal numbers {2,3,10}.
a(5)=70 because every integer can be calculated up to 69, using one of the two (!) optimal sequences {2,3,4,27} or {2,3,10,41}.
a(6)=406 because every integer can be calculated up to 405, using the optimal numbers {2,3,4,84,111}.
		

Crossrefs

A142153 a(n) is the "highest smallest" positive integer that cannot be obtained from the (n-1) optimized integers (to be defined for each n) using each number at most once and the operators +, -, *, /.

Original entry on oeis.org

1, 2, 5, 18, 87, 451
Offset: 1

Views

Author

Gilles A.Fleury, Oct 05 2008

Keywords

Comments

This sequence is a kind of optimized version of the sequence A060315 for which the inputs are the integers {0,1,...,n-1}. Here the inputs are optimized so that the smallest positive integer, that cannot be obtained, is maximized.
Further terms may be hard to find. Some additional terms (still to be proved) could be a(7)=3495, a(8)=32355, a(9)=384289. If anyone has found higher numbers please contact me. - updated by Gilles A.Fleury, Jul 10 2017 and May 22 2018

Examples

			a(4) = 18 because every integer can be calculated up to 17, using one of the four (!) optimal sequences {2,3,10} or {2,3,14} or {2,6,11} or {2,6,13}.
a(5) = 87 because every integer can be calculated up to 86, using the optimal numbers {2,3,14,60}.
a(6) = 451 because every integer can be calculated up to 450, using the optimal numbers {2,3,4,63,152}. - _Gilles A.Fleury_, Mar 06 2009
		

Crossrefs

Extensions

a(6) from Gilles A.Fleury, Mar 06 2009

A071115 a(1) = 1; a(n+1) is the smallest integer > 0 that cannot be obtained from the integers {a(1), ..., a(n)} using each number at most once and the operators +, -, *, /, where intermediate subexpressions must be integers.

Original entry on oeis.org

1, 2, 4, 11, 34, 152, 1007, 7335, 85761, 812767
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), May 27 2002

Keywords

Comments

a(n+1) > 2*a(n) + 2 for n > 3 since a(n) may be added to every number possible at the previous step (at least 1..a(n)-1) and a(n), 2*a(n), 2*a(n)+1, and 2*(a(n)+1) are also present. - Michael S. Branicky, Jan 30 2023

Examples

			a(4)=11 because we can write 4+1=5, 4+2=6, 4+2+1=7, 4*2=8, 4*2+1=9, (4+1)*2=10 by using 1, 2 and 4 but we cannot do the same thing for 11.
		

Crossrefs

Cf. A060315, A217043 (allows intermediate fractions).

Programs

  • Python
    def a(n, v):
        R = dict() # index of each reachable subset is [card(s)-1][s]
        for i in range(n): R[i] = dict()
        for i in range(n): R[0][(v[i],)] = {v[i]}
        reach = set(v)
        for j in range(1, n):
            for i in range((j+1)//2):
                for s1 in R[i]:
                    for s2 in R[j-1-i]:
                        if set(s1) & set(s2) == set():
                            s12 = tuple(sorted(set(s1) | set(s2)))
                            if s12 not in R[len(s12)-1]:
                                R[len(s12)-1][s12] = set()
                            for a in R[i][s1]:
                                for b in R[j-1-i][s2]:
                                    allowed = [a+b, a*b, a-b, b-a]
                                    if a!=0 and b%a==0: allowed.append(b//a)
                                    if b!=0 and a%b==0: allowed.append(a//b)
                                    R[len(s12)-1][s12].update(allowed)
                                    reach.update(allowed)
        k = 1
        while k in reach: k += 1
        return k
    alst = [1]
    [alst.append(a(n, alst)) for n in range(1, 8)]
    print(alst) # Michael S. Branicky, Jul 01 2022

A048183 Least inverse of A048182.

Original entry on oeis.org

2, 3, 4, 5, 7, 10, 11, 17, 22, 29, 41, 58, 67, 101, 131, 173, 259, 346, 461, 617, 787, 1037, 1571, 2074, 2767, 3703, 5357, 7403, 9427, 12443, 16663, 22217, 33323, 44437, 63677, 88843, 113117, 149323, 219803, 298597, 399883, 533237, 771403, 1018483
Offset: 0

Views

Author

Keywords

Comments

Also a(n) is the smallest integer that cannot be obtained by using the number 1 at most n+1 times and the operators +, -, *, /. - Koksal Karakus (karakusk(AT)hotmail.com), May 27 2002

Examples

			a(4)=7 because by using the number 1 at most five times we can write 1=1, 1+1=2, 1+1+1=3, 1+1+1+1+1=5, (1+1)*(1+1+1)=6 but we cannot obtain 7 in the same way.
		

Crossrefs

A071848 a(n) = smallest positive integer that cannot be obtained using the number n at most n times and the operations +, -, *, /, where intermediate subexpressions must be integers.

Original entry on oeis.org

2, 3, 5, 10, 13, 22, 38, 85, 138, 246, 547, 1121, 2792, 6379, 15021, 20870, 48309, 161629
Offset: 1

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 09 2002

Keywords

Comments

Joe Crump's page indicates that a(9) = 195 if noninteger subexpressions are permitted. - David W. Wilson, Jan 14 2007

Examples

			a(3) = 5 because using 3 at most thrice we can have 3/3=1, 3-(3/3)=2, 3=3, 3+(3/3)=4 but we cannot obtain 5 this way.
a(14) != 3967 since 3967 = 3969 - 2 = 21 * 189 - 2 = (7 + 14) * (14*14 - 7) - 2 = (14/((14+14)/14) + 14) * (14*14 - 14/((14+14)/14)) - (14+14)/14.
		

Crossrefs

Cf. A060315.

Programs

  • Python
    from functools import lru_cache
    def a(n):
        @lru_cache()
        def f(m):
            if m == 1: return {n}
            out = set()
            for j in range(1, m//2+1):
                for x in f(j):
                    for y in f(m-j):
                        out.update([x + y, x - y, y - x, x * y])
                        if y and x%y == 0: out.add(x//y)
                        if x and y%x == 0: out.add(y//x)
            return out
        k, s = 1, set.union(*(f(i) for i in range(1, n+1)))
        while k in s: k += 1
        return k
    print([a(n) for n in range(1, 14)]) # Michael S. Branicky, Jul 28 2022

Extensions

Definition corrected by David W. Wilson, Jan 14 2007
Definition changed (to reflect wording of the example) by Jason Taff (jtaff(AT)jburroughs.org), Apr 07 2010
a(14)-a(15) corrected and a(16) from Michael S. Branicky, Jul 28 2022
a(17)-a(18) from Sean A. Irvine, Aug 17 2024

A217043 a(1) = 1; a(n+1) is the smallest integer >=0 that cannot be obtained from the integers {a(1), ..., a(n)} using each number at most once and the operators +, -, *, / and accepting fractional intermediate results.

Original entry on oeis.org

1, 2, 4, 11, 34, 152, 1143, 8285, 98863, 657309
Offset: 1

Views

Author

Clément Morelle, Sep 25 2012

Keywords

Examples

			a(4)=11 because we can write 4+1=5, 4+2=6, 4+2+1=7, 4*2=8, 4*2+1=9, (4+1)*2=10 by using 1, 2 and 4, but we cannot construct 11 this way.
a(7)=1143 because 1142 = (152+((34-4)*(11*(2+1)))), and 1143 is impossible.
a(7) is not 1007 because it can be constructed as 1007 = 152*(11-(34+1)/(4*2)); the fractional intermediate result 35/8, for example, is accepted in the composition.
		

Crossrefs

Cf. A060315, A071115 (disallows intermediate fractions).

Programs

  • Python
    from fractions import Fraction
    def a(n, v):
        R = dict() # index of each reachable subset is [card(s)-1][s]
        for i in range(n): R[i] = dict()
        for i in range(n): R[0][(v[i],)] = {v[i]}
        reach = set(v)
        for j in range(1, n):
            for i in range((j+1)//2):
                for s1 in R[i]:
                    for s2 in R[j-1-i]:
                        if set(s1) & set(s2) == set():
                            s12 = tuple(sorted(set(s1) | set(s2)))
                            if s12 not in R[len(s12)-1]:
                                R[len(s12)-1][s12] = set()
                            for a in R[i][s1]:
                                for b in R[j-1-i][s2]:
                                    allowed = [a+b, a*b, a-b, b-a]
                                    if a != 0: allowed.append(Fraction(b, a))
                                    if b != 0: allowed.append(Fraction(a, b))
                                    R[len(s12)-1][s12].update(allowed)
                                    reach.update(allowed)
        k = 1
        while k in reach: k += 1
        return k
    alst = [1]
    [alst.append(a(n, alst)) for n in range(1, 6)]
    print(alst) # Michael S. Branicky, Jul 01 2022

Extensions

a(10) corrected by Clément Morelle, Jun 12 2025

A071314 a(n) is the smallest number that cannot be obtained from the numbers {2^0,2^1,...,2^n} using each number at most once and the operators +, -, *, /. Parentheses are allowed, intermediate fractions are not allowed.

Original entry on oeis.org

2, 4, 11, 27, 77, 595, 2471, 9643, 51787
Offset: 0

Views

Author

Koksal Karakus (karakusk(AT)hotmail.com), Jun 11 2002

Keywords

Comments

The A309886 is a similar sequence, except: there we allow intermediate fractions, and we require all numbers to be used when building an expression. - Matej Veselovac, Aug 28 2019
For n>=2, the largest number that can be obtained in this manner is given by the following formula: (2^1 + 2^0)*(Product_{k=2..n} 2^k). This product notation is equivalent to the expression: (3/2)*2^(n*(n+1)/2). Thus, for n>=2, this sequence has an upper bound: (3/2)*2^(n*(n+1)/2) + 1. - Alejandro J. Becerra Jr., Apr 22 2020

Examples

			a(2) = 11 because using {1,2,4} and the four operations we can obtain all the numbers up to 10, for example 10=(4+1)*2, but we cannot obtain 11 in the same way.
a(6) <= 595 since the only way to make 595 is: (1 + 16 + 4/8)*(2 + 32), which requires the use of an intermediate fraction 4/8 in the calculation process, which is not allowed. - _Matej Veselovac_, Aug 28 2019
a(8) != 19351 = 1+(2+256)*(((4+16)*(128-8))/32). - _Michael S. Branicky_, Jul 15 2022
		

Crossrefs

Programs

  • Python
    def a(n):
        R = dict() # index of each reachable subset is [card(s)-1][s]
        for i in range(n+1): R[i] = dict()
        for i in range(n+1): R[0][(2**i,)] = {2**i}
        reach = set(2**i for i in range(n+1))
        for j in range(1, n+1):
            for i in range((j+1)//2):
                for s1 in R[i]:
                    for s2 in R[j-1-i]:
                        if set(s1) & set(s2) == set():
                            s12 = tuple(sorted(set(s1) | set(s2)))
                            if s12 not in R[len(s12)-1]:
                                R[len(s12)-1][s12] = set()
                            for a in R[i][s1]:
                                for b in R[j-1-i][s2]:
                                    allowed = [a+b, a*b, a-b, b-a]
                                    if a != 0 and b%a == 0: allowed.append(b//a)
                                    if b != 0 and a%b == 0: allowed.append(a//b)
                                    R[len(s12)-1][s12].update(allowed)
                                    reach.update(allowed)
        k = 1
        while k in reach: k += 1
        return k
    print([a(n) for n in range(6)]) # Michael S. Branicky, Jul 15 2022

Formula

a(n) <= A309886(n+1). - Michael S. Branicky, Jul 15 2022

Extensions

a(8) corrected by Michael S. Branicky, Jul 15 2022

A143191 a(n) is the smallest natural number we cannot obtain from n, n+1, n+2, n+3, n+4, n+5, n+6 and the operators +, -, *, /, using each number only once.

Original entry on oeis.org

284, 1413, 2113, 3266, 4943, 6242, 9105, 11586, 6269, 6427, 8407, 8406, 9224, 11079, 12451, 8392, 3469, 4253, 4043, 4126, 4087, 4657, 4330, 4639, 5114, 3983, 5839, 4415, 6376, 4537, 5231, 5161, 4090, 3199, 2057, 3372, 2285, 2270, 2525, 2609, 2590, 1209
Offset: 0

Views

Author

Gilles A.Fleury, Oct 18 2008

Keywords

Comments

This sequence is related to the sequences A071110 (for 5 successive integers) and A060316 (for 6 successive integers) and others sequences to come...
Asymptotically, the sequence tends to 29 (the first n for which a(n)=29 is n=249).

Crossrefs

Showing 1-10 of 21 results. Next