A001511 The ruler function: exponent of the highest power of 2 dividing 2n. Equivalently, the 2-adic valuation of 2n.
1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 6, 1, 2, 1, 3, 1, 2, 1, 4, 1
Offset: 1
A002260 Triangle read by rows: T(n,k) = k for n >= 1, k = 1..n.
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
Offset: 1
Comments
Old name: integers 1 to k followed by integers 1 to k+1 etc. (a fractal sequence).
Start counting again and again.
This is a "doubly fractal sequence" - see the Franklin T. Adams-Watters link.
The PARI functions t1, t2 can be used to read a square array T(n,k) (n >= 1, k >= 1) by antidiagonals downwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002
Reading this sequence as the antidiagonals of a rectangular array, row n is (n,n,n,...); this is the weight array (Cf. A144112) of the array A127779 (rectangular). - Clark Kimberling, Sep 16 2008
The upper trim of an arbitrary fractal sequence s is s, but the lower trim of s, although a fractal sequence, need not be s itself. However, the lower trim of A002260 is A002260. (The upper trim of s is what remains after the first occurrence of each term is deleted; the lower trim of s is what remains after all 0's are deleted from the sequence s-1.) - Clark Kimberling, Nov 02 2009
Eigensequence of the triangle = A001710 starting (1, 3, 12, 60, 360, ...). - Gary W. Adamson, Aug 02 2010
The triangle sums, see A180662 for their definitions, link this triangle of natural numbers with twenty-three different sequences, see the crossrefs. The mirror image of this triangle is A004736. - Johannes W. Meijer, Sep 22 2010
A002260 is the self-fission of the polynomial sequence (q(n,x)), where q(n,x) = x^n + x^(n-1) + ... + x + 1. See A193842 for the definition of fission. - Clark Kimberling, Aug 07 2011
Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. Sequence A002260 is reluctant sequence of sequence 1,2,3,... (A000027). - Boris Putievskiy, Dec 12 2012
This is the maximal sequence of positive integers, such that once an integer k has occurred, the number of k's always exceeds the number of (k+1)'s for the remainder of the sequence, with the first occurrence of the integers being in order. - Franklin T. Adams-Watters, Oct 23 2013
A002260 are the k antidiagonal numerators of rationals in Cantor's proof of 1-to-1 correspondence between rationals and naturals; the denominators are k-numerator+1. - Adriano Caroli, Mar 24 2015
T(n,k) gives the distance to the largest triangular number < n. - Ctibor O. Zizka, Apr 09 2020
Examples
First six rows: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6
References
- Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168. (Introduces upper trimming, lower trimming, and signature sequences.)
- M. Myers, Smarandache Crescendo Subsequences, R. H. Wilde, An Anthology in Memoriam, Bristol Banner Books, Bristol, 1998, p. 19.
- F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..11325
- Franklin T. Adams-Watters, Doubly Fractal Sequences
- Matin Amini and Majid Jahangiri, A Novel Proof for Kimberling's Conjecture on Doubly Fractal Sequences, arXiv:1612.09481 [math.NT], 2017.
- Bruno Berselli, Illustration of the initial terms
- Jerry Brown et al., Problem 4619, School Science and Mathematics (USA), Vol. 97(4), 1997, pp. 221-222.
- Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida, and Daisy Ann A. Disu, On Fractal Sequences, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113.
- Clark Kimberling, Fractal sequences
- Clark Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.
- Boris Putievskiy, Transformations Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
- F. Smarandache, Sequences of Numbers Involved in Unsolved Problems.
- Aaron Snook, Augmented Integer Linear Recurrences, 2012. - _N. J. A. Sloane_, Dec 19 2012
- Michael Somos, Sequences used for indexing triangular or square arrays
- Eric Weisstein's World of Mathematics, Smarandache Sequences
- Eric Weisstein's World of Mathematics, Unit Fraction
Crossrefs
Cf. A000217, A001710, A002262, A003056, A004736 (ordinal transform), A025581, A056534, A094727, A127779.
Cf. A140756 (alternating signs).
Triangle sums (see the comments): A000217 (Row1, Kn11); A004526 (Row2); A000096 (Kn12); A055998 (Kn13); A055999 (Kn14); A056000 (Kn15); A056115 (Kn16); A056119 (Kn17); A056121 (Kn18); A056126 (Kn19); A051942 (Kn110); A101859 (Kn111); A132754 (Kn112); A132755 (Kn113); A132756 (Kn114); A132757 (Kn115); A132758 (Kn116); A002620 (Kn21); A000290 (Kn3); A001840 (Ca2); A000326 (Ca3); A001972 (Gi2); A000384 (Gi3).
Cf. A108872.
Programs
-
Haskell
a002260 n k = k a002260_row n = [1..n] a002260_tabl = iterate (\row -> map (+ 1) (0 : row)) [1] -- Reinhard Zumkeller, Aug 04 2014, Jul 03 2012
-
Maple
at:=0; for n from 1 to 150 do for i from 1 to n do at:=at+1; lprint(at,i); od: od: # N. J. A. Sloane, Nov 01 2006 seq(seq(i,i=1..k),k=1..13); # Peter Luschny, Jul 06 2009
-
Mathematica
FoldList[{#1, #2} &, 1, Range[2, 13]] // Flatten (* Robert G. Wilson v, May 10 2011 *) Flatten[Table[Range[n],{n,20}]] (* Harvey P. Dale, Jun 20 2013 *)
-
Maxima
T(n,k):=sum((i+k)*binomial(i+k-1,i)*binomial(k,n-i-k+1)*(-1)^(n-i-k+1),i,max(0,n+1-2*k),n-k+1); /* Vladimir Kruchinin, Oct 18 2013 */
-
PARI
t1(n)=n-binomial(floor(1/2+sqrt(2*n)),2) /* this sequence */
-
PARI
A002260(n)=n-binomial((sqrtint(8*n)+1)\2,2) \\ M. F. Hasler, Mar 10 2014
-
Python
from math import isqrt, comb def A002260(n): return n-comb((m:=isqrt(k:=n<<1))+(k>m*(m+1)),2) # Chai Wah Wu, Nov 08 2024
Formula
a(n) = 1 + A002262(n).
n-th term is n - m*(m+1)/2 + 1, where m = floor((sqrt(8*n+1) - 1) / 2).
The above formula is for offset 0; for offset 1, use a(n) = n-m*(m+1)/2 where m = floor((-1+sqrt(8*n-7))/2). - Clark Kimberling, Jun 14 2011
a(k * (k + 1) / 2 + i) = i for k >= 0 and 0 < i <= k + 1. - Reinhard Zumkeller, Aug 14 2001
a(n) = (2*n + round(sqrt(2*n)) - round(sqrt(2*n))^2)/2. - Brian Tenneson, Oct 11 2003
a(n) = n - binomial(floor((1+sqrt(8*n))/2), 2). - Paul Barry, May 25 2004
a(A000217(n)) = A000217(n) - A000217(n-1), a(A000217(n-1) + 1) = 1, a(A000217(n) - 1) = A000217(n) - A000217(n-1) - 1. - Alexander R. Povolotsky, May 28 2008
T(n,k) = Sum_{i=1..k} i*binomial(k,i)*binomial(n-k,n-i) (regarded as triangle, see the example). - Mircea Merca, Apr 11 2012
T(n,k) = Sum_{i=max(0,n+1-2*k)..n-k+1} (i+k)*binomial(i+k-1,i)*binomial(k,n-i-k+1)*(-1)^(n-i-k+1). - Vladimir Kruchinin, Oct 18 2013
G.f.: x*y / ((1 - x) * (1 - x*y)^2) = Sum_{n,k>0} T(n,k) * x^n * y^k. - Michael Somos, Sep 17 2014
a(n) = n - S(n) where S(n) = sum of distinct terms in {a(1), a(2), ..., a(n-1)}. - David James Sycamore, Mar 10 2025
Extensions
More terms from Reinhard Zumkeller, Apr 27 2006
Incorrect program removed by Franklin T. Adams-Watters, Mar 19 2010
New name from Omar E. Pol, Jul 15 2012
A002024 k appears k times; a(n) = floor(sqrt(2n) + 1/2).
1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13
Offset: 1
Comments
Integer inverse function of the triangular numbers A000217. The function trinv(n) = floor((1+sqrt(1+8n))/2), n >= 0, gives the values 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, ..., that is, the same sequence with offset 0. - N. J. A. Sloane, Jun 21 2009
Array T(k,n) = n+k-1 read by antidiagonals.
Eigensequence of the triangle = A001563. - Gary W. Adamson, Dec 29 2008
Can apparently also be defined via a(n+1)=b(n) for n >= 2 where b(0)=b(1)=1 and b(n) = b(n-b(n-2))+1. Tested to be correct for all n <= 150000. - José María Grau Ribas, Jun 10 2011
For any n >= 0, a(n+1) is the least integer m such that A000217(m)=m(m+1)/2 is larger than n. This is useful when enumerating representations of n as difference of triangular numbers; see also A234813. - M. F. Hasler, Apr 19 2014
Number of binary digits of A023758, i.e., a(n) = ceiling(log_2(A023758(n+2))). - Andres Cicuttin, Apr 29 2016
a(n) and A002260(n) give respectively the x(n) and y(n) coordinates of the sorted sequence of points in the integer lattice such that x(n) > 0, 0 < y(n) <= x(n), and min(x(n), y(n)) < max(x(n+1), y(n+1)) for n > 0. - Andres Cicuttin, Dec 25 2016
Partial sums (A060432) are given by S(n) = (-a(n)^3 + a(n)*(1+6n))/6. - Daniel Cieslinski, Oct 23 2017
As an array, T(k,n) is the number of digits columns used in carryless multiplication between a k-digit number and an n-digit number. - Stefano Spezia, Sep 24 2022
a(n) is the maximum number of possible solutions to an n-statement Knights and Knaves Puzzle, where each statement is of the form "x of us are knights" for some 1 <= x <= n, knights can only tell the truth and knaves can only lie. - Taisha Charles and Brittany Ohlinger, Jul 29 2023
Examples
From _Clark Kimberling_, Sep 16 2008: (Start) As a rectangular array, a northwest corner: 1 2 3 4 5 6 2 3 4 5 6 7 3 4 5 6 7 8 4 5 6 7 8 9 This is the weight array (cf. A144112) of A107985 (formatted as a rectangular array). (End) G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 4*x^9 + 4*x^9 + 4*x^10 + ...
References
- Edward S. Barbeau, Murray S. Klamkin, and William O. J. Moser, Five Hundred Mathematical Challenges, Prob. 441, pp. 41, 194. MAA 1995.
- R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 97.
- K. Hardy and K. S. Williams, The Green Book of Mathematical Problems, p. 59, Solution to Prob. 14, Dover NY, 1985
- R. Honsberger, Mathematical Morsels, pp. 133-134, MAA 1978.
- J. F. Hurley, Litton's Problematical Recreations, pp. 152; 313-4 Prob. 22, VNR Co., NY, 1971.
- D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 43.
- 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).
- S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 129.
Links
- Franklin T. Adams-Watters, Table of n, a(n) for n = 1..5050
- Jaegug Bae and Sungjin Choi, A generalization of a subset-sum-distinct sequence, J. Korean Math. Soc. 40 (2003), no. 5, 757--768. MR1996839 (2004d:05198). See b(n).
- Jonathan H. B. Deane and Guido Gentile, A diluted version of the problem of the existence of the Hofstadter sequence, arXiv:2311.13854 [math.NT], 2023. See p. 10.
- Nathan Fox, Connecting Slow Solutions to Nested Recurrences with Linear Recurrent Sequences, arXiv:2203.09340 [math.CO], 2022.
- H. T. Freitag and H. W. Gould, Solution to Problem 571, Math. Mag., 38 (1965), 185-187.
- H. T. Freitag (Proposer) and H. W. Gould (Solver), Problem 571: An Ordering of the Rationals, Math. Mag., 38 (1965), 185-187 [Annotated scanned copy]
- Mikel Garcia-de-Andoin, Álvaro Saiz, Pedro Pérez-Fernández, Lucas Lamata, Izaskun Oregi, and Mikel Sanz, Digital-Analog Quantum Computation with Arbitrary Two-Body Hamiltonians, arXiv:2307.00966 [quant-ph], 2023.
- S. W. Golomb, Discrete chaos: sequences satisfying "strange" recursions, unpublished manuscript, circa 1990 [cached copy, with permission (annotated)]
- Henry W. Gould, Letters to N. J. A. Sloane, Oct 1973 and Jan 1974.
- Abraham Isgur, Vitaly Kuznetsov, and Stephen Tanny, A combinatorial approach for solving certain nested recursions with non-slow solutions, arXiv:1202.0276 [math.CO], 2012.
- Stanley Wu-Wei Liu, Closed form expressions for A002024(n).
- M. A. Nyblom, Some curious sequences involving floor and ceiling functions, Am. Math. Monthly 109 (#6, 200), 559-564.
- Boris Putievskiy, Transformations [Of] Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
- Raphael Schumacher, Extension of Summation Formulas involving Stirling series, arXiv:1605.09204 [math.NT], 2016.
- Raphael Schumacher, The self-counting identity, Fib. Quart., 55 (No. 2 2017), 157-167.
- Raphael Schumacher, The Self-Counting Flow, Fibonacci Quart. 60 (2022), no. 5, 324-343.
- N. J. A. Sloane, Handwritten notes on Self-Generating Sequences, 1970. (note that A1148 has now become A005282)
- Michael Somos, Sequences used for indexing triangular or square arrays.
- L. J. Upton, Letter to N. J. A. Sloane, May 22 1991.
- Eric Weisstein's World of Mathematics, Self-Counting Sequence.
- Index entries for Hofstadter-type sequences
Crossrefs
Programs
-
Haskell
a002024 n k = a002024_tabl !! (n-1) !! (k-1) a002024_row n = a002024_tabl !! (n-1) a002024_tabl = iterate (\xs@(x:_) -> map (+ 1) (x : xs)) [1] a002024_list = concat a002024_tabl a002024' = round . sqrt . (* 2) . fromIntegral -- Reinhard Zumkeller, Jul 05 2015, Feb 12 2012, Mar 18 2011
-
Haskell
a002024_list = [1..] >>= \n -> replicate n n
-
Haskell
a002024 = (!!) $ [1..] >>= \n -> replicate n n -- Sascha Mücke, May 10 2016
-
Magma
[Floor(Sqrt(2*n) + 1/2): n in [1..80]]; // Vincenzo Librandi, Nov 19 2014
-
Maple
A002024 := n-> ceil((sqrt(1+8*n)-1)/2); seq(A002024(n), n=1..100);
-
Mathematica
a[1] = 1; a[n_] := a[n] = a[n - a[n - 1]] + 1 (* Branko Curgus, May 12 2009 *) Table[n, {n, 13}, {n}] // Flatten (* Robert G. Wilson v, May 11 2010 *) Table[PadRight[{},n,n],{n,15}]//Flatten (* Harvey P. Dale, Jan 13 2019 *)
-
PARI
t1(n)=floor(1/2+sqrt(2*n)) /* A002024 = this sequence */
-
PARI
t2(n)=n-binomial(floor(1/2+sqrt(2*n)),2) /* A002260(n-1) */
-
PARI
t3(n)=binomial(floor(3/2+sqrt(2*n)),2)-n+1 /* A004736 */
-
PARI
t4(n)=n-1-binomial(floor(1/2+sqrt(2*n)),2) /* A002260(n-1)-1 */
-
PARI
A002024(n)=(sqrtint(n*8)+1)\2 \\ M. F. Hasler, Apr 19 2014
-
PARI
a(n)=(sqrtint(8*n-7)+1)\2
-
PARI
a(n)=my(k=1);while(binomial(k+1,2)+1<=n,k++);k \\ R. J. Cano, Mar 17 2014
-
Python
from math import isqrt def A002024(n): return (isqrt(8*n)+1)//2 # Chai Wah Wu, Feb 02 2022
-
Sage
[floor(sqrt(2*n) +1/2) for n in (1..80)] # G. C. Greubel, Dec 10 2018
Formula
a(n) = floor(1/2 + sqrt(2n)). Also a(n) = ceiling((sqrt(1+8n)-1)/2). [See the Liu link for a large collection of explicit formulas. - N. J. A. Sloane, Oct 30 2019]
a((k-1)*k/2 + i) = k for k > 0 and 0 < i <= k. - Reinhard Zumkeller, Aug 30 2001
a(n) = a(n - a(n-1)) + 1, with a(1)=1. - Ian M. Levitt (ilevitt(AT)duke.poly.edu), Aug 18 2002
a(n) = round(sqrt(2n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 01 2002
G.f.: (x/(1-x))*Product_{k>0} (1-x^(2*k))/(1-x^(2*k-1)). - Vladeta Jovovic, Oct 06 2003
Sum_{i=1..n} Sum_{j=i..n+i-1} T(j,i) = A000578(n); Sum_{i=1..n} T(n,i) = A000290(n). - Reinhard Zumkeller, Jun 24 2007
a(n) + n = A014132(n). - Vincenzo Librandi, Jul 08 2010
a(n) = ceiling(-1/2 + sqrt(2n)). - Branko Curgus, May 12 2009
a(n) = round(sqrt(2*n)) = round(sqrt(2*n-1)); there exist a and b greater than zero such that 2*n = 2+(a+b)^2 -(a+3*b) and a(n)=(a+b-1). - Fabio Civolani (civox(AT)tiscali.it), Feb 23 2010
A005318(n+1) = 2*A005318(n) - A205744(n), A205744(n) = A005318(A083920(n)), A083920(n) = n - a(n). - N. J. A. Sloane, Feb 11 2012
Expansion of psi(x) * x / (1 - x) in powers of x where psi() is a Ramanujan theta function. - Michael Somos, Mar 19 2014
G.f.: (x/(1-x)) * Product_{n>=1} (1 + x^n) * (1 - x^(2*n)). - Paul D. Hanna, Feb 27 2016
a(n) = 1 + Sum_{i=1..n/2} ceiling(floor(2(n-1)/(i^2+i))/(2n)). - José de Jesús Camacho Medina, Jan 07 2017
a(n) = floor((sqrt(8*n-7)+1)/2). - Néstor Jofré, Apr 24 2017
a(n) = floor((A000196(8*n)+1)/2). - Pontus von Brömssen, Dec 10 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 (A003881). - Amiram Eldar, Oct 01 2022
G.f. as array: (x^2*(1 - y)^2 + y^2 + x*y*(1 - 2*y))/((1 - x)^2*(1 - y)^2). - Stefano Spezia, Apr 22 2024
A007283 a(n) = 3*2^n.
3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472, 6442450944, 12884901888
Offset: 0
Comments
Same as Pisot sequences E(3, 6), L(3, 6), P(3, 6), T(3, 6). See A008776 for definitions of Pisot sequences.
Also least number m such that 2^n is the smallest proper divisor of m which is also a suffix of m in binary representation, see A080940. - Reinhard Zumkeller, Feb 25 2003
Length of the period of the sequence Fibonacci(k) (mod 2^(n+1)). - Benoit Cloitre, Mar 12 2003
The sequence of first differences is this sequence itself. - Alexandre Wajnberg and Eric Angelini, Sep 07 2005
Subsequence of A122132. - Reinhard Zumkeller, Aug 21 2006
Apart from the first term, a subsequence of A124509. - Reinhard Zumkeller, Nov 04 2006
Total number of Latin n-dimensional hypercubes (Latin polyhedra) of order 3. - Kenji Ohkuma (k-ookuma(AT)ipa.go.jp), Jan 10 2007
Number of different ternary hypercubes of dimension n. - Edwin Soedarmadji (edwin(AT)systems.caltech.edu), Dec 10 2005
For n >= 1, a(n) is equal to the number of functions f:{1, 2, ..., n + 1} -> {1, 2, 3} such that for fixed, different x_1, x_2,...,x_n in {1, 2, ..., n + 1} and fixed y_1, y_2,...,y_n in {1, 2, 3} we have f(x_i) <> y_i, (i = 1,2,...,n). - Milan Janjic, May 10 2007
a(n) written in base 2: 11, 110, 11000, 110000, ..., i.e.: 2 times 1, n times 0 (see A003953). - Jaroslav Krizek, Aug 17 2009
Subsequence of A051916. - Reinhard Zumkeller, Mar 20 2010
Numbers containing the number 3 in their Collatz trajectories. - Reinhard Zumkeller, Feb 20 2012
a(n-1) gives the number of ternary numbers with n digits with no two adjacent digits in common; e.g., for n=3 we have 010, 012, 020, 021, 101, 102, 120, 121, 201, 202, 210 and 212. - Jon Perry, Oct 10 2012
If n > 1, then a(n) is a solution for the equation sigma(x) + phi(x) = 3x-4. This equation also has solutions 84, 3348, 1450092, ... which are not of the form 3*2^n. - Farideh Firoozbakht, Nov 30 2013
a(n) is the upper bound for the "X-ray number" of any convex body in E^(n + 2), conjectured by Bezdek and Zamfirescu, and proved in the plane E^2 (see the paper by Bezdek and Zamfirescu). - L. Edson Jeffery, Jan 11 2014
If T is a topology on a set V of size n and T is not the discrete topology, then T has at most 3 * 2^(n-2) many open sets. See Brown and Stephen references. - Ross La Haye, Jan 19 2014
Comment from Charles Fefferman, courtesy of Doron Zeilberger, Dec 02 2014: (Start)
Fix a dimension n. For a real-valued function f defined on a finite set E in R^n, let Norm(f, E) denote the inf of the C^2 norms of all functions F on R^n that agree with f on E. Then there exist constants k and C depending only on the dimension n such that Norm(f, E) <= C*max{ Norm(f, S) }, where the max is taken over all k-point subsets S in E. Moreover, the best possible k is 3 * 2^(n-1).
The analogous result, with the same k, holds when the C^2 norm is replaced, e.g., by the C^1, alpha norm (0 < alpha <= 1). However, the optimal analogous k, e.g., for the C^3 norm is unknown.
For the above results, see Y. Brudnyi and P. Shvartsman (1994). (End)
Also, coordination sequence for (infinity, infinity, infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
The average of consecutive powers of 2 beginning with 2^1. - Melvin Peralta and Miriam Ong Ante, May 14 2016
For n > 1, a(n) is the smallest Zumkeller number with n divisors that are also Zumkeller numbers (A083207). - Ivan N. Ianakiev, Dec 09 2016
Also, for n >= 2, the number of length-n strings over the alphabet {0,1,2,3} having only the single letters as nonempty palindromic subwords. (Corollary 21 in Fleischer and Shallit) - Jeffrey Shallit, Dec 02 2019
Also, a(n) is the minimum link-length of any covering trail, circuit, path, and cycle for the set of the 2^(n+2) vertices of an (n+2)-dimensional hypercube. - Marco Ripà, Aug 22 2022
The known fixed points of maps n -> A163511(n) and n -> A243071(n). [See comments in A163511]. - Antti Karttunen, Sep 06 2023
The finite subsequence a(3), a(4), a(5), a(6) = 24, 48, 96, 192 is one of only two geometric sequences that can be formed with all interior angles (all integer, in degrees) of a simple polygon. The other sequence is a subsequence of A000244 (see comment there). - Felix Huber, Feb 15 2024
A level 1 Sierpiński triangle is a triangle. Level n+1 is formed from three copies of level n by identifying pairs of corner vertices of each pair of triangles. For n>2, a(n-3) is the radius of the level n Sierpiński triangle graph. - Allan Bickle, Aug 03 2024
References
- Jason I. Brown, Discrete Structures and Their Interactions, CRC Press, 2013, p. 71.
- T. Ito, Method, equipment, program and storage media for producing tables, Publication number JP2004-272104A, Japan Patent Office (written in Japanese, a(2)=12, a(3)=24, a(4)=48, a(5)=96, a(6)=192, a(7)=384 (a(7)=284 was corrected)).
- Kenji Ohkuma, Atsuhiro Yamagishi and Toru Ito, Cryptography Research Group Technical report, IT Security Center, Information-Technology Promotion Agency, JAPAN.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- K. Bezdek and Tudor Zamfirescu, A Characterization of 3-dimensional Convex Sets with an Infinite X-ray Number, in: Coll. Math. Soc. J. Bolyai 63., Intuitive Geometry, Szeged (Hungary), North-Holland, Amsterdam, 1991, pp. 33-38.
- Allan Bickle, Properties of Sierpinski Triangle Graphs, Springer PROMS 448 (2021) 295-303.
- Yuri Brudnyi and Pavel Shvartsman, Generalizations of Whitney's extension theorem, International Mathematics Research Notices 1994.3 (1994): 129-139.
- J. W. Cannon and P. Wagreich, Growth functions of surface groups, Mathematische Annalen, 1992, Volume 293, pp. 239-257. See Prop. 3.1.
- Tomislav Došlić, Kepler-Bouwkamp Radius of Combinatorial Sequences, Journal of Integer Sequences, Vol. 17, 2014, #14.11.3.
- John Elias, Illustration: 2^n+1 hexagram perimeters
- Lukas Fleischer and Jeffrey Shallit, Words With Few Palindromes, Revisited, arxiv preprint arXiv:1911.12464 [cs.FL], November 27 2019.
- A. Hinz, S. Klavzar, and S. Zemljic, A survey and classification of Sierpinski-type graphs, Discrete Applied Mathematics 217 3 (2017), 565-600.
- Tanya Khovanova, Recursive Sequences
- Roberto Rinaldi and Marco Ripà, Optimal cycles enclosing all the nodes of a k-dimensional hypercube, arXiv:2212.11216 [math.CO], 2022.
- Edwin Soedarmadji, Latin Hypercubes and MDS Codes, Discrete Mathematics, Volume 306, Issue 12, Jun 28 2006, Pages 1232-1239
- D. Stephen, Topology on Finite Sets, American Mathematical Monthly, 75: 739 - 741, 1968.
- Index entries for linear recurrences with constant coefficients, signature (2).
Crossrefs
Coordination sequences for triangular tilings of hyperbolic space: A001630, A007283, A054886, A078042, A096231, A163876, A179070, A265057, A265058, A265059, A265060, A265061, A265062, A265063, A265064, A265065, A265066, A265067, A265068, A265069, A265070, A265071, A265072, A265073, A265074, A265075, A265076, A265077.
Subsequence of the following sequences: A029744, A029747, A029748, A029750, A362804 (after 3), A364494, A364496, A364289, A364291, A364292, A364295, A364497, A364964, A365422.
Programs
-
Haskell
a007283 = (* 3) . (2 ^) a007283_list = iterate (* 2) 3 -- Reinhard Zumkeller, Mar 18 2012, Feb 20 2012
-
Magma
[3*2^n: n in [0..30]]; // Vincenzo Librandi, May 18 2011
-
Maple
A007283:=n->3*2^n; seq(A007283(n), n=0..50); # Wesley Ivan Hurt, Dec 03 2013
-
Mathematica
Table[3(2^n), {n, 0, 32}] (* Alonso del Arte, Mar 24 2011 *)
-
Maxima
A007283(n):=3*2^n$ makelist(A007283(n),n,0,30); /* Martin Ettl, Nov 11 2012 */
-
PARI
a(n)=3*2^n
-
PARI
a(n)=3<
Charles R Greathouse IV, Oct 10 2012 -
Python
def A007283(n): return 3<
Chai Wah Wu, Feb 14 2023 -
Scala
(List.fill(40)(2: BigInt)).scanLeft(1: BigInt)( * ).map(3 * ) // _Alonso del Arte, Nov 28 2019
Formula
G.f.: 3/(1-2*x).
a(n) = 2*a(n - 1), n > 0; a(0) = 3.
a(n) = Sum_{k = 0..n} (-1)^(k reduced (mod 3))*binomial(n, k). - Benoit Cloitre, Aug 20 2002
a(n) = A118416(n + 1, 2) for n > 1. - Reinhard Zumkeller, Apr 27 2006
a(n) = A000079(n)*3. - Omar E. Pol, Dec 16 2008
From Paul Curtz, Feb 05 2009: (Start)
a(n) = abs(b(n) - b(n+3)) with b(n) = (-1)^n*A084247(n). (End)
a(n) = 2^n + 2^(n + 1). - Jaroslav Krizek, Aug 17 2009
a(n) = (A000225(n) + 1)*3. - Martin Ettl, Nov 11 2012
E.g.f.: 3*exp(2*x). - Ilya Gutkovskiy, May 15 2016
A020651(a(n)) = 2. - Yosu Yurramendi, Jun 01 2016
Sum_{n>=1} 1/a(n) = 2/3. - Amiram Eldar, Oct 28 2020
A003602 Kimberling's paraphrases: if n = (2k-1)*2^m then a(n) = k.
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20, 3, 21, 11, 22, 6, 23, 12, 24, 2, 25, 13, 26, 7, 27, 14, 28, 4, 29, 15, 30, 8, 31, 16, 32, 1, 33, 17, 34, 9, 35, 18, 36, 5, 37, 19, 38, 10, 39, 20, 40, 3, 41, 21, 42
Offset: 1
Comments
Fractal sequence obtained from powers of 2.
k occurs at (2*k-1)*A000079(m), m >= 0. - Robert G. Wilson v, May 23 2006
Sequence is T^(oo)(1) where T is acting on a word w = w(1)w(2)..w(m) as follows: T(w) = "1"w(1)"2"w(2)"3"(...)"m"w(m)"m+1". For instance T(ab) = 1a2b3. Thus T(1) = 112, T(T(1)) = 1121324, T(T(T(1))) = 112132415362748. - Benoit Cloitre, Mar 02 2009
Note that iterating the post-numbering operator U(w) = w(1) 1 w(2) 2 w(3) 3... produces the same limit sequence except with an additional "1" prepended, i.e., 1,1,1,2,1,3,2,4,... - Glen Whitney, Aug 30 2023
In the binary expansion of n, first swallow all zeros from the right, then add 1, and swallow the now-appearing 0 bit as well. - Ralf Stephan, Aug 22 2013
Although A264646 and this sequence initially agree in their digit-streams, they differ after 48 digits. - N. J. A. Sloane, Nov 20 2015
"[This is a] fractal because we get the same sequence after we delete from it the first appearance of all positive integers" - see Cobeli and Zaharescu link. - Robert G. Wilson v, Jun 03 2018
From Peter Munn, Jun 16 2022: (Start)
The sequence is the list of positive integers interleaved with the sequence itself. Provided the offset is suitable (which is the case here) a term of such a self-interleaved sequence is determined by the odd part of its index. Putting some of the formulas given here into words, a(n) is the position of the odd part of n in the list of odd numbers.
Applying the interleaving transform again, we get A110963.
(End)
Omitting all 1's leaves A131987 + 1. - David James Sycamore, Jul 26 2022
a(n) is also the smallest positive number not among the terms between a(a(n-1)) and a(n-1) inclusive (with a(0)=1 prepended). - Neal Gersh Tolunsky, Mar 07 2023
Examples
From _Peter Munn_, Jun 14 2022: (Start) Start of table showing the interleaving with the positive integers: n a(n) (n+1)/2 a(n/2) 1 1 1 2 1 1 3 2 2 4 1 1 5 3 3 6 2 2 7 4 4 8 1 1 9 5 5 10 3 3 11 6 6 12 2 2 (End)
References
- Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..10000
- J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.
- Cristian Cobeli and Alexandru Zaharescu, Promenade around Pascal Triangle - Number Motives, Bull. Math. Soc. Sci. Math. Roumanie, Tome 56(104) No. 1, 2013, 73-98.
- J.-P. Delahaye, La marelle arithmétique, Pour la Science, No. 360, October 2007. In French.
- Dale Gerdemann, Plotting Adjacent Points in A003602, Kimberling's Paraphrase, YouTube Video, 2015.
- Dale Gerdemann, Plotting Adjacent Terms of A003602 Modulo Increasing Powers of 2, YouTube Video, 2015.
- Douglas E. Iannucci and Urban Larsson, Game values of arithmetic functions, arXiv:2101.07608 [math.NT], 2021.
- Jonas Kaiser, On the relationship between the Collatz conjecture and Mersenne prime numbers, arXiv preprint arXiv:1608.00862 [math.GM], 2016.
- Clark Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.
- Clark Kimberling, Fractal sequences
- Ralf Stephan, Some divide-and-conquer sequences ...
- Ralf Stephan, Table of generating functions
- Matty van-Son, Palindromic sequences of the Markov spectrum, arXiv:1804.10802 [math.NT], 2018.
- Eric Weisstein's World of Mathematics, Odd Part
- Index entries for sequences related to binary expansion of n
Crossrefs
Cf. A000079, A000265, A001511, A003603, A003961, A014577 (with offset 1, reduction mod 2), A025480, A035528, A048673, A101279, A110963, A117303, A126760, A181988, A220466, A249745, A253887, A337821 (2-adic valuation).
Cf. also A349134 (Dirichlet inverse), A349135 (sum with it), A349136 (Möbius transform), A349431, A349371 (inverse Möbius transform).
Cf. A264646.
Programs
-
Haskell
a003602 = (`div` 2) . (+ 1) . a000265 -- Reinhard Zumkeller, Feb 16 2012, Oct 14 2010
-
Haskell
import Data.List (transpose) a003602 = flip div 2 . (+ 1) . a000265 a003602_list = concat $ transpose [[1..], a003602_list] -- Reinhard Zumkeller, Aug 09 2013, May 23 2013
-
Maple
A003602:=proc(n) options remember: if n mod 2 = 1 then RETURN((n+1)/2) else RETURN(procname(n/2)) fi: end proc: seq(A003602(n), n=1..83); # Pab Ter nmax := 83: for m from 0 to ceil(simplify(log[2](nmax))) do for k from 1 to ceil(nmax/(m+2)) do a((2*k-1)*2^m) := k od: od: seq(a(k), k=1..nmax); # Johannes W. Meijer, Feb 04 2013 A003602 := proc(n) a := 1; for p in ifactors(n)[2] do if op(1,p) > 2 then a := a*op(1,p)^op(2,p) ; end if; end do : (a+1)/2 ; end proc: # R. J. Mathar, May 19 2016
-
Mathematica
a[n_] := Block[{m = n}, While[ EvenQ@m, m /= 2]; (m + 1)/2]; Array[a, 84] (* or *) a[1] = 1; a[n_] := a[n] = If[OddQ@n, (n + 1)/2, a[n/2]]; Array[a, 84] (* Robert G. Wilson v, May 23 2006 *) a[n_] := Ceiling[NestWhile[Floor[#/2] &, n, EvenQ]/2]; Array[a, 84] (* Birkas Gyorgy, Apr 05 2011 *) a003602 = {1}; max = 7; Do[b = {}; Do[AppendTo[b, {k, a003602[[k]]}], {k, Length[a003602]}]; a003602 = Flatten[b], {n, 2, max}]; a003602 (* L. Edson Jeffery, Nov 21 2015 *)
-
PARI
A003602(n)=(n/2^valuation(n,2)+1)/2; /* Joerg Arndt, Apr 06 2011 */
-
Python
import math def a(n): return (n/2**int(math.log(n - (n & n - 1), 2)) + 1)/2 # Indranil Ghosh, Apr 24 2017
-
Python
def A003602(n): return (n>>(n&-n).bit_length())+1 # Chai Wah Wu, Jul 08 2022
-
Scheme
(define (A003602 n) (let loop ((n n)) (if (even? n) (loop (/ n 2)) (/ (+ 1 n) 2)))) ;; Antti Karttunen, Feb 04 2015
Formula
a(n) = (A000265(n) + 1)/2.
a((2*k-1)*2^m) = k, for m >= 0 and k >= 1. - Robert G. Wilson v, May 23 2006
Inverse Weigh transform of A035528. - Christian G. Bower
G.f.: 1/x * Sum_{k>=0} x^2^k/(1-2*x^2^(k+1) + x^2^(k+2)). - Ralf Stephan, Jul 24 2003
a(2*n-1) = n and a(2*n) = a(n). - Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005
a(A118413(n,k)) = A002024(n,k); = a(A118416(n,k)) = A002260(n,k); a(A014480(n)) = A001511(A014480(n)). - Reinhard Zumkeller, Apr 27 2006
Ordinal transform of A001511. - Franklin T. Adams-Watters, Aug 28 2006
a(n) = A249745(A126760(A003961(n))) = A249745(A253887(A048673(n))). That is, this sequence plays the same role for the numbers in array A135764 as A126760 does for the odd numbers in array A135765. - Antti Karttunen, Feb 04 2015 & Jan 19 2016
G.f. satisfies g(x) = g(x^2) + x/(1-x^2)^2. - Robert Israel, Apr 24 2015
a(n) = A025480(n-1) + 1. - R. J. Mathar, May 19 2016
a(n) = (1 + n)/2, for n odd; a(n) = a(n/2), for n even. - David James Sycamore, Jul 28 2022
a(n) = n/2^A001511(n) + 1/2. - Alan Michael Gómez Calderón, Oct 06 2023
Extensions
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005
A020714 a(n) = 5 * 2^n.
5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 655360, 1310720, 2621440, 5242880, 10485760, 20971520, 41943040, 83886080, 167772160, 335544320, 671088640, 1342177280, 2684354560, 5368709120, 10737418240
Offset: 0
Comments
Same as Pisot sequences E(5,10), L(5,10), P(5,10), T(5,10). See A008776 for definitions of Pisot sequences.
The first differences are the sequence itself. - Alexandre Wajnberg & Eric Angelini, Sep 07 2005
5 times powers of 2. - Omar E. Pol, Dec 16 2008
Subsequence of A051916. - Reinhard Zumkeller, Mar 20 2010
With the addition of "2, 3," at the beginning, this sequence gives terms (n + 3) through the first term greater than 2^n, for n odd, of the negabinary Keith sequence for 2^n, thus proving that with the exception of 2 itself, no odd-indexed power of 2 is a negabinary Keith number (see A188381). - Alonso del Arte, Feb 02 2012
Let b(0) = 5 and b(n+1) = the smallest number not in the sequence such that b(n+1) - Product_{i=0..n} b(i) divides b(n+1) - Sum_{i=0..n} b(i). Then b(n+2) = a(n) for n > 0. - Derek Orr, Jan 15 2015
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..238
- John Elias, Illustration: Alternating Tetrahedrons of Tetrahedrons
- Tanya Khovanova, Recursive Sequences.
- Petro Kosobutskyy, Anastasiia Yedyharova, and Taras Slobodzyan, From Newton's binomial and Pascal's triangle to Collatz's problem, Comp. Des. Sys., Theor. Practice (2023) Vol. 5, No. 1, 121-127.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1003.
- Everett Sullivan, Linear chord diagrams with long chords, arXiv preprint arXiv:1611.02771 [math.CO], 2016. See Table 1.
- Index entries for linear recurrences with constant coefficients, signature (2).
Crossrefs
Programs
-
Magma
[5*2^n: n in [0..40]]; // Vincenzo Librandi, Apr 28 2011
-
Mathematica
Table[5*2^n, {n, 0, 31}] (* Vladimir Joseph Stephan Orlovsky, Dec 16 2008 *) NestList[2#&,5,40] (* Harvey P. Dale, Mar 13 2022 *)
-
PARI
a(n)=5<
Charles R Greathouse IV, Sep 24 2015
Formula
a(n) = 5*2^n. a(n) = 2*a(n-1).
G.f.: 5/(1-2*x).
If m is a term greater than 5 of this sequence then m = 5*phi(phi(m)). - Farideh Firoozbakht, Aug 16 2005
a(n) = A118416(n+1,3) for n>2. - Reinhard Zumkeller, Apr 27 2006
a(n) = A000079(n)*5. - Omar E. Pol, Dec 16 2008
a(n) = A173786(n+2,n) for n > 1. - Reinhard Zumkeller, Feb 28 2010
Sum_{n>=1} 1/a(n) = 2/5. - Amiram Eldar, Oct 28 2020
E.g.f.: 5*exp(2*x). - Stefano Spezia, May 15 2021
A005009 a(n) = 7*2^n.
7, 14, 28, 56, 112, 224, 448, 896, 1792, 3584, 7168, 14336, 28672, 57344, 114688, 229376, 458752, 917504, 1835008, 3670016, 7340032, 14680064, 29360128, 58720256, 117440512, 234881024, 469762048, 939524096, 1879048192, 3758096384
Offset: 0
Comments
The first differences are the sequence itself. - Alexandre Wajnberg & Eric Angelini, Sep 07 2005
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..3000
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (2).
Crossrefs
Programs
-
Haskell
a005009 = (* 7) . (2 ^) -- Reinhard Zumkeller, May 03 2012
-
Magma
[7*2^n:n in [0..50]]; // Vincenzo Librandi, Sep 20 2011
-
Mathematica
7*2^Range[0,50] (* Vladimir Joseph Stephan Orlovsky, Mar 14 2011 *) NestList[2#&,7,30] (* Harvey P. Dale, Aug 10 2024 *)
-
PARI
a(n)=7<
Charles R Greathouse IV, Dec 22 2011 -
SageMath
[7*2^n for n in range(51)] # G. C. Greubel, Jan 05 2023
Formula
G.f.: 7/(1-2*x).
a(n) = A118416(n+1,4) for n > 3. - Reinhard Zumkeller, Apr 27 2006
a(n) = 2*a(n-1), for n > 0, with a(0)=7 . - Philippe Deléham, Nov 23 2008
a(n) = 7 * A000079(n). - Omar E. Pol, Dec 16 2008
a(n) = A173787(n+3,n). - Reinhard Zumkeller, Feb 28 2010
Intersection of A014311 and A212191: all terms and their squares are the sum of exactly three distinct powers of 2, A000120(a(n)) = A000120(a(n)^2) = 3. - Reinhard Zumkeller, May 03 2012
G.f.: 2/x/G(0) - 1/x + 9, where G(k)= 1 + 1/(1 - x*(7*k+2)/(x*(7*k+9) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 03 2013
E.g.f.: 7*exp(2*x). - Stefano Spezia, May 15 2021
A014480 Expansion of g.f. (1+2*x)/(1-2*x)^2.
1, 6, 20, 56, 144, 352, 832, 1920, 4352, 9728, 21504, 47104, 102400, 221184, 475136, 1015808, 2162688, 4587520, 9699328, 20447232, 42991616, 90177536, 188743680, 394264576, 822083584, 1711276032, 3556769792, 7381975040, 15300820992, 31675383808, 65498251264
Offset: 0
Comments
Number of binary trees of size n and height n-1, computed from size n=3 onward; i.e. A014480(n) = A073345(n+3,n+2). (For sizes n=0 through 2 there are no such trees.)
Also determinant of the n X n matrix M(i,j)=binomial(2i+2j,i+j). - Benoit Cloitre, Mar 27 2004
Subdiagonal in triangle displayed in A128196. - Peter Luschny, Feb 26 2007
From Jaume Oliver Lafont, Nov 08 2009: (Start)
From two BBP-type formulas by Knuth, (page 6 of the reference)
Sum_{n>=0} 1/a(n) = 2^(1/2)*log(1+2^(1/2))
Sum_{n>=0} (-1)^n/a(n) = 2^(1/2)*atan(1/2^(1/2))
(End)
Create a triangle with first column T(n,1)=1+4*n for n=0 1 2... The remaining terms T(r,c)=T(r,c-1)+T(r-1,c-1). T(n,n+1)=a(n). - J. M. Bergot, Dec 18 2012
Examples
(1 + 2*x)/(1-2*x)^2 = 1 + 6*x + 20*x^2 + 56*x^3 + 144*x^4 + 352*x^5 + 832*x^6 + ...
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- David Bailey, Peter Borwein, and Simon Plouffe, On the rapid computation of various polylogarithmic constants, in: L. Berggren, J. Borwein, and P. Borwein (eds.), Pi: A Source Book, Springer, New York, NY, 2000.
- Index entries for linear recurrences with constant coefficients, signature (4,-4).
Programs
-
Haskell
a014480 n = a014480_list !! n a014480_list = 1 : 6 : map (* 4) (zipWith (-) (tail a014480_list) a014480_list) -- Reinhard Zumkeller, Jan 22 2012
-
Magma
[2^n*(2*n + 1): n in [0..35]]; // Vincenzo Librandi, Oct 20 2014
-
Maple
a:=n-> sum(2^n*n^binomial(j,n)/2,j=1..n): seq(a(n),n=1..29); # Zerinvary Lajos, Apr 18 2009
-
Mathematica
CoefficientList[ Series[(1 + 2*x)/(1 - 2*x)^2, {x, 0, 28}], x] LinearRecurrence[{4, -4}, {1, 6}, 29] (* Robert G. Wilson v, Dec 26 2012 *) Table[2^n (2*n + 1), {n, 0, 28}] (* Fred Daniel Kline, Oct 20 2014 *)
-
PARI
Vec((1+2*x)/(1-2*x)^2+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
Formula
a(n) = (2n+1)*2^n = 4a(n-1)-4a(n-2) = 4*A052951(n-1) = a(n-1)+A052951(n) = a(n-1)*(2+4/(2n-1)) = A054582(n, n). - Henry Bottomley, May 16 2001
E.g.f.: x*cosh(sqrt(2)*x) = x + 6x^3/3! + 20x^5/5! + 56x^7/7! +... - Ralf Stephan, Mar 03 2005
From Reinhard Zumkeller, Apr 27 2006: (Start)
A117303(a(n)) = a(n). (End)
Row sums of triangle A132775 - Gary W. Adamson, Aug 29 2007
Row sums of triangle A134233 - Gary W. Adamson, Oct 14 2007
From Johannes W. Meijer, Nov 23 2009: (Start)
a(n) = 3*a(n-1) - 2^(n-1)*(2*n-5) with a(0) = 1.
a(n) = 3*a(n-1) - 2*a(n-2) + 2^n with a(0) = 1 and a(1) = 6.
(End)
G.f.: -G(0) where G(k) = 1 - (2*k+2)/(1 - x/(x - (k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
E.g.f.: Q(0), where Q(k)= 1 + 4*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
A005010 a(n) = 9*2^n.
9, 18, 36, 72, 144, 288, 576, 1152, 2304, 4608, 9216, 18432, 36864, 73728, 147456, 294912, 589824, 1179648, 2359296, 4718592, 9437184, 18874368, 37748736, 75497472, 150994944, 301989888, 603979776, 1207959552, 2415919104, 4831838208, 9663676416, 19327352832
Offset: 0
Comments
Row sums of (8, 1)-Pascal triangle A093565. - N. J. A. Sloane, Sep 22 2004
The first differences are the sequence itself. - Alexandre Wajnberg & Eric Angelini, Sep 07 2005
For n>=1, a(n) is equal to the number of functions f:{1,2,...,n+2}->{1,2,3} such that for fixed, different x_1, x_2,...,x_n in {1,2,...,n+2} and fixed y_1, y_2,...,y_n in {1,2,3} we have f(x_i)<>y_i, (i=1,2,...,n). - Milan Janjic, May 10 2007
9 times powers of 2. - Omar E. Pol, Dec 16 2008
a(n) = A173786(n+3,n) for n>2. - Reinhard Zumkeller, Feb 28 2010
Let D(m) = {d(m,i)}, i = 1..q, denote the set of the q divisors of a number m, and consider s0(m) and s1(m) the sums of the divisors that are congruent to 2 and 3 (mod 4) respectively. For n>0, the sequence a(n) lists the numbers m such that s0(m) = 26 and s1(m) = 3. - Michel Lagneau, Feb 10 2017
Links
- Mia Boudreau, Table of n, a(n) for n = 0..3000 (first 236 terms from Vincenzo Librandi)
- Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (2).
Programs
-
Magma
[9*2^n: n in [0..40]]; // Vincenzo Librandi, Apr 28 2011
-
Mathematica
9*2^Range[0, 60] (* Vladimir Joseph Stephan Orlovsky, Jun 09 2011 *)
-
PARI
a(n)=9<
Charles R Greathouse IV, Apr 17 2012
Formula
a(n) = 9*2^n.
G.f.: 9/(1-2*x).
a(n) = A118416(n+1,5) for n>4. - Reinhard Zumkeller, Apr 27 2006
a(n) = 2*a(n-1), n>0; a(0)=9. - Philippe Deléham, Nov 23 2008
a(n) = 9*A000079(n). - Omar E. Pol, Dec 16 2008
a(n) = 3*A007283(n). - Omar E. Pol, Jul 14 2015
E.g.f.: 9*exp(2*x). - Elmo R. Oliveira, Aug 16 2024
A173786 Triangle read by rows: T(n,k) = 2^n + 2^k, 0 <= k <= n.
2, 3, 4, 5, 6, 8, 9, 10, 12, 16, 17, 18, 20, 24, 32, 33, 34, 36, 40, 48, 64, 65, 66, 68, 72, 80, 96, 128, 129, 130, 132, 136, 144, 160, 192, 256, 257, 258, 260, 264, 272, 288, 320, 384, 512, 513, 514, 516, 520, 528, 544, 576, 640, 768, 1024, 1025, 1026, 1028, 1032, 1040, 1056, 1088, 1152, 1280, 1536, 2048
Offset: 0
Examples
Triangle begins as: 2; 3, 4; 5, 6, 8; 9, 10, 12, 16; 17, 18, 20, 24, 32; 33, 34, 36, 40, 48, 64; 65, 66, 68, 72, 80, 96, 128; 129, 130, 132, 136, 144, 160, 192, 256; 257, 258, 260, 264, 272, 288, 320, 384, 512; 513, 514, 516, 520, 528, 544, 576, 640, 768, 1024; 1025, 1026, 1028, 1032, 1040, 1056, 1088, 1152, 1280, 1536, 2048;
Links
- T. D. Noe, Rows n = 0..100 of triangle, flattened
- Wawrzyniec Bieniawski, Piotr Masierak, Andrzej Tomski, and Szymon Łukaszyk, Assembly Theory - Formalizing Assembly Spaces and Discovering Patterns and Bounds, Preprints.org (2025).
Programs
-
Magma
[2^n + 2^k: k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 07 2021
-
Mathematica
Flatten[Table[2^n + 2^m, {n,0,10}, {m, 0, n}]] (* T. D. Noe, Jun 18 2013 *)
-
PARI
A173786(n) = { my(c = (sqrtint(8*n + 1) - 1) \ 2); 1 << c + 1 << (n - binomial(c + 1, 2)); }; \\ Antti Karttunen, Feb 29 2024, after David A. Corneth's PARI-program in A048645
-
Python
from math import isqrt, comb def A173786(n): a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)) return (1<Chai Wah Wu, Jun 20 2025
-
Sage
flatten([[2^n + 2^k for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 07 2021
Formula
1 <= A000120(T(n,k)) <= 2.
For n>0, 0<=kA048645(n+1,k+2) and T(n,n) = A048645(n+2,1).
Row sums give A006589(n).
Central terms give A161168(n).
T(2*n+1,n) = A007582(n+1).
T(2*n+1,n+1) = A028403(n+1).
T(n,k) = A059268(n+1,k+1) + A173787(n,k), 0
T(n,0) = A000051(n).
T(n,1) = A052548(n) for n>0.
T(n,2) = A140504(n) for n>1.
T(n,3) = A175161(n-3) for n>2.
T(n,4) = A175162(n-4) for n>3.
T(n,5) = A175163(n-5) for n>4.
T(n,n-4) = A110287(n-4) for n>3.
T(n,n-3) = A005010(n-3) for n>2.
T(n,n-2) = A020714(n-2) for n>1.
T(n,n-1) = A007283(n-1) for n>0.
T(n,n) = 2*A000079(n).
Extensions
Typo in first comment line fixed by Reinhard Zumkeller, Mar 07 2010
Comments
Examples
References
Links
Crossrefs
Programs
Haskell
Haskell
MATLAB
Magma
Maple
Mathematica
PARI
PARI
PARI
PARI
Python
Python
Python
Sage
Scheme
Formula
Extensions