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

A001047 a(n) = 3^n - 2^n.

Original entry on oeis.org

0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - R. H. Hardin, Mar 21 2002
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - Joshua Zucker, Nov 19 2003
a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - Paul Barry, Apr 19 2005
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - Giorgio Balzarotti, Nov 18 2006
Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - Ross La Haye, Dec 22 2006
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - Wolfdieter Lang, Oct 08 2011
Partial sums give A000392. - Jon Perry, Apr 05 2014
For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 17 2017
a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - Enrique Navarrete, Apr 05 2021
a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - John Elias, Oct 13 2021
Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - Jianing Song, Jun 18 2022
From Manfred Boergens, Mar 29 2023: (Start)
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - Ambrosio Valencia-Romero, Apr 11 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[ 3^n - 2^n, {n, 0, 25} ]
    LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
    Numerator@NestList[(3#+1)/2&,1/2,100] (* Zak Seidov, Oct 03 2011 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - Paul Barry, Aug 18 2003
a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

A024023 a(n) = 3^n - 1.

Original entry on oeis.org

0, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, 59048, 177146, 531440, 1594322, 4782968, 14348906, 43046720, 129140162, 387420488, 1162261466, 3486784400, 10460353202, 31381059608, 94143178826, 282429536480, 847288609442, 2541865828328, 7625597484986, 22876792454960
Offset: 0

Views

Author

Keywords

Comments

Number of different directions along lines and hyper-diagonals in an n-dimensional cubic lattice for the attacking queens problem (A036464 in n=2, A068940 in n=3 and A068941 in n=4). The n-dimensional direction vectors have the a(n)+1 Cartesian coordinates (i,j,k,l,...) where i,j,k,l,... = -1, 0, or +1, excluding the zero-vector i=j=k=l=...=0. The corresponding hyper-line count is A003462. - R. J. Mathar, May 01 2006
Total number of sequences of length m=1,...,n with nonzero integer elements satisfying the condition Sum_{k=1..m} |n_k| <= n. See the K. A. Meissner link p. 6 (with a typo: it should be 3^([2a]-1)-1). - Wolfdieter Lang, Jan 21 2008
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x and y are disjoint and either 0) x is a proper subset of y or y is a proper subset of x, or 1) x is not a subset of y and y is not a subset of x. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Number of neighbors in Moore's neighborhood in n dimensions. - Dmitry Zaitsev, Nov 30 2015
Number of terms in conjunctive normal form of Boolean expression with n variables. E.g., a(2) = 8: [~x, ~y, x, y, ~x|~y, ~x|y, x|~y, x|y]. - Yuchun Ji, May 12 2023
Number of rays of the Coxeter arrangement of type B_n. Equivalently, number of facets of the n-dimensional type B permutahedron. - Jose Bastidas, Sep 12 2023

Examples

			From _Zerinvary Lajos_, Jan 14 2007: (Start)
Ternary......decimal:
0...............0
2...............2
22..............8
222............26
2222...........80
22222.........242
222222........728
2222222......2186
22222222.....6560
222222222...19682
2222222222..59048
etc...........etc.
(End)
Sequence combinatorics: n=3: With length m=1: [1],[2],[3] each with 2 signs, with m=2: [1,1], [1,2], [2,1], each 2^2 = 4 times from choosing signs; m=3: [1,1,1] coming in 2^3 signed versions: 3*2 + 3*4 + 1*8 = 26 = a(3). The order is important, hence the M_0 multinomials A048996 enter as factors.
A027902 gives the 384 divisors of a(24). - _Reinhard Zumkeller_, Mar 11 2010
		

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203.

Crossrefs

Cf. triangle A013609.
Cf. second column of A145901.

Programs

Formula

