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

A000079 Powers of 2: a(n) = 2^n.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0

Views

Author

Keywords

Comments

2^0 = 1 is the only odd power of 2.
Number of subsets of an n-set.
There are 2^(n-1) compositions (ordered partitions) of n (see for example Riordan). This is the unlabeled analog of the preferential labelings sequence A000670.
This is also the number of weakly unimodal permutations of 1..n + 1, that is, permutations with exactly one local maximum. E.g., a(4) = 16: 12345, 12354, 12453, 12543, 13452, 13542, 14532 and 15432 and their reversals. - Jon Perry, Jul 27 2003 [Proof: see next line! See also A087783.]
Proof: n must appear somewhere and there are 2^(n-1) possible choices for the subset that precedes it. These must appear in increasing order and the rest must follow n in decreasing order. QED. - N. J. A. Sloane, Oct 26 2003
a(n+1) is the smallest number that is not the sum of any number of (distinct) earlier terms.
Same as Pisot sequences E(1, 2), L(1, 2), P(1, 2), T(1, 2). See A008776 for definitions of Pisot sequences.
With initial 1 omitted, same as Pisot sequences E(2, 4), L(2, 4), P(2, 4), T(2, 4). - David W. Wilson
Not the sum of two or more consecutive numbers. - Lekraj Beedassy, May 14 2004
Least deficient or near-perfect numbers (i.e., n such that sigma(n) = A000203(n) = 2n - 1). - Lekraj Beedassy, Jun 03 2004. [Comment from Max Alekseyev, Jan 26 2005: All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2.]
Almost-perfect numbers referred to as least deficient or slightly defective (Singh 1997) numbers. Does "near-perfect numbers" refer to both almost-perfect numbers (sigma(n) = 2n - 1) and quasi-perfect numbers (sigma(n) = 2n + 1)? There are no known quasi-perfect or least abundant or slightly excessive (Singh 1997) numbers.
The sum of the numbers in the n-th row of Pascal's triangle; the sum of the coefficients of x in the expansion of (x+1)^n.
The Collatz conjecture (the hailstone sequence will eventually reach the number 1, regardless of which positive integer is chosen initially) may be restated as (the hailstone sequence will eventually reach a power of 2, regardless of which positive integer is chosen initially).
The only hailstone sequence which doesn't rebound (except "on the ground"). - Alexandre Wajnberg, Jan 29 2005
With p(n) as the number of integer partitions of n, p(i) is the number of parts of the i-th partition of n, d(i) is the number of different parts of the i-th partition of n, m(i,j) is the multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i = 1..p(n)} (p(i)! / (Product_{j=1..d(i)} m(i,j)!)). - Thomas Wieder, May 18 2005
The number of binary relations on an n-element set that are both symmetric and antisymmetric. Also the number of binary relations on an n-element set that are symmetric, antisymmetric and transitive.
The first differences are the sequence itself. - Alexandre Wajnberg and Eric Angelini, Sep 07 2005
a(n) is the largest number with shortest addition chain involving n additions. - David W. Wilson, Apr 23 2006
Beginning with a(1) = 0, numbers not equal to the sum of previous distinct natural numbers. - Giovanni Teofilatto, Aug 06 2006
For n >= 1, a(n) is equal to the number of functions f:{1, 2, ..., n} -> {1, 2} such that for a fixed x in {1, 2, ..., n} and a fixed y in {1, 2} we have f(x) != y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
Let P(A) be the power set of an n-element set A. Then a(n) is the number of pairs of elements {x,y} of P(A) for which x = y. - Ross La Haye, Jan 09 2008
a(n) is the number of permutations on [n+1] such that every initial segment is an interval of integers. Example: a(3) counts 1234, 2134, 2314, 2341, 3214, 3241, 3421, 4321. The map "p -> ascents of p" is a bijection from these permutations to subsets of [n]. An ascent of a permutation p is a position i such that p(i) < p(i+1). The permutations shown map to 123, 23, 13, 12, 3, 2, 1 and the empty set respectively. - David Callan, Jul 25 2008
2^(n-1) is the largest number having n divisors (in the sense of A077569); A005179(n) is the smallest. - T. D. Noe, Sep 02 2008
a(n) appears to match the number of divisors of the modified primorials (excluding 2, 3 and 5). Very limited range examined, PARI example shown. - Bill McEachen, Oct 29 2008
Successive k such that phi(k)/k = 1/2, where phi is Euler's totient function. - Artur Jasinski, Nov 07 2008
A classical transform consists (for general a(n)) in swapping a(2n) and a(2n+1); examples for Jacobsthal A001045 and successive differences: A092808, A094359, A140505. a(n) = A000079 leads to 2, 1, 8, 4, 32, 16, ... = A135520. - Paul Curtz, Jan 05 2009
This is also the (L)-sieve transform of {2, 4, 6, 8, ..., 2n, ...} = A005843. (See A152009 for the definition of the (L)-sieve transform.) - John W. Layman, Jan 23 2009
a(n) = a(n-1)-th even natural number (A005843) for n > 1. - Jaroslav Krizek, Apr 25 2009
For n >= 0, a(n) is the number of leaves in a complete binary tree of height n. For n > 0, a(n) is the number of nodes in an n-cube. - K.V.Iyer, May 04 2009
Permutations of n+1 elements where no element is more than one position right of its original place. For example, there are 4 such permutations of three elements: 123, 132, 213, and 312. The 8 such permutations of four elements are 1234, 1243, 1324, 1423, 2134, 2143, 3124, and 4123. - Joerg Arndt, Jun 24 2009
Catalan transform of A099087. - R. J. Mathar, Jun 29 2009
a(n) written in base 2: 1,10,100,1000,10000,..., i.e., (n+1) times 1, n times 0 (A011557(n)). - Jaroslav Krizek, Aug 02 2009
Or, phi(n) is equal to the number of perfect partitions of n. - Juri-Stepan Gerasimov, Oct 10 2009
These are the 2-smooth numbers, positive integers with no prime factors greater than 2. - Michael B. Porter, Oct 04 2009
A064614(a(n)) = A000244(n) and A064614(m) < A000244(n) for m < a(n). - Reinhard Zumkeller, Feb 08 2010
a(n) is the largest number m such that the number of steps of iterations of {r - (largest divisor d < r)} needed to reach 1 starting at r = m is equal to n. Example (a(5) = 32): 32 - 16 = 16; 16 - 8 = 8; 8 - 4 = 4; 4 - 2 = 2; 2 - 1 = 1; number 32 has 5 steps and is the largest such number. See A105017, A064097, A175125. - Jaroslav Krizek, Feb 15 2010
a(n) is the smallest proper multiple of a(n-1). - Dominick Cancilla, Aug 09 2010
The powers-of-2 triangle T(n, k), n >= 0 and 0 <= k <= n, begins with: {1}; {2, 4}; {8, 16, 32}; {64, 128, 256, 512}; ... . The first left hand diagonal T(n, 0) = A006125(n + 1), the first right hand diagonal T(n, n) = A036442(n + 1) and the center diagonal T(2*n, n) = A053765(n + 1). Some triangle sums, see A180662, are: Row1(n) = A122743(n), Row2(n) = A181174(n), Fi1(n) = A181175(n), Fi2(2*n) = A181175(2*n) and Fi2(2*n + 1) = 2*A181175(2*n + 1). - Johannes W. Meijer, Oct 10 2010
Records in the number of prime factors. - Juri-Stepan Gerasimov, Mar 12 2011
Row sums of A152538. - Gary W. Adamson, Dec 10 2008
A078719(a(n)) = 1; A006667(a(n)) = 0. - Reinhard Zumkeller, Oct 08 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=1, a(n) equals the number of 2-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Equals A001405 convolved with its right-shifted variant: (1 + 2x + 4x^2 + ...) = (1 + x + 2x^2 + 3x^3 + 6x^4 + 10x^5 + ...) * (1 + x + x^2 + 2x^3 + 3x^4 + 6x^5 + ...). - Gary W. Adamson, Nov 23 2011
The number of odd-sized subsets of an n+1-set. For example, there are 2^3 odd-sized subsets of {1, 2, 3, 4}, namely {1}, {2}, {3}, {4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, and {2, 3, 4}. Also, note that 2^n = Sum_{k=1..floor((n+1)/2)} C(n+1, 2k-1). - Dennis P. Walsh, Dec 15 2011
a(n) is the number of 1's in any row of Pascal's triangle (mod 2) whose row number has exactly n 1's in its binary expansion (see A007318 and A047999). (The result of putting together A001316 and A000120.) - Marcus Jaiclin, Jan 31 2012
A204455(k) = 1 if and only if k is in this sequence. - Wolfdieter Lang, Feb 04 2012
For n>=1 apparently the number of distinct finite languages over a unary alphabet, whose minimum regular expression has alphabetic width n (verified up to n=17), see the Gruber/Lee/Shallit link. - Hermann Gruber, May 09 2012
First differences of A000225. - Omar E. Pol, Feb 19 2013
This is the lexicographically earliest sequence which contains no arithmetic progression of length 3. - Daniel E. Frohardt, Apr 03 2013
a(n-2) is the number of bipartitions of {1..n} (i.e., set partitions into two parts) such that 1 and 2 are not in the same subset. - Jon Perry, May 19 2013
Numbers n such that the n-th cyclotomic polynomial has a root mod 2; numbers n such that the n-th cyclotomic polynomial has an even number of odd coefficients. - Eric M. Schmidt, Jul 31 2013
More is known now about non-power-of-2 "Almost Perfect Numbers" as described in Dagal. - Jonathan Vos Post, Sep 01 2013
Number of symmetric Ferrers diagrams that fit into an n X n box. - Graham H. Hawkes, Oct 18 2013
Numbers n such that sigma(2n) = 2n + sigma(n). - Jahangeer Kholdi, Nov 23 2013
a(1), ..., a(floor(n/2)) are all values of permanent on set of square (0,1)-matrices of order n>=2 with row and column sums 2. - Vladimir Shevelev, Nov 26 2013
Numbers whose base-2 expansion has exactly one bit set to 1, and thus has base-2 sum of digits equal to one. - Stanislav Sykora, Nov 29 2013
A072219(a(n)) = 1. - Reinhard Zumkeller, Feb 20 2014
a(n) is the largest number k such that (k^n-2)/(k-2) is an integer (for n > 1); (k^a(n)+1)/(k+1) is never an integer (for k > 1 and n > 0). - Derek Orr, May 22 2014
If x = A083420(n), y = a(n+1) and z = A087289(n), then x^2 + 2*y^2 = z^2. - Vincenzo Librandi, Jun 09 2014
The mini-sequence b(n) = least number k > 0 such that 2^k ends in n identical digits is given by {1, 18, 39}. The repeating digits are {2, 4, 8} respectively. Note that these are consecutive powers of 2 (2^1, 2^2, 2^3), and these are the only powers of 2 (2^k, k > 0) that are only one digit. Further, this sequence is finite. The number of n-digit endings for a power of 2 with n or more digits id 4*5^(n-1). Thus, for b(4) to exist, one only needs to check exponents up to 4*5^3 = 500. Since b(4) does not exist, it is clear that no other number will exist. - Derek Orr, Jun 14 2014
The least number k > 0 such that 2^k ends in n consecutive decreasing digits is a 3-number sequence given by {1, 5, 25}. The consecutive decreasing digits are {2, 32, 432}. There are 100 different 3-digit endings for 2^k. There are no k-values such that 2^k ends in '987', '876', '765', '654', '543', '321', or '210'. The k-values for which 2^k ends in '432' are given by 25 mod 100. For k = 25 + 100*x, the digit immediately before the run of '432' is {4, 6, 8, 0, 2, 4, 6, 8, 0, 2, ...} for x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...}, respectively. Thus, we see the digit before '432' will never be a 5. So, this sequence is complete. - Derek Orr, Jul 03 2014
a(n) is the number of permutations of length n avoiding both 231 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Numbers n such that sigma(n) = sigma(2n) - phi(4n). - Farideh Firoozbakht, Aug 14 2014
This is a B_2 sequence: for i < j, differences a(j) - a(i) are all distinct. Here 2*a(n) < a(n+1) + 1, so a(n) - a(0) < a(n+1) - a(n). - Thomas Ordowski, Sep 23 2014
a(n) counts n-walks (closed) on the graph G(1-vertex; 1-loop, 1-loop). - David Neil McGrath, Dec 11 2014
a(n-1) counts walks (closed) on the graph G(1-vertex; 1-loop, 2-loop, 3-loop, 4-loop, ...). - David Neil McGrath, Jan 01 2015
b(0) = 4; b(n+1) is the smallest number not in the sequence such that b(n+1) - Prod_{i=0..n} b(i) divides b(n+1) - Sum_{i=0..n} b(i). Then b(n) = a(n) for n > 2. - Derek Orr, Jan 15 2015
a(n) counts the permutations of length n+2 whose first element is 2 such that the permutation has exactly one descent. - Ran Pan, Apr 17 2015
a(0)-a(30) appear, with a(26)-a(30) in error, in tablet M 08613 (see CDLI link) from the Old Babylonian period (c. 1900-1600 BC). - Charles R Greathouse IV, Sep 03 2015
Subsequence of A028982 (the squares or twice squares sequence). - Timothy L. Tiffin, Jul 18 2016
A000120(a(n)) = 1. A000265(a(n)) = 1. A000593(a(n)) = 1. - Juri-Stepan Gerasimov, Aug 16 2016
Number of monotone maps f : [0..n] -> [0..n] which are order-increasing (i <= f(i)) and idempotent (f(f(i)) = f(i)). In other words, monads on the n-th ordinal (seen as a posetal category). Any monad f determines a subset of [0..n] that contains n, by considering its set of monad algebras = fixed points { i | f(i) = i }. Conversely, any subset S of [0..n] containing n determines a monad on [0..n], by the function i |-> min { j | i <= j, j in S }. - Noam Zeilberger, Dec 11 2016
Consider n points lying on a circle. Then for n>=2 a(n-2) gives the number of ways to connect two adjacent points with nonintersecting chords. - Anton Zakharov, Dec 31 2016
Satisfies Benford's law [Diaconis, 1977; Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
Also the number of independent vertex sets and vertex covers in the n-empty graph. - Eric W. Weisstein, Sep 21 2017
Also the number of maximum cliques in the n-halved cube graph for n > 4. - Eric W. Weisstein, Dec 04 2017
Number of pairs of compositions of n corresponding to a seaweed algebra of index n-1. - Nick Mayers, Jun 25 2018
The multiplicative group of integers modulo a(n) is cyclic if and only if n = 0, 1, 2. For n >= 3, it is a product of two cyclic groups. - Jianing Song, Jun 27 2018
k^n is the determinant of n X n matrix M_(i, j) = binomial(k + i + j - 2, j) - binomial(i+j-2, j), in this case k=2. - Tony Foster III, May 12 2019
Solutions to the equation Phi(2n + 2*Phi(2n)) = 2n. - M. Farrokhi D. G., Jan 03 2020
a(n-1) is the number of subsets of {1,2,...,n} which have an element that is the size of the set. For example, for n = 4, a(3) = 8 and the subsets are {1}, {1,2}, {2,3}, {2,4}, {1,2,3}, {1,3,4}, {2,3,4}, {1,2,3,4}. - Enrique Navarrete, Nov 21 2020
a(n) is the number of self-inverse (n+1)-order permutations with 231-avoiding. E.g., a(3) = 8: [1234, 1243, 1324, 1432, 2134, 2143, 3214, 4321]. - Yuchun Ji, Feb 26 2021
For any fixed k > 0, a(n) is the number of ways to tile a strip of length n+1 with tiles of length 1, 2, ... k, where the tile of length k can be black or white, with the restriction that the first tile cannot be black. - Greg Dresden and Bora Bursalı, Aug 31 2023

