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
A016825 Positive integers congruent to 2 (mod 4): a(n) = 4*n+2, for n >= 0.
2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234
Offset: 0
Comments
Twice the odd numbers, also called singly even numbers.
Numbers having equal numbers of odd and even divisors: A001227(a(n)) = A000005(2*a(n)). - Reinhard Zumkeller, Dec 28 2003
Continued fraction for coth(1/2) = (e+1)/(e-1). The continued fraction for tanh(1/2) = (e-1)/(e+1) would be a(0) = 0, a(n) = A016825(n-1), n >= 1.
No solutions to a(n) = b^2 - c^2. - Henry Bottomley, Jan 13 2001
Sequence gives m such that 8 is the largest power of 2 dividing A003629(k)^m-1 for any k. - Benoit Cloitre, Apr 05 2002
k such that Sum_{d|k} (-1)^d = A048272(k) = 0. - Benoit Cloitre, Apr 15 2002
Also k such that Sum_{d|k} phi(d)*mu(k/d) = A007431(k) = 0. - Benoit Cloitre, Apr 15 2002
Also k such that Sum_{d|k} (d/A000005(d))*mu(k/d) = 0, k such that Sum_{d|k}(A000005(d)/d)*mu(k/d) = 0. - Benoit Cloitre, Apr 19 2002
Solutions to phi(x) = phi(x/2); primorial numbers are here. - Labos Elemer, Dec 16 2002
Together with 1, numbers that are not the leg of a primitive Pythagorean triangle. - Lekraj Beedassy, Nov 25 2003
For n > 0: complement of A107750 and A023416(a(n)-1) = A023416(a(n)) <> A023416(a(n)+1). - Reinhard Zumkeller, May 23 2005
Also the minimal value of Sum_{i=1..n+2} (p(i) - p(i+1))^2, where p(n+3) = p(1), as p ranges over all permutations of {1,2,...,n+2} (see the Mihai reference). Example: a(2)=10 because the values of the sum for the permutations of {1,2,3,4} are 10 (8 times), 12 (8 times) and 18 (8 times). - Emeric Deutsch, Jul 30 2005
Except for a(n)=2, numbers having 4 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
Also a(n) = (n-1) + n + (n+1) + (n+2), so a(n) and -a(n) are all the integers that are sums of four consecutive integers. - Rick L. Shepherd, Mar 21 2009
The denominator in Pi/8 = 1/2 - 1/6 + 1/10 - 1/14 + 1/18 - 1/22 + .... - Mohammad K. Azarian, Oct 13 2011
This sequence gives the positive zeros of i^x + 1 = 0, x real, where i^x = exp(i*x*Pi/2). - Ilya Gutkovskiy, Aug 08 2015
Numbers k such that Sum_{j=1..k} j^3 is not a multiple of k. - Chai Wah Wu, Aug 23 2017
Numbers k such that Lucas(k) is a multiple of 3. - Bruno Berselli, Oct 17 2017
Also numbers k such that t^k == -1 (mod 5), where t is a term of A047221. - Bruno Berselli, Dec 28 2017
The even numbers form a ring, and these are the primes in that ring. Note that unique factorization into primes does not hold, since 60 = 2*30 = 6*10. - N. J. A. Sloane, Nov 11 2019
Also numbers ending with 10 in base 2. - John Keith, May 09 2022
Examples
0.4621171572600097585023184... = 0 + 1/(2 + 1/(6 + 1/(10 + 1/(14 + ...)))), i.e., c.f. for tanh(1/2). 2.1639534137386528487700040... = 2 + 1/(6 + 1/(10 + 1/(14 + 1/(18 + ...)))), i.e., c.f. for coth(1/2).
References
- H. Bass, Mathematics, Mathematicians and Mathematics Education, Bull. Amer. Math. Soc. (N.S.) 42 (2004), no. 4, 417-430.
- Arthur Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.
- J. R. Goldman, The Queen of Mathematics, 1998, p. 70.
- Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 262, 278.
Links
- Harry J. Smith, Table of n, a(n) for n = 0..20000
- Tanya Khovanova, Recursive Sequences
- D. H. Lehmer, Continued fractions containing arithmetic progressions, Scripta Mathematica, 29 (1973): 17-24. [Annotated copy of offprint]
- I. Lukovits and D. Janezic, Enumeration of conjugated circuits in nanotubes, J. Chem. Inf. Comput. Sci. 44 (2004), 410-414.
- Vasile Mihai and Michael Woltermann, Problem 10725: The Smoothest and Roughest Permutations, Amer. Math. Monthly, 108 (March 2001), pp. 272-273.
- Paolo Emilio Ricci, Complex Spirals and Pseudo-Chebyshev Polynomials of Fractional Degree, Symmetry (2018) Vol. 10, No. 12, 671.
- William A. Stein, The modular forms database
- Eric Weisstein's World of Mathematics, Bishop Graph
- Eric Weisstein's World of Mathematics, Maximal Clique
- Eric Weisstein's World of Mathematics, Singly Even Number
- Eric Weisstein's World of Mathematics, Square Number
- G. Xiao, Contfrac
- Index entries for continued fractions for constants
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Programs
-
GAP
Flat(List([0..70], n->4*n+2)); # Stefano Spezia, Jun 17 2019
-
Haskell
a016825 = (+ 2) . (* 4) a016825_list = [2, 6 ..] -- Reinhard Zumkeller, Feb 14 2012
-
Magma
[4*n+2 : n in [0..70]];
-
Maple
a := n -> 4*n+2: seq(a(n), n = 0 .. 70); # Stefano Spezia, Jun 17 2019
-
Mathematica
Range[2, 280, 4] (* Vladimir Joseph Stephan Orlovsky, May 26 2011 *) 4*Range[0, 70] +2 (* Eric W. Weisstein, Dec 01 2017 *) LinearRecurrence[{2, -1}, {2, 6}, 70] (* Eric W. Weisstein, Dec 01 2017 *) CoefficientList[Series[2*(1+x)/(1-x)^2, {x,0,70}], x] (* Eric W. Weisstein, Dec 01 2017 *) NestList[#+4&,2,60] (* Harvey P. Dale, Apr 08 2022 *)
-
PARI
a(n)= 4*n+2
-
PARI
contfrac(tanh(1/2)) \\ To illustrate the 3rd comment. - Harry J. Smith, May 09 2009 [Edited by M. F. Hasler, Mar 09 2020]
-
Sage
[4*n+2 for n in (0..70)] # G. C. Greubel, Jun 28 2019
Formula
a(n) = 4*n + 2, for n >= 0.
a(n) = 2*A005408(n). - Lekraj Beedassy, Nov 28 2003
a(n) = A118413(n+1,2) for n>1. - Reinhard Zumkeller, Apr 27 2006
From Michael Somos, Apr 11 2007: (Start)
G.f.: 2*(1+x)/(1-x)^2.
E.g.f.: 2*(1+2*x)*exp(x).
a(n) = a(n-1) + 4.
a(-1-n) = -a(n). (End)
a(n) = 8*n - a(n-1) for n > 0, a(0)=2. - Vincenzo Librandi, Nov 20 2010
From Reinhard Zumkeller, Jun 11 2012, Jun 30 2012 and Jul 20 2012: (Start)
A080736(a(n)) = 0.
A007814(a(n)) = 1;
A037227(a(n)) = 3.
A214546(a(n)) = 0. (End)
a(n) = T(n+2) - T(n-2) where T(n) = n*(n+1)/2 = A000217(n). In general, if M(k,n) = 2*k*n + k, then M(k,n) = T(n+k) - T(n-k). - Charlie Marion, Feb 24 2020
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 1/sqrt(2-sqrt(2)) (A285871).
Product_{n>=1} (1 + (-1)^n/a(n)) = sqrt(1-1/sqrt(2)) (A154739). (End)
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
A017113 a(n) = 8*n + 4.
4, 12, 20, 28, 36, 44, 52, 60, 68, 76, 84, 92, 100, 108, 116, 124, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372, 380, 388, 396, 404, 412, 420, 428, 436, 444, 452, 460, 468
Offset: 0
Comments
Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(65).
n such that 16 is the largest power of 2 dividing A003629(k)^n - 1 for any k. - Benoit Cloitre, Mar 23 2002
Continued fraction expansion of tanh(1/4). - Benoit Cloitre, Dec 17 2002
Consider all primitive Pythagorean triples (a,b,c) with c - a = 8, sequence gives values for b. (Corresponding values for a are A078371(n), while c follows A078370(n).) - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
Also numbers of the form a^2 + b^2 + c^2 + d^2, where a,b,c,d are odd integers. - Alexander Adamchuk, Dec 01 2006
If X is an n-set and Y_i (i=1,2,3) mutually disjoint 2-subsets of X then a(n-5) is equal to the number of 4-subsets of X intersecting each Y_i (i=1,2,3). - Milan Janjic, Aug 26 2007
Numbers k such that 3^k + 1 is divisible by 41. - Bruno Berselli, Aug 22 2018
Lexicographically smallest arithmetic progression of positive integers avoiding Fibonacci numbers. - Paolo Xausa, May 08 2023
From Martin Renner, May 24 2024: (Start)
Also number of points in a grid cross with equally long arms and a width of two points, e.g.:
* *
* * * *
* * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * *
* * * *
* *
etc. (End)
Links
- Paolo Xausa, Table of n, a(n) for n = 0..10000 (terms 0..1100 from Vincenzo Librandi)
- E. Catalan, Extrait d'une lettre, Bulletin de la S. M. F., tome 17 (1889), pp. 205-206. [If N is a prime number of the form 4*m+1, then 8*N+4 is the sum of four odd squares.]
- Cody Clifton, Commutativity in non-Abelian Groups, May 06 2010.
- Colin Defant and Noah Kravitz, Loops and Regions in Hitomezashi Patterns, arXiv:2201.03461 [math.CO], 2022. Theorem 1.2.
- Dr Barker, How to Avoid the Fibonacci Numbers, YouTube video, 2023.
- Meimei Gu and Rongxia Hao, 3-extra connectivity of 3-ary n-cube networks, arXiv:1309.5083 [cs.DM], Sep 19, 2013.
- Milan Janjic, Two Enumerative Functions.
- Tanya Khovanova, Recursive Sequences.
- William A. Stein, Dimensions of the spaces S_k^{new}(Gamma_0(N)).
- William A. Stein, The modular forms database.
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Programs
-
Haskell
a017113 = (+ 4) . (* 8) a017113_list = [4, 12 ..] -- Reinhard Zumkeller, Jul 13 2013
-
Magma
[8*n+4: n in [0..50]]; // Vincenzo Librandi, Apr 26 2011
-
Mathematica
LinearRecurrence[{2,-1}, {4,12}, 50] (* G. C. Greubel, Apr 26 2018 *)
-
PARI
a(n)=8*n+4 \\ Charles R Greathouse IV, Sep 23 2013
Formula
a(n) = A118413(n+1,3) for n > 2. - Reinhard Zumkeller, Apr 27 2006
a(n) = Sum_{k=0..4*n} (i^k+1)*(i^(4*n-k)+1), where i = sqrt(-1). - Bruno Berselli, Mar 19 2012
a(n) = 4*A005408(n). - Omar E. Pol, Apr 17 2016
E.g.f.: (8*x + 4)*exp(x). - G. C. Greubel, Apr 26 2018
G.f.: 4*(1+x)/(1-x)^2. - Wolfdieter Lang, Oct 27 2020
Sum_{n>=0} (-1)^n/a(n) = Pi/16 (A019683). - Amiram Eldar, Dec 11 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2) * sin(3*Pi/16).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(2) * cos(3*Pi/16). (End)
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
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
A058962 a(n) = 2^(2*n)*(2*n+1).
1, 12, 80, 448, 2304, 11264, 53248, 245760, 1114112, 4980736, 22020096, 96468992, 419430400, 1811939328, 7784628224, 33285996544, 141733920768, 601295421440, 2542620639232, 10720238370816, 45079976738816, 189115999977472, 791648371998720
Offset: 0
Comments
Denominators in expansion of -1/2*i*Pi+i*arcsin((1+1/4*x^2)/(1-1/4*x^2)), where i=sqrt(-1); numerators are all 1.
Denominators of odd terms in expansion of 2*arctanh(s/2); numerators are all 1. - Gerry Martens, Jul 26 2015
Reciprocals of coefficients of Taylor series expansion of sinh(x/2) / (x/2). - Tom Copeland, Feb 03 2016
Links
- Harry J. Smith, Table of n, a(n) for n = 0..200
- G. A. Campbell, Physical theory of the electric wave-filter, Bell Syst. Tech. J., 1 (1922), 1-32, see Eq. (15d). Also reprinted in M. E. Van Valkebburg, ed., Circuit Theory, Dowden, Hutchinson and Ross, 1974.
- Index entries for linear recurrences with constant coefficients, signature (8,-16).
Crossrefs
Cf. A154920. - Jaume Oliver Lafont, Jan 29 2009
Factor of the LS1[-2,n] matrix coefficients in A160487. - Johannes W. Meijer, May 24 2009
Programs
-
Magma
[2^(2*n)*(2*n+1) : n in [0..30]]; // Wesley Ivan Hurt, Aug 07 2015
-
Mathematica
a[n_] := 1/SeriesCoefficient[2 ArcTanh[s/2],{s,0,n}] Table[a[n], {n, 1, 40, 2}] (* Gerry Martens, Jul 26 2015 *) Table[2^(2 n) (2 n + 1), {n, 0, 40}] (* Vincenzo Librandi, Aug 08 2015 *) a[ n_] := With[{m = 2 n + 2}, If[ n < 0, -a[-1 - n] 4^(m - 1), m! SeriesCoefficient[ x^2 D[x Sinc[I x]^2, x]/2, {x, 0, m}]]]; (* Michael Somos, Jun 18 2017 *)
-
PARI
A058962(n)=2^(2*n)*(2*n+1) \\ M. F. Hasler, Aug 11 2015
-
PARI
{a(n) = my(m = 2*n + 2); if( n<0, -a(-1 - n) * 4^(m - 1), m! * polcoeff( x^2 * deriv(x * sinc(I*x + x * O(x^m))^2, x) / 2, m))}; /* Michael Somos, Jun 18 2017 */
Formula
Central terms of the triangle in A118416: a(n) = A118416(2*n+1, n+1) - Reinhard Zumkeller, Apr 27 2006
Sum_{n>=0} 1/a(n) = log(3). - Jaume Oliver Lafont, May 22 2007; corrected by Jaume Oliver Lafont, Jan 26 2009
a(n) = 4((2n+1)/(2n-1))*a(n-1) = 4*a(n-1)+2^(2n+1) = 8*a(n-1)-16*a(n-2). - Jaume Oliver Lafont, Dec 09 2008
G.f.: (1+4*x)/(1-4*x)^2. - Jaume Oliver Lafont, Jan 29 2009
E.g.f.: exp(4*x)*(1+8*x). - Robert Israel, Aug 10 2015
a(n) = -a(-1-n) * 4^(2*n+1) for all n in Z. - Michael Somos, Jun 18 2017
a(n) = Sum_{k = 0..n} (2*k + 1)^2*binomial(2*n + 1, n - k). - Peter Bala, Feb 25 2019
Sum_{n>=0} (-1)^n/a(n) = 2 * arctan(1/2) = 2 * A073000. - Amiram Eldar, Jul 03 2020
A051062 a(n) = 16*n + 8.
8, 24, 40, 56, 72, 88, 104, 120, 136, 152, 168, 184, 200, 216, 232, 248, 264, 280, 296, 312, 328, 344, 360, 376, 392, 408, 424, 440, 456, 472, 488, 504, 520, 536, 552, 568, 584, 600, 616, 632, 648, 664, 680, 696, 712, 728, 744, 760, 776, 792, 808, 824, 840
Offset: 0
Comments
Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(97).
n such that 32 is the largest power of 2 dividing A003629(k)^n-1 for any k. - Benoit Cloitre, Mar 23 2002
Continued fraction expansion of tanh(1/8). - Benoit Cloitre, Dec 17 2002
If Y and Z are 2-blocks of a (4n+1)-set X then a(n-1) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Oct 28 2007
General form: (q*n+x)*q x=+1; q=2=A016825, q=3=A017197, q=4=A119413, ... x=-1; q=3=A017233, q=4=A098502, ... x=+2; q=4=A051062, ... - Vladimir Joseph Stephan Orlovsky, Feb 16 2009
a(n)*n+1 = (4n+1)^2 and a(n)*(n+1)+1 = (4n+3)^2 are both perfect squares. - Carmine Suriano, Jun 01 2014
For all positive integers n, there are infinitely many positive integers k such that k*n + 1 and k*(n+1) + 1 are both perfect squares. Except for 8, all the numbers of this sequence are the smallest integers k which are solutions for getting two perfect squares. Example: a(1) = 24 and 24 * 1 + 1 = 25 = 5^2, then 24 * (1+1) + 1 = 49 = 7^2. [Reference AMM] - Bernard Schott, Sep 24 2017
Numbers k such that 3^k + 1 is divisible by 17*193. - Bruno Berselli, Aug 22 2018
References
- Letter from Gary W. Adamson concerning Prouhet-Thue-Morse sequence, Nov 11 1999.
Links
- Mia Boudreau, Table of n, a(n) for n = 0..10000
- Mihaly Bencze, Problem 11508, The American Mathematical Monthly, Vol. 117, N° 5, May 2010, p. 459.
- Milan Janjić, Two Enumerative Functions. [Wayback Machine link]
- Tanya Khovanova, Recursive Sequences.
- William A. Stein, Dimensions of the spaces S_k^{new}(Gamma_0(N)).
- William A. Stein, The modular forms database.
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Programs
-
Magma
[16*n+8: n in [0..50]]; // Wesley Ivan Hurt, Jun 01 2014
-
Maple
A051062:=n->16*n+8; seq(A051062(n), n=0..50); # Wesley Ivan Hurt, Jun 01 2014
-
Mathematica
Range[8, 1000, 16] (* Vladimir Joseph Stephan Orlovsky, May 31 2011 *) Table[16n+8, {n,0,50}] (* Wesley Ivan Hurt, Jun 01 2014 *) LinearRecurrence[{2,-1},{8,24},60] (* or *) NestList[#+16&,8,60] (* Harvey P. Dale, Aug 18 2019 *)
-
PARI
a(n)=16*n+8 \\ Charles R Greathouse IV, May 09 2016
Formula
a(n) = A118413(n+1,4) for n>3. - Reinhard Zumkeller, Apr 27 2006
a(n) = 32*n - a(n-1) for n>0, a(0)=8. - Vincenzo Librandi, Aug 06 2010
a(-1 - n) = - a(n). - Michael Somos, Jun 02 2014
Sum_{n>=0} (-1)^n/a(n) = Pi/32 (A244978). - Amiram Eldar, Feb 28 2023
From Elmo R. Oliveira, Apr 16 2024: (Start)
G.f.: 8*(1+x)/(1-x)^2.
E.g.f.: 8*exp(x)*(1 + 2*x).
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2)*sin(7*Pi/32).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(2)*cos(7*Pi/32). (End)
Comments
Examples
References
Links
Crossrefs
Programs
Haskell
Haskell
MATLAB
Magma
Maple
Mathematica
PARI
PARI
PARI
PARI
Python
Python
Python
Sage
Scheme
Formula
Extensions