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-5 of 5 results.

A003063 a(n) = 3^(n-1) - 2^n.

Original entry on oeis.org

-1, -1, 1, 11, 49, 179, 601, 1931, 6049, 18659, 57001, 173051, 523249, 1577939, 4750201, 14283371, 42915649, 128878019, 386896201, 1161212891, 3484687249, 10456158899, 31372671001, 94126401611, 282395982049, 847221500579, 2541731610601, 7625329049531, 22876255584049
Offset: 1

Views

Author

Henrik Johansson (Henrik.Johansson(AT)Nexus.SE)

Keywords

Comments

Binomial transform of A000918: (-1, 0, 2, 6, 14, 30, ...). - Gary W. Adamson, Mar 23 2012
This sequence demonstrates 2^n as a loose lower bound for g(n) in Waring's problem. Since 3^n > 2(2^n) for all n > 2, the number 2^(n + 1) - 1 requires 2^n n-th powers for its representation since 3^n is not available for use in the sum: the gulf between the relevant powers of 2 and 3 widens considerably as n gets progressively larger. - Alonso del Arte, Feb 01 2013

Examples

			a(3) = 1 because 3^2 - 2^3 = 9 - 8 = 1.
a(4) = 11 because 3^3 - 2^4 = 27 - 16 = 11.
a(5) = 49 because 3^4 - 2^5 = 81 - 32 = 49.
		

Crossrefs

Cf. A000918, A056182 (first differences), A064686, A083313, A214091, A369490.
Cf. A363024 (prime terms).
From the third term onward the first differences of A005173.
Difference between two leftmost columns of A090888.
A diagonal in A254027.
Right edge of irregular triangle A252750.

Programs

Formula

Let b(n) = 2*(3/2)^n - 1. Then a(n) = -b(1-n)*3^(n-1) for n > 0. A083313(n) = A064686(n) = b(n)*2^(n-1) for n > 0. - Michael Somos, Aug 06 2006
From Colin Barker, May 27 2013: (Start)
a(n) = 5*a(n-1) - 6*a(n-2).
G.f.: -x*(1-4*x) / ((1-2*x)*(1-3*x)). (End)
E.g.f.: (1/3)*(2 - 3*exp(2*x) + exp(3*x)). - G. C. Greubel, Nov 03 2022

Extensions

A few more terms from Alonso del Arte, Feb 01 2013

A083313 a(0)=1; a(n) = 3^n - 2^(n-1) for n >= 1.

Original entry on oeis.org

1, 2, 7, 23, 73, 227, 697, 2123, 6433, 19427, 58537, 176123, 529393, 1590227, 4774777, 14332523, 43013953, 129074627, 387289417, 1161999323, 3486260113, 10459304627, 31378962457, 94138984523, 282421147873, 847271832227, 2541832273897, 7625530376123
Offset: 0

Views

Author

Paul Barry, Apr 24 2003

Keywords

Comments

Essentially the same as A064686.
Binomial transform of A051049.
Number of skinny Boolean functions f(x_1,...,x_n) that are also Horn functions. - Hugo Pfoertner, Mar 04 2019

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4, fascicle 1, section 7.1.4, pp. 134, 138, 139, 219, answer to exercise 172, Addison-Wesley, 2009.

Crossrefs

Cf. A083314.