Examples

			There are 2^3 = 8 subsets of a 3-element set {1,2,3}, namely { -, 1, 2, 3, 12, 13, 23, 123 }.
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 1016.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 73, 84.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.5 Logarithms and §8.1 Terminology, pp. 150, 264.
  • Paul J. Nahin, An Imaginary Tale: The Story of sqrt(-1), Princeton University Press, Princeton, NJ. 1998, pp. 69-70.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 273.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 124.
  • 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).
  • V. E. Tarakanov, Combinatorial problems on binary matrices, Combin. Analysis, MSU, 5 (1980), 4-15. (Russian)
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 141.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

This is the Hankel transform (see A001906 for the definition) of A000984, A002426, A026375, A026387, A026569, A026585, A026671 and A032351. - John W. Layman, Jul 31 2000
Euler transform of A001037, A209406 (multisets), inverse binomial transform of A000244, binomial transform of A000012.
Complement of A057716.
Boustrophedon transforms: A000734, A000752.
Range of values of A006519, A007875, A011782, A030001, A034444, A037445, A053644, and A054243.
Cf. A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (sum of 2, ..., 9 distinct powers of 2).
Cf. A090129.
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

  • Haskell
    a000079 = (2 ^)
    a000079_list = iterate (* 2) 1
    -- Reinhard Zumkeller, Jan 22 2014, Mar 05 2012, Dec 29 2011
    
  • Magma
    [2^n: n in [0..40]]; // Vincenzo Librandi, Feb 17 2014
    
  • Magma
    [n le 2 select n else 5*Self(n-1)-6*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Feb 17 2014
    
  • Maple
    A000079 := n->2^n; [ seq(2^n,n=0..50) ];
    isA000079 := proc(n)
        local fs;
        fs := numtheory[factorset](n) ;
        if n = 1 then
            true ;
        elif nops(fs) <> 1 then
            false;
        elif op(1,fs) = 2 then
            true;
        else
            false ;
        end if;
    end proc: # R. J. Mathar, Jan 09 2017
  • Mathematica
    Table[2^n, {n, 0, 50}]
    2^Range[0, 50] (* Wesley Ivan Hurt, Jun 14 2014 *)
    LinearRecurrence[{2}, {2}, {0, 20}] (* Eric W. Weisstein, Sep 21 2017 *)
    CoefficientList[Series[1/(1 - 2 x), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    NestList[2# &, 1, 40] (* Harvey P. Dale, Oct 07 2019 *)
  • Maxima
    A000079(n):=2^n$ makelist(A000079(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    A000079(n)=2^n \\ Edited by M. F. Hasler, Aug 27 2014
    
  • PARI
    unimodal(n)=local(x,d,um,umc); umc=0; for (c=0,n!-1, x=numtoperm(n,c); d=0; um=1; for (j=2,n,if (x[j]x[j-1] && d==1,um=0); if (um==0,break)); if (um==1,print(x)); umc+=um); umc
    
  • Python
    def a(n): return 1<Michael S. Branicky, Jul 28 2022
    
  • Python
    def is_powerof2(n) -> bool: return n and (n & (n - 1)) == 0  # Peter Luschny, Apr 10 2025
  • Scala
    (List.fill(20)(2: BigInt)).scanLeft(1: BigInt)( * ) // Alonso del Arte, Jan 16 2020
    
  • Scheme
    (define (A000079 n) (expt 2 n)) ;; Antti Karttunen, Mar 21 2017
    

Formula

a(n) = 2^n.
a(0) = 1; a(n) = 2*a(n-1).
G.f.: 1/(1 - 2*x).
E.g.f.: exp(2*x).
a(n)= Sum_{k = 0..n} binomial(n, k).
a(n) is the number of occurrences of n in A000523. a(n) = A001045(n) + A001045(n+1). a(n) = 1 + Sum_{k = 0..(n - 1)} a(k). The Hankel transform of this sequence gives A000007 = [1, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Feb 25 2004
n such that phi(n) = n/2, for n > 1, where phi is Euler's totient (A000010). - Lekraj Beedassy, Sep 07 2004
a(n + 1) = a(n) XOR 3*a(n) where XOR is the binary exclusive OR operator. - Philippe Deléham, Jun 19 2005
a(n) = StirlingS2(n + 1, 2) + 1. - Ross La Haye, Jan 09 2008
a(n+2) = 6a(n+1) - 8a(n), n = 1, 2, 3, ... with a(1) = 1, a(2) = 2. - Yosu Yurramendi, Aug 06 2008
a(n) = ka(n-1) + (4 - 2k)a(n-2) for any integer k and n > 1, with a(0) = 1, a(1) = 2. - Jaume Oliver Lafont, Dec 05 2008
a(n) = Sum_{l_1 = 0..n + 1} Sum_{l_2 = 0..n}...Sum_{l_i = 0..n - i}...Sum_{l_n = 0..1} delta(l_1, l_2, ..., l_i, ..., l_n) where delta(l_1, l_2, ..., l_i, ..., l_n) = 0 if any l_i <= l_(i+1) and l_(i+1) != 0 and delta(l_1, l_2, ..., l_i, ..., l_n) = 1 otherwise. - Thomas Wieder, Feb 25 2009
a(0) = 1, a(1) = 2; a(n) = a(n-1)^2/a(n-2), n >= 2. - Jaume Oliver Lafont, Sep 22 2009
a(n) = A173786(n, n)/2 = A173787(n + 1, n). - Reinhard Zumkeller, Feb 28 2010
If p[i] = i - 1 and if A is the Hessenberg matrix of order n defined by: A[i, j] = p[j - i + 1], (i <= j), A[i, j] = -1, (i = j + 1), and A[i, j] = 0 otherwise. Then, for n >= 1, a(n-1) = det A. - Milan Janjic, May 02 2010
If p[i] = Fibonacci(i-2) and if A is the Hessenberg matrix of order n defined by: A[i, j] = p[j - i + 1], (i <= j), A[i, j] = -1, (i = j + 1), and A[i, j] = 0 otherwise. Then, for n >= 2, a(n-2) = det A. - Milan Janjic, May 08 2010
The sum of reciprocals, 1/1 + 1/2 + 1/4 + 1/8 + ... + 1/(2^n) + ... = 2. - Mohammad K. Azarian, Dec 29 2010
a(n) = 2*A001045(n) + A078008(n) = 3*A001045(n) + (-1)^n. - Paul Barry, Feb 20 2003
a(n) = A118654(n, 2).
a(n) = A140740(n+1, 1).
a(n) = A131577(n) + A011782(n) = A024495(n) + A131708(n) + A024493(n) = A000749(n) + A038503(n) + A038504(n) + A038505(n) = A139761(n) + A139748(n) + A139714(n) + A133476(n) + A139398(n). - Paul Curtz, Jul 25 2011
a(n) = row sums of A007318. - Susanne Wienand, Oct 21 2011
a(n) = Hypergeometric([-n], [], -1). - Peter Luschny, Nov 01 2011
G.f.: A(x) = B(x)/x, B(x) satisfies B(B(x)) = x/(1 - x)^2. - Vladimir Kruchinin, Nov 10 2011
a(n) = Sum_{k = 0..n} A201730(n, k)*(-1)^k. - Philippe Deléham, Dec 06 2011
2^n = Sum_{k = 1..floor((n+1)/2)} C(n+1, 2k-1). - Dennis P. Walsh, Dec 15 2011
A209229(a(n)) = 1. - Reinhard Zumkeller, Mar 07 2012
A001227(a(n)) = 1. - Reinhard Zumkeller, May 01 2012
Sum_{n >= 1} mobius(n)/a(n) = 0.1020113348178103647430363939318... - R. J. Mathar, Aug 12 2012
E.g.f.: 1 + 2*x/(U(0) - x) where U(k) = 6*k + 1 + x^2/(6*k+3 + x^2/(6*k + 5 + x^2/U(k+1) )); (continued fraction, 3-step). - Sergei N. Gladkovskii, Dec 04 2012
a(n) = det(|s(i+2,j)|, 1 <= i,j <= n), where s(n,k) are Stirling numbers of the first kind. - Mircea Merca, Apr 04 2013
a(n) = det(|ps(i+1,j)|, 1 <= i,j <= n), where ps(n,k) are Legendre-Stirling numbers of the first kind (A129467). - Mircea Merca, Apr 06 2013
G.f.: W(0), where W(k) = 1 + 2*x*(k+1)/(1 - 2*x*(k+1)/( 2*x*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
a(n-1) = Sum_{t_1 + 2*t_2 + ... + n*t_n = n} multinomial(t_1 + t_2 + ... + t_n; t_1, t_2, ..., t_n). - Mircea Merca, Dec 06 2013
Construct the power matrix T(n,j) = [A^*j]*[S^*(j-1)] where A(n)=(1,1,1,...) and S(n)=(0,1,0,0,...) (where * is convolution operation). Then a(n-1) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 01 2015
a(n) = A000005(A002110(n)). - Ivan N. Ianakiev, May 23 2016
From Ilya Gutkovskiy, Jul 18 2016: (Start)
Exponential convolution of A000012 with themselves.
a(n) = Sum_{k=0..n} A011782(k).
Sum_{n>=0} a(n)/n! = exp(2) = A072334.
Sum_{n>=0} (-1)^n*a(n)/n! = exp(-2) = A092553. (End)
G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...) where r(x) = A090129(x) = (1 + 2x + 2x^2 + 4x^3 + 8x^4 + ...). - Gary W. Adamson, Sep 13 2016
a(n) = A000045(n + 1) + A000045(n) + Sum_{k = 0..n - 2} A000045(k + 1)*2^(n - 2 - k). - Melvin Peralta, Dec 22 2017
a(n) = 7*A077020(n)^2 + A077021(n)^2, n>=3. - Ralf Steiner, Aug 08 2021
a(n)= n + 1 + Sum_{k=3..n+1} (2*k-5)*J(n+2-k), where Jacobsthal number J(n) = A001045(n). - Michael A. Allen, Jan 12 2022
Integral_{x=0..Pi} cos(x)^n*cos(n*x) dx = Pi/a(n) (see Nahin, pp. 69-70). - Stefano Spezia, May 17 2023

Extensions

Clarified a comment T. D. Noe, Aug 30 2009
Edited by Daniel Forgues, May 12 2010
Incorrect comment deleted by Matthew Vandermast, May 17 2014
Comment corrected to match offset by Geoffrey Critzer, Nov 28 2014

A083420 a(n) = 2*4^n - 1.

Original entry on oeis.org

1, 7, 31, 127, 511, 2047, 8191, 32767, 131071, 524287, 2097151, 8388607, 33554431, 134217727, 536870911, 2147483647, 8589934591, 34359738367, 137438953471, 549755813887, 2199023255551, 8796093022207, 35184372088831, 140737488355327, 562949953421311
Offset: 0

Views

Author

Paul Barry, Apr 29 2003

Keywords

Comments

Sum of divisors of 4^n. - Paul Barry, Oct 13 2005
Subsequence of A000069; A132680(a(n)) = A005408(n). - Reinhard Zumkeller, Aug 26 2007
If x = a(n), y = A000079(n+1) and z = A087289(n), then x^2 + 2*y^2 = z^2. - Vincenzo Librandi, Jun 09 2014
It seems that a(n) divides A001676(3+4n). Several other entries apparently have this sequence embedded in them, e.g., A014551, A168604, A213243, A213246-8, and A279872. - Tom Copeland, Dec 27 2016
To elaborate on Librandi's comment from 2014: all these numbers, even if prime in Z, are sure not to be prime in Z[sqrt(2)], since a(n) can at least be factored as ((2^(2n + 1) - 1) - (2^(2n) - 1)*sqrt(2))((2^(2n + 1) - 1) + (2^(2n) - 1)*sqrt(2)). For example, 7 = (3 - sqrt(2))(3 + sqrt(2)), 31 = (7 - 3*sqrt(2))(7 + 3*sqrt(2)), 127 = (15 - 7*sqrt(2))(15 + 7*sqrt(2)). - Alonso del Arte, Oct 17 2017
Largest odd factors of A147590. - César Aguilera, Jan 07 2020

Crossrefs

Cf. A083421, A000668 (primes in this sequence), A004171, A000244.
Cf. A000302.

Programs

Formula

G.f.: (1+2*x)/((1-x)*(1-4*x)).
E.g.f.: 2*exp(4*x)-exp(x).
With a leading zero, this is a(n) = (4^n - 2 + 0^n)/2, the binomial transform of A080925. - Paul Barry, May 19 2003
From Benoit Cloitre, Jun 18 2004: (Start)
a(n) = (-16^n/2)*B(2n, 1/4)/B(2n) where B(n, x) is the n-th Bernoulli polynomial and B(k) = B(k, 0) is the k-th Bernoulli number.
a(n) = 5*a(n-1) - 4*a(n-2).
a(n) = (-4^n/2)*B(2*n, 1/2)/B(2*n). (End)
a(n) = A099393(n) + A020522(n) = A000302(n) + A024036(n). - Reinhard Zumkeller, Feb 07 2006
a(n) = Stirling2(2*(n+1), 2). - Zerinvary Lajos, Dec 06 2006
a(n) = 4*a(n-1) + 3 with n > 0, a(0) = 1. - Vincenzo Librandi, Dec 30 2010
a(n) = A001576(n+1) - 2*A001576(n). - Brad Clardy, Mar 26 2011
a(n) = 6*A002450(n) + 1. - Roderick MacPhee, Jul 06 2012
a(n) = A000203(A000302(n)). - Michel Marcus, Jan 20 2014
a(n) = Sum_{i = 0..n} binomial(2n+2, 2i). - Wesley Ivan Hurt, Mar 14 2015
a(n) = (1/4^n) * Sum_{k = 0..n} binomial(2*n+1,2*k)*9^k. - Peter Bala, Feb 06 2019
a(n) = A147590(n)/A000079(n). - César Aguilera, Jan 07 2020

A254046 Column index of n in A191450: a(3n) = 1, a(3n+1) = 1, a(3n+2) = 1 + a(n+1).

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 5, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 6, 1, 1, 2, 1, 1, 2
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Comments

Equally, the row index of n in A254051.
a(n) is the 3-adic valuation of A087289(n-1). - Fred Daniel Kline, Jan 11 2017

Crossrefs

One more than A253786.
Cf. A253887 (the corresponding row index).
Odd bisection of A051064.

Programs

  • Mathematica
    With[{nmax=200},IntegerExponent[6Range[nmax]-3,3]] (* Paolo Xausa, Nov 10 2023 *)

Formula

a(3n) = 1, a(3n+1) = 1, a(3n+2) = 1 + a(n+1).
a(n) = A253786(n) + 1.
a(n) = A253786(3n-1). - Cyril Damamme, Aug 04 2015
a(n) = A051064(2n-1), i.e., the 3-adic valuation of 6n-3. - Cyril Damamme, Aug 04 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Nov 16 2023

A207262 a(n) = 2^(4n - 2) + 1.

Original entry on oeis.org

5, 65, 1025, 16385, 262145, 4194305, 67108865, 1073741825, 17179869185, 274877906945, 4398046511105, 70368744177665, 1125899906842625, 18014398509481985, 288230376151711745, 4611686018427387905, 73786976294838206465, 1180591620717411303425, 18889465931478580854785, 302231454903657293676545
Offset: 1

Views

Author

Alonso del Arte, Feb 16 2012

Keywords

Comments

With the exception of the first term, all these numbers are composite, and in fact are all multiples of 5. The other factors can be considerably larger than 5, as is the case with say, 2^158 + 1. These numbers can be factored as (2^(2n - 1) + 2^n + 1)(2^(2n - 1) - 2^n + 1). For example, 2^6 + 1 = 65 = (2^3 + 2^2 + 1)(2^3 - 2^2 + 1) = 13 * 5.
This formula was discovered by Leon-Francois-Antoine Aurifeuille in 1873. Wells (2005) remarks that knowledge of this formula would have saved Fortune Landry years of work he spent factoring 2^58 + 1.
Aurifeuille actually rediscovered a very special case of the identity 4x^4+1 = (2x^2-2x+1)(2x^2+2x+1), which Euler communicated to Goldbach in 1742. (The Fuss reference is in my book Seminumerical Algorithms, 3rd ed., p. 392; I had cited Aurifeuille in the 1st and 2nd editions.) - Don Knuth, Feb 09 2013
An Engel expansion of 4 to the base 16 as defined in A181565, with the associated series expansion 4 = 16/5 + 16^2/(5*65) + 16^3/(5*65*1025) + 16^4/(5*65*1025*16385) + .... Cf. A087289 and A199561. - Peter Bala, Oct 29 2013
Conjecture: Let m = 4n - 2. a(n) equals the sum of the m-th powers of the divisors of m divided by the sum of the m-th powers of the odd divisors of m. - Ivan N. Ianakiev, Jan 29 2020

References

  • David Wells, Prime Numbers: The Most Mysterious Figures in Math. Hoboken, New Jersey: John Wiley & Sons (2005) p. 15

Crossrefs

Cf. A000051, A052539 (supersets). A016825. A087289, A199561.

Programs

Formula

a(n) = 4^(2n - 1) + 1.
G.f.: 5*x*(1-4*x)/((1-x)*(1-16*x)). - Bruno Berselli, Feb 17 2012
a(1) = 5, a(n) = 16*(a(n-1) - 1) + 1. - Arkadiusz Wesolowski, Feb 17 2012
a(n) = 5*A299960(n-1). - R. J. Mathar, Feb 28 2018
E.g.f.: exp(x) + (exp(16*x) - 5)/4. - Stefano Spezia, Jan 30 2020

A084508 Partial sums of A084509. Positions of ones in the first differences of A084506.

Original entry on oeis.org

0, 1, 3, 9, 33, 129, 513, 2049, 8193, 32769, 131073, 524289, 2097153, 8388609, 33554433, 134217729, 536870913, 2147483649, 8589934593, 34359738369, 137438953473, 549755813889, 2199023255553, 8796093022209, 35184372088833
Offset: 0

Views

Author

Antti Karttunen, Jun 02 2003

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-4},{0,1,3,9},30] (* Harvey P. Dale, May 21 2021 *)

Formula

a(n) = n for n < 2, a(n) = 2^(2*n - 3) + 1 = A087289(n-2) for n >= 2. - Antti Karttunen, Oct 24 2012 [Corrected by Petros Hadjicostas, Aug 02 2020]
From Chai Wah Wu, Jan 28 2021: (Start)
a(n) = 5*a(n-1) - 4*a(n-2) for n > 3.
G.f.: x*(-2*x^2 - 2*x + 1)/((x - 1)*(4*x - 1)). (End)

A135351 a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; or a(0) = 0 and for n > 0, a(n) = A005578(n-1) - (-1)^n.

Original entry on oeis.org

0, 2, 0, 3, 2, 7, 10, 23, 42, 87, 170, 343, 682, 1367, 2730, 5463, 10922, 21847, 43690, 87383, 174762, 349527, 699050, 1398103, 2796202, 5592407, 11184810, 22369623, 44739242, 89478487, 178956970, 357913943, 715827882, 1431655767, 2863311530, 5726623063, 11453246122, 22906492247, 45812984490
Offset: 0

Views

Author

Miklos Kristof, Dec 07 2007

Keywords

Comments

Partial sums of A155980 for n > 2. - Klaus Purath, Jan 30 2021

Crossrefs

Cf. A007583, A062092, A087289, A020988 (even bisection), A163834 (odd bisection), A078008, A084247, A181565.

Programs

  • GAP
    List([0..40], n-> (2^n+3-7*(-1)^n+3*0^n)/6); # G. C. Greubel, Sep 02 2019
  • Magma
    a135351:=func< n | (2^n+3-7*(-1)^n+3*0^n)/6 >; [ a135351(n): n in [0..32] ]; // Klaus Brockhaus, Dec 05 2009
    
  • Maple
    G(x):=x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)): f[0]:=G(x): for n from 1 to 30 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n]/n!,n=0..30);
  • Mathematica
    Join[{0}, Table[(2^n +3 -7*(-1)^n)/6, {n,40}]] (* G. C. Greubel, Oct 11 2016 *)
    LinearRecurrence[{2,1,-2},{0,2,0,3},40] (* Harvey P. Dale, Feb 13 2024 *)
  • PARI
    a(n) = (2^n + 3 - 7*(-1)^n + 3*0^n)/6; \\ Michel Marcus, Oct 11 2016
    
  • Sage
    [(2^n+3-7*(-1)^n+3*0^n)/6 for n in (0..40)] # G. C. Greubel, Sep 02 2019
    

Formula

G.f.: x*(2 - 4*x + x^2)/((1-x^2)*(1-2*x)).
E.g.f.: (exp(2*x) + 3*exp(x) - 7*exp(-x) + 3)/6.
From Paul Curtz, Dec 20 2020: (Start)
a(n) + (period 2 sequence: repeat [1, -2]) = A328284(n+2).
a(n+1) + (period 2 sequence: repeat [-2, 1]) = A001045(n).
a(n+1) + (period 2 sequence: repeat [-1, 0]) = A078008(n).
a(n+1) + (period 2 sequence : repeat [-3, 2]) = -(-1)^n*A084247(n).
a(n+4) = a(n+1) + 7*A001045(n).
a(n+4) + a(n+1) = A181565(n).
a(2*n+2) + a(2*n+3) = A087289(n) = 3*A007583(n).
a(2*n+1) = A163834(n), a(2*n+2) = A020988(n). (End)

Extensions

First part of definition corrected by Klaus Brockhaus, Dec 05 2009

A199561 a(n) = 3*9^n + 1.

Original entry on oeis.org

4, 28, 244, 2188, 19684, 177148, 1594324, 14348908, 129140164, 1162261468, 10460353204, 94143178828, 847288609444, 7625597484988, 68630377364884, 617673396283948, 5559060566555524, 50031545098999708, 450283905890997364, 4052555153018976268, 36472996377170786404
Offset: 0

Views

Author

Vincenzo Librandi, Nov 08 2011

Keywords

Comments

An Engel expansion of 3 to the base 9 as defined in A181565, with the associated series expansion 3 = 9/4 + 9^2/(4*28) + 9^3/(4*28*244) + 9^4/(4*28*244*2188) + .... Cf. A087289 and A207262. - Peter Bala, Oct 29 2013

Crossrefs

Programs

  • Magma
    [3*9^n+1: n in [0..30]];
  • Mathematica
    3*9^Range[0,20]+1 (* or *) LinearRecurrence[{10,-9},{4,28},20] (* Harvey P. Dale, Jul 30 2019 *)

Formula

a(n) = 4*A066443(n).
a(n) = 9*a(n-1) - 8.
a(n) = 10*a(n-1) - 9*a(n-2).
G.f.: 4*(1-3*x)/((1-x)*(1-9*x)).
From Elmo R. Oliveira, Sep 13 2024: (Start)
E.g.f.: exp(x)*(3*exp(8*x) + 1).
a(n) = 2*A199560(n). (End)

A340666 A(n,k) is derived from n by replacing each 0 in its binary representation with a string of k 0's; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 8, 3, 4, 3, 0, 1, 16, 3, 16, 5, 3, 0, 1, 32, 3, 64, 9, 6, 7, 0, 1, 64, 3, 256, 17, 12, 7, 1, 0, 1, 128, 3, 1024, 33, 24, 7, 8, 3, 0, 1, 256, 3, 4096, 65, 48, 7, 64, 9, 3, 0, 1, 512, 3, 16384, 129, 96, 7, 512, 33, 10, 7
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2021

Keywords

Examples

			Square array A(n,k) begins:
  0, 0,  0,   0,    0,     0,      0,       0,        0, ...
  1, 1,  1,   1,    1,     1,      1,       1,        1, ...
  1, 2,  4,   8,   16,    32,     64,     128,      256, ...
  3, 3,  3,   3,    3,     3,      3,       3,        3, ...
  1, 4, 16,  64,  256,  1024,   4096,   16384,    65536, ...
  3, 5,  9,  17,   33,    65,    129,     257,      513, ...
  3, 6, 12,  24,   48,    96,    192,     384,      768, ...
  7, 7,  7,   7,    7,     7,      7,       7,        7, ...
  1, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, ...
  ...
		

Crossrefs

Columns k=0-2, 4 give: A038573, A001477, A084471, A084473.
Rows n=0..17, 19 give: A000004, A000012, A000079, A010701, A000302, A000051(k+1), A007283, A010727, A001018, A087289, A007582(k+1), A062709(k+2), A164346, A181565(k+1), A005009, A181404(k+3), A001025, A199493, A253208(k+1).
Main diagonal gives A340667.

Programs

  • Maple
    A:= (n, k)-> Bits[Join](subs(0=[0$k][], Bits[Split](n))):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n<2, n,
         `if`(irem(n, 2, 'r')=1, A(r, k)*2+1, A(r, k)*2^k))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence @@ Table[0, {k}], 2];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 02 2021 *)