a(n) = A000244(n) - 1.
a(n) = 2*A003462(n). - R. J. Mathar, May 01 2006
A128760(a(n)) > 0. - Reinhard Zumkeller, Mar 25 2007
G.f.: 2*x/((-1+x)*(-1+3*x)) = 1/(-1+x) - 1/(-1+3*x). - R. J. Mathar, Nov 19 2007
a(n) = Sum_{k=1..n} Sum_{m=1..k} binomial(k-1,m-1)*2^m, n >= 1. a(0)=0. From the sequence combinatorics mentioned above. Twice partial sums of powers of 3.
E.g.f.: e^(3*x) - e^x. - Mohammad K. Azarian, Jan 14 2009
a(n) = A024101(n)/A034472(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = 3*a(n-1) + 2 (with a(0)=0). - Vincenzo Librandi, Nov 19 2010
E.g.f.: -E(0) where E(k) = 1 - 3^k/(1 - x/(x - 3^k*(k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
a(n) = A227048(n,A020914(n)). - Reinhard Zumkeller, Jun 30 2013
Sum_{n>=1} 1/a(n) = A214369. - Amiram Eldar, Nov 11 2020
a(n) = Sum_{k=1..n} 2^k*binomial(n,k). - Ridouane Oudra, Jun 15 2025
From Peter Bala, Jul 01 2025: (Start)
For n >= 1, a(2*n)/a(n) = A034472(n) and a(3*n)/a(n) = A034513(n).
Modulo differences in offsets, exp( Sum_{n >= 1} a(k*n)/a(n)*x^n/n ) is the o.g.f. of A003462 (k = 2), A006100 (k = 3), A006101 (k = 4), A006102 (k = 5), A022196 (k = 6), A022197 (k = 7), A022198 (k = 8), A022199 (k = 9), A022200 (k = 10), A022201 (k = 11), A022202 (k = 12) and A022203 (k = 13).
The following are all examples of telescoping series:
Sum_{n >= 1} 3^n/(a(n)*a(n+1)) = 1/2^2; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/(2*8^2).
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+k)) = 1/(a(1)*a(2)*...*a(k)*a(k)).
Sum_{n >= 1} 3^n/(a(n)*a(n+2)) = 5/64; Sum_{n >= 1} (-3)^n/(a(n)*a(n+2)) = -3/64.
Sum_{n >= 1} 3^n/(a(n)*a(n+4)) = 703/83200; Sum_{n >= 1} (-3)^n/(a(n)*a(n+4)) = - 417/83200. (End)

A020914 Number of digits in the base-2 representation of 3^n.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 18, 20, 21, 23, 24, 26, 27, 29, 31, 32, 34, 35, 37, 39, 40, 42, 43, 45, 46, 48, 50, 51, 53, 54, 56, 58, 59, 61, 62, 64, 65, 67, 69, 70, 72, 73, 75, 77, 78, 80, 81, 83, 85, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 105, 107
Offset: 0

Views

Author

Keywords

Comments

Also, numbers k such that the first digit in the ternary expansion of 2^k is 1. - Mohammed Bouayoun (Mohammed.bouayoun(AT)sanef.com), Apr 24 2006
a(n) is the smallest integer such that n/a(n) < log_2(3). - Trevor G. Hyde (thyde12(AT)amherst.edu), Jul 31 2008
This sequence represents allowable values of the "dropping time" in the Collatz (3x+1) problem when iterated according to the function f(n) := n/2 if n is even, (3n+1)/2 otherwise, as tabulated in A126241. There is one exception, A126241(1), which has been set to zero by convention. - K. Spage, Oct 22 2009
An integer k is a term of A020914 if and only if floor(k*(1 + log(2)/log(3))) - abs(k-1)*(1 + log(2)/log(3)) - 1 >= 0. - K. Spage, Oct 22 2009
Also smallest k such that ceiling(2^k / 3^n) = 2. - Michel Lagneau, Jan 31 2012
For n > 0, first differences of A022330. - Michel Marcus, Oct 03 2013
Also the number of powers of two less than or equal to 3^n. - Robert G. Wilson v, May 25 2014
Except for 1, A020914 is the complement of A054414 and therefore these two form a pair of Beatty sequences. - Robert G. Wilson v, May 25 2014

Crossrefs

Cf. A056576, A054414, A070939, A000244, A227048, A022330, A022921 (first differences), A126241.
Cf. A020857 (decimal expansion of log_2(3)).
Cf. A020915.
Cf. A204399 (essentially the same).

Programs

Formula

a(n) = floor(1 + n*log(3)/log(2)). - K. Spage, Oct 22 2009
a(0) = 1, a(n+1) = a(n) + A022921(n). - K. Spage, Oct 23 2009
a(n) = A122437(n-1) - n. - K. Spage, Oct 23 2009
A098294(n) = a(n) + n for n > 0. - Mike Winkler, Dec 31 2010
a(n) = A070939(A000244(n)) = length of n-th row in triangle A227048. - Reinhard Zumkeller, Jun 30 2013
a(n) = 1 + floor(n*log_2(3)) = 1 + A056576(n) = 1 + floor(n*A020857). - L. Edson Jeffery, Dec 12 2014
A020915(a(n)) = n + 1. - Reinhard Zumkeller, Mar 28 2015

Extensions

More terms from Stefan Steinerberger, Apr 19 2006

A098294 a(n) = ceiling(n*log_2(3/2)).

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 27, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 34, 35, 36, 36, 37, 37, 38, 39, 39, 40, 40, 41, 41, 42, 43, 43, 44
Offset: 0

Views

Author

Wolfdieter Lang, Oct 18 2004

Keywords

Comments

Original name was: Smallest exponent of 2 which gives a power of 2 which is equal to or bigger than (3/2)^n, n = 0,1,... .
Stacking perfect fifths (the frequency ratio of a fifth is 3/2) this sequence determines into which octave the n-th fifth falls. For example, the third fifth, (3/2)^3, falls into the second octave, which means that it lies in the interval [2^1,2^2)=[2,4). The k-th octave comprises ratios in the interval [2^(k-1),2^k), k=1,2,...
Related to the initial number of sequential even terms in an "ideal" sequence under iteration of the 3x+1 Problem on a positive odd value m, where the piecewise function f is given by f(2*m)=m, f(2*m+1)=6*m+4, to ensure f^A122437(n) (m) < m, where n > 1 is the number of odds in the sequence (including m) and floor(1+n*(log(3)/log(2))) is the number of evens. An "ideal" sequence minimizes the effects of f(2*m+1) by following a certain order of even or odd terms along with the rules of the function. A representation of such sequences in terms of parity sequences for values n >= 2 follows:
n=2, (o,e,e,o,e,e)
n=3, (o,e,e,o,e,o,e,e)
n=4, (o,e,e,e,o,e,o,e,o,e,e)
n=5, (o,e,e,e,o,e,o,e,o,e,o,e,e)
n=6, (o,e,e,e,e,o,e,o,e,o,e,o,e,o,e,e)
n=7, (o,e,e,e,e,e,o,e,o,e,o,e,o,e,o,e,o,e,e)
The pattern is clear, and the formula for the initial number of sequential even terms in each sequence is given by a(n) = floor(1+n*(log(3)/log(2)))-n for n > 1, where the sum of the number of even and odd terms is given by A122437(n) for n > 1. Of course, most values m do not have sequences following this pattern of iteration under f. Also, the reason for placing an extra even term at the end of such sequences is to mitigate to some degree the effects of the possibility that the last odd term is only "slightly" larger than m, i.e., (3*m+1)/4 < m for all m > 1. - Jeffrey R. Goodwin, Aug 25 2011
a(n) gives the position in n-th row of A227048 where (3^n - 2^n) occurs:
A227048(n,a(n)) = A001047(n). - Reinhard Zumkeller, Jun 30 2013
Differs from A005378 at indices n = 0,17,20,22,25,27,29,30,... - M. F. Hasler, Jun 29 2014

Examples

			a(0) = 0 because 2^0 = 1 = (3/2)^0 but 2^(-1) = 1/2 < 1.
a(11) = 7 because 2^7 = 128 > 86.497... = (3/2)^11 but 2^6 = 64 < (3/2)^11.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a098294 0  = 0
    a098294 n  = fromJust (a001047 n `elemIndex` a227048_row n) + 1
    -- Reinhard Zumkeller, Jun 30 2013
    
  • Magma
    [0] cat [Floor(1 + n * Log(3)/Log(2)) - n: n in [1..70]]; // Vincenzo Librandi, Jul 13 2015
    
  • Maple
    seq(ceil(n*log[2](3/2)),n=0..100); # Robert Israel, Jul 12 2015
  • Mathematica
    With[{c=Log2[3/2]},Ceiling[c*Range[0,80]]] (* Harvey P. Dale, Feb 24 2024 *)
  • PARI
    a(n)=ceil(n*log(3/2)/log(2)) \\ Charles R Greathouse IV, Jul 13 2015
    
  • PARI
    a(n) = !!n + logint(3^n, 2) - n \\ Ruud H.G. van Tol, Nov 21 2023

Formula

2^a(n) >= (3/2)^n but 2^(a(n) - 1) < (3/2)^n, n >= 0.
a(n) = ceiling(tau*n) with tau := log(3)/log(2) - 1 = 0.584962501..., n >= 0.
a(n) = floor(1 + n * log(3)/log(2)) - n, n >= 1. - Mike Winkler, Dec 31 2010

A056577 Difference between 3^n and highest power of 2 less than or equal to 3^n.

Original entry on oeis.org

0, 1, 1, 11, 17, 115, 217, 139, 2465, 3299, 26281, 46075, 7153, 545747, 588665, 5960299, 9492289, 62031299, 118985033, 88519643, 1339300753, 1870418611, 14201190425, 25423702091, 7551629537
Offset: 0

Views

Author

Henry Bottomley, Jun 29 2000

Keywords

Comments

a(n) = A227048(n,1). - Reinhard Zumkeller, Jun 30 2013

Examples

			a(3)=11 because 3^3 = 27 and 27 - 16 = 11.
		

Crossrefs

Programs

Formula

a(n) = 3^n - 2^floor(log_2(3^n)) = A000244(n) - 2^A056576(n).

A192111 Monotonic ordering of nonnegative differences 3^i-2^j, for i>=0, j>=0.

Original entry on oeis.org

0, 1, 2, 5, 7, 8, 11, 17, 19, 23, 25, 26, 49, 65, 73, 77, 79, 80
Offset: 1

Views

Author

Clark Kimberling, Jun 23 2011

Keywords

Comments

Complement of A173671 in the nonnegative integers.

Crossrefs

Cf. A173671 (complement), A192110, A227048 (partial unions of rows).

Extensions

Deleted unwarranted programs and b-file. Only the terms in A173671 (that is, up to 100) have been proved to be correct. - N. J. A. Sloane, Oct 21 2019

A173671 Positive integers that cannot be expressed as 3^m-2^n where m and n are integers.

Original entry on oeis.org

3, 4, 6, 9, 10, 12, 13, 14, 15, 16, 18, 20, 21, 22, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 78, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Max Alekseyev, Nov 24 2010

Keywords

Comments

The complement of this set, i.e., integers of the form 3^m-2^n, is A192111. - M. F. Hasler, Nov 24 2010

Crossrefs

Extensions

Deleted unwarranted programs and b-file. - N. J. A. Sloane, Oct 21 2019

A196486 Irregular triangle 3^n-2^m.

Original entry on oeis.org

1, 7, 5, 1, 25, 23, 19, 11, 79, 77, 73, 65, 49, 17, 241, 239, 235, 227, 211, 179, 115, 727, 725, 721, 713, 697, 665, 601, 473, 217, 2185, 2183, 2179, 2171, 2155, 2123, 2059, 1931, 1675, 1163, 139, 6559, 6557, 6553, 6545, 6529, 6497, 6433, 6305, 6049, 5537
Offset: 1

Views

Author

Zak Seidov, Oct 03 2011

Keywords

Comments

Each n-th row consists of A056576(n) terms, the first term is 3^n-2, n-th term is 3^n-2^n=A001047(n), and the last term is A056577(n).
T(n,k) = A227048(n,A056576(n)-k) for k = 1..A056576(n). - Reinhard Zumkeller, Jun 30 2013

Examples

			Rows are:
n=1: 1
n=2: 7,5,1
n=3: 25,23,19,11
n=4: 79,77,73,65,49,17
n=5: 241,239,235,227,211,179,115.
		

Crossrefs

Programs

  • Haskell
    a196486 n k = a196486_tabf !! (n-1) !! (k-1)
    a196486_row n = a196486_tabf !! (n-1)
    a196486_tabf = map (tail . reverse) $ tail a227048_tabf
    -- Reinhard Zumkeller, Jun 30 2013
  • Mathematica
    Flatten[Table[3^k - 2^m, {k, 10}, {m, Floor[Log[2, 3^k]]}]]
Showing 1-8 of 8 results.