Programs

  • Magma
    [(2*3^n-2^n+0^n)/2: n in [0..30]]; // Vincenzo Librandi, Feb 01 2015
  • Maple
    A083313 := proc(n)
        if n = 0 then
            1;
        else
            3^n-2^(n-1) ;
        end if;
    end proc: # R. J. Mathar, Aug 01 2013
  • Mathematica
    CoefficientList[Series[((1 - x) + (1 - 2 x) (1 - 3 x)) / (2 (1 - 2 x) (1 - 3 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Feb 01 2015 *)
    LinearRecurrence[{5,-6},{1,2,7},30] (* Harvey P. Dale, Sep 04 2017 *)
  • PARI
    Vec(((1-x)+(1-2*x)*(1-3*x))/(2*(1-2*x)*(1-3*x)) + O(x^30)) \\ Michel Marcus, Jan 31 2015
    
  • PARI
    print1(1,", ",s=2,", " );for(k=2,27,s=2^(k-2)+3*s;print1(s,", ")) \\ Hugo Pfoertner, Mar 04 2019
    

Formula

a(n) = (2*3^n - (2^n - 0^n))/2.
a(0) = 1, a(n) = 3^n - 2^(n-1) for n >= 1.
G.f.: ((1-x) + (1-2*x)*(1-3*x))/(2*(1-2*x)*(1-3*x)).
E.g.f.: (2*exp(3*x) - exp(2*x) + exp(0))/2.
a(n) = A090888(n-1, 4), for n > 0. - Ross La Haye, Sep 21 2004
Let b(n) = 2*(3/2)^n - 1. Then A003063(n) = -b(1-n)*3^(n-1) for n > 0. a(n) = A064686(n) = b(n)*2^(n-1) for n > 0. - Michael Somos, Aug 06 2006
From Alex Ratushnyak, Jul 03 2012: (Start)
a(n) mod 100 = 23 for n = 4*k-1, k >= 1.
a(n) mod 100 = 27 for n = 4*k+1, k >= 1.
(End)

Extensions

Better name by Alex Ratushnyak, Jul 02 2012

A064544 Biquanimous numbers (or biquams): group the digits into two pieces (not necessarily equal or in order) with the same sum.

Original entry on oeis.org

0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 112, 121, 123, 132, 134, 143, 145, 154, 156, 165, 167, 176, 178, 187, 189, 198, 202, 211, 213, 220, 224, 231, 235, 242, 246, 253, 257, 264, 268, 275, 279, 286, 297, 303, 312, 314, 321, 325, 330, 336, 341, 347, 352, 358
Offset: 0

Views

Author

David W. Wilson, Oct 09 2001

Keywords

Comments

This sequence is 10-automatic (decimal expansions form a regular language accepted by a finite automaton).

Examples

			143 is in the sequence because its digits {1, 4, 3} may be grouped so that 1+3 = 4.
		

Crossrefs

Cf. A064671, A064686 (number of n-digit base-3 biquams), A065023, A065024, A065025.

Programs

  • PARI
    is(n) = { my (d=digits(n), s=[0]); for (k=1, #d, s=setunion(apply(v -> v+d[k], s), apply(v -> v-d[k], s))); setsearch(s, 0)>0 } \\ Rémy Sigrist, Jan 23 2021

A053152 Number of 2-element intersecting families whose union is an n-element set.

Original entry on oeis.org

0, 2, 9, 32, 105, 332, 1029, 3152, 9585, 29012, 87549, 263672, 793065, 2383292, 7158069, 21490592, 64504545, 193579172, 580868589, 1742867912, 5229128025, 15688432652, 47067395109, 141206379632, 423627527505, 1270899359732, 3812731633629, 11438262009752
Offset: 1

Views

Author

Vladeta Jovovic, Goran Kilibarda, Feb 28 2000

Keywords

Crossrefs

Cf. A036239, A064686 (first differences).

Programs

  • Magma
    [Floor((3^n-2^n)/2): n in [1..30]]; // Vincenzo Librandi, Mar 17 2015
    
  • Maple
    A053152:=n->floor((3^n-2^n)/2): seq(A053152(n), n=1..30); # Wesley Ivan Hurt, Mar 19 2015
  • Mathematica
    CoefficientList[Series[x (2 - 3 x) / ((1 - x) (1 - 2 x) (1 - 3 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 17 2015 *)
    LinearRecurrence[{6,-11,6}, {0,2,9}, 50] (* G. C. Greubel, Oct 06 2017 *)
  • PARI
    for(n=1,50, print1((1/2)*(3^n -2^n -1), ", ")) \\ G. C. Greubel, Oct 06 2017
  • Sage
    [(3^n - 1)/2-2^(n-1) for n in range(1,27)] # Zerinvary Lajos, Jun 05 2009
    

Formula

a(n) = (1/2!)*(3^n-2^n-1).
From Colin Barker, Jun 26 2012: (Start)
a(n) = 6*a(n-1)-11*a(n-2)+6*a(n-3).
G.f.: x^2*(2-3*x)/((1-x)*(1-2*x)*(1-3*x)). (End)
a(n) = floor((3^n-2^n)/2). - Wesley Ivan Hurt, Mar 16 2015

Extensions

More terms from James Sellers, Mar 01 2000
a(27)-a(28) from Vincenzo Librandi, Mar 17 2015

A254027 Table T(n,k) = 3^n - 2^k read by antidiagonals.

Original entry on oeis.org

0, 2, -1, 8, 1, -3, 26, 7, -1, -7, 80, 25, 5, -5, -15, 242, 79, 23, 1, -13, -31, 728, 241, 77, 19, -7, -29, -63, 2186, 727, 239, 73, 11, -23, -61, -127, 6560, 2185, 725, 235, 65, -5, -55, -125, -255, 19682, 6559, 2183, 721, 227, 49, -37, -119, -253, -511, 59048, 19681, 6557, 2179, 713, 211, 17, -101, -247, -509, -1023
Offset: 0

Views

Author

K. G. Stier, Jan 22 2015

Keywords

Comments

Table shows differences of a given power of 3 to the powers of 2 (columns), and differences of the powers of 3 to a given power of 2 (rows), respectively.
Note that positive terms (table's upper right area) and negative terms (lower left area) are separated by an imaginary line with slope -log(3)/log(2) = -1.5849625.. (see A020857). This "border zone" of the table is of interest in terms of how close powers of 3 and powers of 2 can get: i.e., those T(n,k) where k/n is a good rational approximation to log(3)/log(2), see A254351 for numerators k and respective A060528 for denominators n.

Examples

			Table begins
   0    2   8  26  80..
  -1    1   7  25  79..
  -3   -1   5  23  73..
  -7   -5   1  19  65..
  -15 -13  -7  11  49..
  ..   ..  ..  ..  ..
		

Crossrefs

Row 0 (=3^n-1) is A024023.
Row 1 (=3^n-2) is A058481.
Row 2 (=3^n-4) is A168611.
Column 0 (=1-2^n) is (-1)A000225.
Column 1 (=3-2^n) is (-1)A036563.
Column 2 (=9-2^n) is (-1)A185346.
Column 3 (=27-2^n) is (-1)A220087.
0,0-Diagonal (=3^n-2^n) is A001047.
1,0-Diagonal (=3^n-2^(n-1)) for n>0 is A083313 or A064686.
0,1-Diagonal (=3^n-2^(n+1)) is A003063.
0,2-Diagonal (=3^n-2^(n+2)) is A214091.

Programs

  • Mathematica
    Table[3^(n-k) - 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2017 *)
  • PARI
    for(i=0, 10, {
         for(j=0, i, print1((3^(i-j)-2^j),", "))
    });
Showing 1-5 of 5 results.