Formula

A000120(A(n,k)) = A000120(n) = log_2(A(n,0)+1).
A023416(A(n,k)) = k * A023416(n) for n >= 1.

A092896 Related to random walks on the 4-cube.

Original entry on oeis.org

1, 1, 5, 17, 65, 257, 1025, 4097, 16385, 65537, 262145, 1048577, 4194305, 16777217, 67108865, 268435457, 1073741825, 4294967297, 17179869185, 68719476737, 274877906945, 1099511627777, 4398046511105, 17592186044417, 70368744177665, 281474976710657
Offset: 0

Views

Author

Paul Barry, Mar 12 2004

Keywords

Comments

Gives the denominators in the probability that a random walk on the 4-cube returns to its starting corner on the 2n-th step. Partial sums of A092898. Binomial transform of A092897.
Palindromic numbers in base 2 with an odd number of bits that can be written as 2^(2n) + 1, n >= 1. Palindromic numbers in base 2 with an even number of bits that can be written as 2^(2n+1) + 1 are A087289. - Brad Clardy, Feb 18 2014

Crossrefs

Programs

  • Magma
    [n lt 2 select 1 else 4^(n-1) +1: n in [0..30]]; // G. C. Greubel, Feb 21 2021
  • Maple
    A092896:= n -> `if`(n<2, 1, 4^(n-1) +1); seq(A092896(n), n = 0..30); # G. C. Greubel, Feb 21 2021
  • Mathematica
    CoefficientList[Series[(1 -4x +4x^2 -4x^3)/((1-x)(1-4x)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 20 2014 *)
    LinearRecurrence[{5,-4}, {1,1,5,17}, 30] (* Harvey P. Dale, Mar 19 2016 *)
  • PARI
    Vec((1-4*x+4*x^2-4*x^3)/((1-x)*(1-4*x)) + O(x^30)) \\ Colin Barker, Nov 25 2016
    
  • Sage
    [1 if n<2 else 4^(n-1) +1 for n in [0..30]]; # G. C. Greubel, Feb 21 2021
    

Formula

G.f.: (1 - 4*x + 4*x^2 - 4*x^3)/((1-x)*(1-4*x)).
a(n) = 1 + 4^n/4 - 0^n/4 + Sum_{k=0..n} binomial(n, k)*k*(-1)^k.
a(n+1) = 4^n + 1 - 0^n = A002450(n+1) - 4*A002450(n-1). - Paul Barry, Mar 13 2008
a(n) = A052539(n-1), n > 1. - R. J. Mathar, Sep 08 2008
Dropping a(0) and interleaving the terms with zeros gives a sequence with e.g.f. (sin(5ix/2)/sin(ix/2) - 3)/2 = cos(2ix) + cos(ix) - 1. Similar expressions apply to A091775 and A074515, which are also power sums representable by the Bernoulli polynomials. - Tom Copeland, Oct 22 2008
a(n) = 4^(n-1) + 1 for n > 1. - Colin Barker, Nov 25 2016
E.g.f.: (exp(4*x) + 4*exp(x) - 1 - 4*x)/4. - G. C. Greubel, Feb 21 2021

A341018 a(n) is the X-coordinate of the n-th point of the space filling curve M defined in Comments section; A341019 gives Y-coordinates.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 2, 1, 0, 1, 0, 1, 2, 3, 4, 3, 4, 5, 4, 5, 6, 7, 8, 7, 8, 7, 6, 5, 6, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15, 14, 15, 14, 13, 12, 13, 14, 15, 14, 15, 14, 13, 12, 11, 12, 11, 10, 9, 8, 9, 8, 9, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15
Offset: 0

Views

Author

Rémy Sigrist, Feb 02 2021

Keywords

Comments

We define the family {M_n, n >= 0}, as follows:
- M_0 corresponds to the points (0, 0), (1, 1) and (2, 0), in that order:
+
/ \
/ \
+ +
O
- for any n >= 0, M_{n+1} is obtained by arranging 4 copies of M_n as follows:
+ . . . + . . . +
. B . B .
+ . . . + . . .
. B . .A C.A C.
. . --> + . . . + . . . +
.A C. .C . A.
+ . . . + . B.B .
O .A . C.
+ . . . + . . . +
O
- for any n >= 0, M_n has A087289(n) points,
- the space filling curve M is the limit of M_{2*n} as n tends to infinity.
The odd bisection of M is similar to a Hilbert's Hamiltonian walk (hence the connection with A059253, see illustration in Links section).

Examples

			The curve M starts as follows:
       11+ 13+   +19 +21
        / \ / \ / \ / \
     10+ 12+ 14+18 +20 +22
        \     / \     /
        9+ 15+   +17 +23
        /     \ /     \
      8+  6+   +   +26 +24
        \ / \ 16  / \ /
        7+  5+   +27 +25
            /     \
          4+       +28
            \     /
        1+  3+   +29 +31
        / \ /     \ / \
      0+  2+       +30 +32
- so a(0) = a(8) = a(10) = 0,
     a(1) = a(7) = a(9) = a(11) = 1.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = A341019(n) iff n belongs to A000695.
a(2*n-1) + A341019(2*n-1) = a(2*n) + A341019(2*n) for any n > 0.
a(2*n) - A341019(2*n) = a(2*n+1) - A341019(2*n+1) for any n >= 0.
A059253(n) = (a(2*n+1) - 1)/2.
a(4*n) = 2*A341019(n).
a(16*n) = 4*a(n).
Showing 1-10 of 23 results. Next