login
Search: a093353 -id:a093353
     Sort: relevance | references | number | modified | created      Format: long | short | data
The Collatz or 3x+1 function: a(n) = n/2 if n is even, otherwise (3n+1)/2.
+10
122
0, 2, 1, 5, 2, 8, 3, 11, 4, 14, 5, 17, 6, 20, 7, 23, 8, 26, 9, 29, 10, 32, 11, 35, 12, 38, 13, 41, 14, 44, 15, 47, 16, 50, 17, 53, 18, 56, 19, 59, 20, 62, 21, 65, 22, 68, 23, 71, 24, 74, 25, 77, 26, 80, 27, 83, 28, 86, 29, 89, 30, 92, 31, 95, 32, 98, 33, 101, 34, 104
OFFSET
0,2
COMMENTS
This is the function usually denoted by T(n) in the literature on the 3x+1 problem. See A006370 for further references and links.
Intertwining of sequence A016789 '2,5,8,11,... ("add 3")' and the nonnegative integers.
a(n) = log_2(A076936(n)). - Amarnath Murthy, Oct 19 2002
The average value of a(0), ..., a(n-1) is A004526(n). - Amarnath Murthy, Oct 19 2002
Partial sums are A093353. - Paul Barry, Mar 31 2008
Absolute first differences are essentially in A014681 and A103889. - R. J. Mathar, Apr 05 2008
Only terms of A016789 occur twice, at positions given by sequences A005408 (odd numbers) and A016957 (6n+4): (1,4), (3,10), (5,16), (7,22), ... - Antti Karttunen, Jul 28 2017
a(n) represents the unique congruence class modulo 2n+1 that is represented an odd number of times in any 2n+1 consecutive oblong numbers (A002378). This property relates to Jim Singh's 2018 formula, as n^2 + n is a relevant oblong number. - Peter Munn, Jan 29 2022
REFERENCES
J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010.
LINKS
N. J. A. Sloane (terms 0..1000) & Antti Karttunen, Table of n, a(n) for n = 0..100000
C. J. Everett, Iteration of the number-theoretic function f(2n) = n, f(2n + 1) = 3n + 2, Advances in Mathematics, Volume 25, Issue 1, July 1977, Pages 42-45.
Jeffrey C. Lagarias, The 3x+1 Problem: An Overview, arXiv:2111.02635 [math.NT], 2021.
Keenan Monks, Kenneth G. Monks, Kenneth M. Monks, and Maria Monks, Strongly sufficient sets and the distribution of arithmetic sequences in the 3x+1 graph, arXiv:1204.3904v1 [math.DS], Apr 17 2012.
R. Terras, A stopping time problem on the positive integers, Acta Arith. 30 (1976) 241-252.
Eric Weisstein's World of Mathematics, Collatz Problem
FORMULA
From Paul Barry, Mar 31 2008: (Start)
G.f.: x*(2 + x + x^2)/(1-x^2)^2.
a(n) = (4*n+1)/4 - (2*n+1)*(-1)^n/4. (End)
a(n) = -a(n-1) + a(n-2) + a(n-3) + 4. - John W. Layman
For n > 1 this is the image of n under the modified "3x+1" map (cf. A006370): n -> n/2 if n is even, n -> (3*n+1)/2 if n is odd. - Benoit Cloitre, May 12 2002
O.g.f.: x*(2+x+x^2)/((-1+x)^2*(1+x)^2). - R. J. Mathar, Apr 05 2008
a(n) = 5/4 + (1/2)*((-1)^n)*n + (3/4)*(-1)^n + n. - Alexander R. Povolotsky, Apr 05 2008
a(n) = Sum_{i=-n..2*n} i*(-1)^i. - Bruno Berselli, Dec 14 2015
a(n) = Sum_{k=0..n-1} Sum_{i=0..k} C(i,k) + (-1)^k. - Wesley Ivan Hurt, Sep 20 2017
a(n) = (n^2-n-1) mod (2*n+1) for n > 1. - Jim Singh, Sep 26 2018
The above formula can be rewritten to show a pattern: a(n) = (n*(n+1)) mod (n+(n+1)). - Peter Munn, Jan 29 2022
Binary: a(n) = (n shift left (n AND 1)) - (n shift right 1) = A109043(n) - A004526(n). - Rudi B. Stranden, Jun 15 2021
From Rudi B. Stranden, Mar 21 2022: (Start)
a(n) = A064455(n+1) - 1, relating the number ON cells in row n of cellular automaton rule 54.
a(n) = 2*n - A071045(n).
(End)
E.g.f.: (1 + x)*sinh(x)/2 + 3*x*cosh(x)/2 = ((4*x+1)*e^x + (2*x-1)*e^(-x))/4. - Rénald Simonetto, Oct 20 2022
a(n) = n*(n mod 2) + ceiling(n/2) = A193356(n) + A008619(n+1). - Jonathan Shadrach Gilbert, Mar 12 2023
a(n) = 2*a(n-2) - a(n-4) for n > 3. - Chai Wah Wu, Apr 17 2024
EXAMPLE
a(3) = -3*(-1) - 2*1 - 1*(-1) - 0*1 + 1*(-1) + 2*1 + 3*(-1) + 4*1 + 5*(-1) + 6*1 = 5. - Bruno Berselli, Dec 14 2015
MAPLE
T:=proc(n) if n mod 2 = 0 then n/2 else (3*n+1)/2; fi; end; # N. J. A. Sloane, Jan 31 2011
A076936 := proc(n) option remember ; local apr, ifr, me, i, a ; if n <=2 then n^2 ; else apr := mul(A076936(i), i=1..n-1) ; ifr := ifactors(apr)[2] ; me := -1 ; for i from 1 to nops(ifr) do me := max(me, op(2, op(i, ifr))) ; od ; me := me+ n-(me mod n) ; a := 1 ; for i from 1 to nops(ifr) do a := a*op(1, op(i, ifr))^(me-op(2, op(i, ifr))) ; od ; if a = A076936(n-1) then me := me+n ; a := 1 ; for i from 1 to nops(ifr) do a := a*op(1, op(i, ifr))^(me-op(2, op(i, ifr))) ; od ; fi ; RETURN(a) ; fi ; end: A014682 := proc(n) log[2](A076936(n)) ; end: for n from 1 to 85 do printf("%d, ", A014682(n)) ; od ; # R. J. Mathar, Mar 20 2007
MATHEMATICA
Collatz[n_?OddQ] := (3n + 1)/2; Collatz[n_?EvenQ] := n/2; Table[Collatz[n], {n, 0, 79}] (* Alonso del Arte, Apr 21 2011 *)
LinearRecurrence[{0, 2, 0, -1}, {0, 2, 1, 5}, 70] (* Jean-François Alcover, Sep 23 2017 *)
Table[If[OddQ[n], (3 n + 1) / 2, n / 2], {n, 0, 60}] (* Vincenzo Librandi, Sep 28 2018 *)
PROG
(Haskell)
a014682 n = if r > 0 then div (3 * n + 1) 2 else n'
where (n', r) = divMod n 2
-- Reinhard Zumkeller, Oct 03 2014
(PARI) a(n)=if(n%2, 3*n+1, n)/2 \\ Charles R Greathouse IV, Sep 02 2015
(PARI) a(n)=if(n<2, 2*n, (n^2-n-1)%(2*n+1)) \\ Jim Singh, Sep 28 2018
(Python)
def a(n): return n//2 if n%2==0 else (3*n + 1)//2
print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 29 2017
(Magma) [IsOdd(n) select (3*n+1)/2 else n/2: n in [0..52]]; // Vincenzo Librandi, Sep 28 2018
KEYWORD
nonn,easy
EXTENSIONS
Edited by N. J. A. Sloane, Apr 26 2008, at the suggestion of Artur Jasinski
Edited by N. J. A. Sloane, Jan 31 2011
STATUS
approved
a(n) = the largest number m such that if m monominoes are removed from an n X n square then an L-tromino must remain.
+10
19
1, 2, 7, 9, 17, 20, 31, 35, 49, 54, 71, 77, 97, 104, 127, 135, 161, 170, 199, 209, 241, 252, 287, 299, 337, 350, 391, 405, 449, 464, 511, 527, 577, 594, 647, 665, 721, 740, 799, 819, 881, 902, 967, 989, 1057, 1080, 1151, 1175, 1249, 1274, 1351, 1377, 1457
OFFSET
2,2
FORMULA
a(n) = (n^2)/2 - 1 (n even), (n^2-n)/2 - 1 (n odd).
a(n) = A204557(n-1) / (n-1). - Reinhard Zumkeller, Jan 18 2012
From Bruno Berselli, Jan 18 2011: (Start)
G.f.: x^2*(1+x+3*x^2-x^4)/((1+x)^2*(1-x)^3).
a(n) = n*(2*n+(-1)^n-1)/4 - 1.
a(n) = A105638(-n+2). (End)
EXAMPLE
a(3)=2 because if a middle row of 3 monominoes are removed from the 3 X 3, no L remains.
MATHEMATICA
Table[FrobeniusNumber[{a, a + 1, a + 2}], {a, 2, 54}] (* Zak Seidov, Jan 08 2015 *)
CROSSREFS
Frobenius number for k successive numbers: A028387 (k=2), this sequence (k=3), A138984 (k=4), A138985 (k=5), A138986 (k=6), A138987 (k=7), A138988 (k=8).
KEYWORD
nonn,easy
AUTHOR
Mambetov Timur (timur_teufel(AT)mail.ru), Feb 13 2003
EXTENSIONS
Edited by Don Reble, May 28 2007
STATUS
approved
Sum of the partition parts of 3n into 3 parts.
+10
10
3, 18, 63, 144, 285, 486, 777, 1152, 1647, 2250, 3003, 3888, 4953, 6174, 7605, 9216, 11067, 13122, 15447, 18000, 20853, 23958, 27393, 31104, 35175, 39546, 44307, 49392, 54897, 60750, 67053, 73728, 80883, 88434, 96495, 104976, 113997, 123462, 133497, 144000
OFFSET
1,1
FORMULA
a(n) = 3*n^3 - 3*n*floor(n^2/4).
a(n) = 3n * A077043(n).
a(n) = a(n-1) + 3*A077043(n-1) + A001651(n) + A093353(3n-2).
From Colin Barker, Jan 18 2014: (Start)
a(n) = (3*n*(1-(-1)^n+6*n^2))/8.
G.f.: 3*x*(x^4+4*x^3+8*x^2+4*x+1) / ((x-1)^4*(x+1)^2). (End)
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 6. - Wesley Ivan Hurt, Nov 15 2015
E.g.f.: 3*x*((4 + 9*x + 3*x^2)*cosh(x) + 3*(1 + 3*x + x^2)*sinh(x))/4. - Stefano Spezia, Feb 09 2023
EXAMPLE
a(2) = 18; 3(2) = 6 has 3 partitions into 3 parts: (4, 1, 1), (3, 2, 1), and (2, 2, 2). The sum of the parts is 18.
Figure 1: The partitions of 3n into 3 parts for n = 1, 2, 3, ...
13 + 1 + 1
12 + 2 + 1
11 + 3 + 1
10 + 4 + 1
9 + 5 + 1
8 + 6 + 1
7 + 7 + 1
10 + 1 + 1 11 + 2 + 2
9 + 2 + 1 10 + 3 + 2
8 + 3 + 1 9 + 4 + 2
7 + 4 + 1 8 + 5 + 2
6 + 5 + 1 7 + 6 + 2
7 + 1 + 1 8 + 2 + 2 9 + 3 + 3
6 + 2 + 1 7 + 3 + 2 8 + 4 + 3
5 + 3 + 1 6 + 4 + 2 7 + 5 + 3
4 + 4 + 1 5 + 5 + 2 6 + 6 + 3
4 + 1 + 1 5 + 2 + 2 6 + 3 + 3 7 + 4 + 4
3 + 2 + 1 4 + 3 + 2 5 + 4 + 3 6 + 5 + 4
1 + 1 + 1 2 + 2 + 2 3 + 3 + 3 4 + 4 + 4 5 + 5 + 5
3(1) 3(2) 3(3) 3(4) 3(5) .. 3n
------------------------------------------------------------------------
3 18 63 144 285 .. a(n)
- Wesley Ivan Hurt, Sep 07 2019
MAPLE
A235988:=n->3*n^3 - 3*n*floor(n^2/4); seq(A235988(n), n=1..100);
MATHEMATICA
Table[3 n^3 - 3 n*Floor[n^2/4], {n, 100}] (* or *) CoefficientList[ Series[3*x*(x^4 + 4*x^3 + 8*x^2 + 4*x + 1)/((x - 1)^4*(x + 1)^2), {x, 0, 30}], x]
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {3, 18, 63, 144, 285, 486}, 40] (* Harvey P. Dale, May 17 2018 *)
PROG
(PARI) a(n)=3*n^3 - n^2\4*3*n \\ Charles R Greathouse IV, Oct 07 2015
(PARI) x='x+O('x^50); Vec(3*x*(x^4+4*x^3+8*x^2+4*x+1)/((x-1)^4*(x+1)^2)) \\ Altug Alkan, Nov 01 2015
(Magma) [3*n^3-3*n*Floor(n^2/4): n in [1..100]]; // Wesley Ivan Hurt, Nov 01 2015
(Magma) [3*n*(1-(-1)^n+6*n^2)/8: n in [1..40]]; // Vincenzo Librandi, Nov 18 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jan 17 2014
EXTENSIONS
a(165) in b-file corrected by Andrew Howroyd, Feb 21 2018
STATUS
approved
Number of distinct intersections among all circles that can be constructed on vertices of an n-sided regular polygon, using only a compass.
+10
10
0, 2, 6, 40, 55, 145, 238, 584, 612, 1350, 1804, 2401, 3523, 5180, 6150, 9312, 11101, 13645, 17746, 22300, 25998, 33462, 39514, 43993, 55225, 66976, 74088, 88956, 102109, 111841, 133672, 155808, 170940, 198798, 220150, 243937, 275983, 313728, 338208, 382480, 419143, 448561, 507658
OFFSET
1,2
COMMENTS
Sequence counts intersections among all distinct circles such that: A circle is defined by a pair of distinct points of a regular n-sided polygon. First point is the center of the circle, while the distance between the points defines the radius of the circle.
It seems one additional intersection exists at the center of the polygon if and only if n is a multiple of 6. From this and n symmetries of the n-sided regular polygon, it would follow that n divides either a(n) or a(n)-1, depending on whether n is a multiple of 6.
A093353(n-1) gives the number of unique circles whose intersections a(n) counts.
From Scott R. Shannon, Dec 15 2022 (Start)
The values for n which lead to all vertices, other than those defining the n-sided regular polygon, being simple start 2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, ... . These are all prime values except for the prime squares 4 and 25 which also appear. It is likely all primes appear although what other values lead to only simple vertices is unknown. (End)
LINKS
Scott R. Shannon, Image for n = 2.
Scott R. Shannon, Image for n = 3.
Scott R. Shannon, Image for n = 4.
Scott R. Shannon, Image for n = 5.
Scott R. Shannon, Image for n = 6.
Scott R. Shannon, Image for n = 7.
Scott R. Shannon, Image for n = 8.
Scott R. Shannon, Image for n = 9.
Scott R. Shannon, Image for n = 10.
Scott R. Shannon, Image for n = 11.
Scott R. Shannon, Image for n = 12.
Scott R. Shannon, Image for n = 18.
Scott R. Shannon, Image for n = 25.
N. J. A. Sloane, Illustration for A331702(4) = 40. Shows the planar graph. Annotated version of an illustration in the Math StackEchange link.
EXAMPLE
a(1)=0, we need at least two points to define a radius and a center.
a(2)=2, 2 circles constructed on segment endpoints intersect at 2 points.
a(3)=6, 3 circles on vertices of a triangle intersect at 6 distinct points.
a(4)=40, 8 circles can be constructed on vertices of a square and intersect at 40 distinct points.
a(5)=55, 10 circles can be constructed on vertices of a pentagon and intersect at 55 distinct points.
PROG
(GeoGebra)
n = Slider(2, 10, 1);
C = Unique(RemoveUndefined(Flatten(Sequence(Sequence(Circle(Point({cos((2v Pi) / n), sin((2v Pi) / n)}), 2sin((c Pi) / n)), c, 1, floor(n / 2)), v, 1, n))));
I = Unique(RemoveUndefined(Flatten(Sequence(Sequence(Intersect(Element(C, i), Element(C, j)), j, 1, Length(C)), i, 1, Length(C)))));
a_n = Length(I);
CROSSREFS
Cf. A093353, A359046 (regions), A359047 (edges), A359061 (k-gons), A358746.
KEYWORD
nonn
AUTHOR
Matej Veselovac, Jan 25 2020
EXTENSIONS
a(24)-a(30) from Giovanni Resta, Mar 27 2020
a(31)-a(43) from Scott R. Shannon, Dec 14 2022
STATUS
approved
Coins left after packing heart patterns (fixed orientation) into n X n coins.
+10
9
2, 4, 4, 9, 6, 13, 8, 17, 10, 21, 12, 25, 14, 29, 16, 33, 18, 37, 20, 41, 22, 45, 24, 49, 26, 53, 28, 57, 30, 61, 32, 65, 34, 69, 36, 73, 38, 77, 40, 81, 42, 85, 44, 89, 46, 93, 48, 97, 50, 101, 52, 105, 54, 109, 56, 113, 58, 117, 60, 121
OFFSET
2,1
COMMENTS
On the Japanese TV show "Tsuki no Koibito", a girl told her boyfriend that she saw a heart in 4 coins. Actually there are a total of 6 distinct patterns appearing in 2 X 2 coins in which each pattern consists of a part of the perimeter of each coin and forms a continuous area.
a(n) is the number of coins left after packing fixed orientation heart patterns (type 4c2s1: 4-curve cover 2 coins and symmetry) into n X n coins. The total number of hearts is A093005 and the number of voids left is A093353. See illustration in links.
FORMULA
From Colin Barker, Oct 30 2013: (Start)
a(n) = (-1 + (-1)^n - (-3 + (-1)^n)*n)/2 for n>3.
a(n) = n for n>3 and even.
a(n) = 2*n-1 for n > 3 and odd.
a(n) = 2*a(n-2) - a(n-4) for n>7.
G.f.: -x^2*(x^5-x^3-4*x-2) / ((x-1)^2*(x+1)^2).(End)
MATHEMATICA
With[{nn=60}, Join[{2, 4}, Riffle[Range[4, nn, 2], Range[9, 2nn+1, 4]]]] (* Harvey P. Dale, Feb 11 2015 *)
PROG
(Small Basic)
For n = 2 To 100
If Math.Remainder(n, 2) = 0 then
a = n
Else
a = a + n
If n = 3 then
a = a - 1
endif
EndIf
TextWindow.Write(a+", ")
EndFor
(PARI) Vec(-x^2*(x^5-x^3-4*x-2)/((x-1)^2*(x+1)^2) + O(x^100)) \\ Colin Barker, Oct 30 2013
CROSSREFS
Cf. A008795, A230370 (3-curves), A074148, A229093, A229154 (4-curves), A001399, A230267, A230276 (5-curves), A229593, A228949, A229598 (6-curves).
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Oct 19 2013
STATUS
approved
Product of all the parts in the partitions of n into exactly 2 parts.
+10
5
1, 1, 2, 12, 24, 360, 720, 20160, 40320, 1814400, 3628800, 239500800, 479001600, 43589145600, 87178291200, 10461394944000, 20922789888000, 3201186852864000, 6402373705728000, 1216451004088320000, 2432902008176640000, 562000363888803840000
OFFSET
1,3
FORMULA
a(n) = ( (n-1)! * floor(n/2)! )/( n-1-floor(n/2) )!.
a(n) = P(n-1, floor(n/2)) * floor(n/2)!, where P(n,k) are the k-permutations of n objects. - Wesley Ivan Hurt, Jun 07 2013
a(2n) = A002674(n); a(2n+1) = A010050(n). - Wesley Ivan Hurt, Oct 16 2014
a(n) = Product_{i=1..floor(n/2)} i * (n-i). - Wesley Ivan Hurt, Nov 14 2017
From Amiram Eldar, Mar 10 2022: (Start)
Sum_{n>=1} 1/a(n) = 3*cosh(1) - 2.
Sum_{n>=1} (-1)^(n+1)/a(n) = 2 - cosh(1). (End)
EXAMPLE
Define a(1):=1; a(2) = 1 since 2 = 1+1 and (1)*(1) = 1; a(3) = 2 since 3 = 2+1 and (2)*(1) = 2; a(4) = 12 since 4 = 3+1 = 2+2 and (3)*(1)*(2)*(2) = 12; a(5) = 24 since 5 = 4+1 = 3+2 and (4)*(1)*(3)*(2) = 24.
MAPLE
A211374:=n->( (n-1)! * floor(n/2)! )/( (n-1) - floor(n/2) )!: seq(A211374(k), k=1..25);
with(combinat, numbperm): seq(numbperm(k-1, floor(k/2))*floor(k/2)!, k = 1..25); # Wesley Ivan Hurt, Jun 07 2013
MATHEMATICA
Table[Times @@ Flatten[Select[Partitions[n], Length[#] == 2 &]], {n, 25}] (* T. D. Noe, Feb 11 2013 *)
Table[((n - 1)!*Floor[n/2]!)/(n - 1 - Floor[n/2])!, {n, 25}] (* Wesley Ivan Hurt, Oct 16 2014 *)
PROG
(Magma) [(Factorial(n-1) * Factorial(Floor(n/2)))/Factorial(n-1-Floor(n/2)) : n in [1..25]]; // Wesley Ivan Hurt, Oct 16 2014
(PARI) a(n) = prod(i=1, n\2, i*(n-i)); \\ Michel Marcus, Nov 14 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 06 2013
STATUS
approved
a(n) = n*floor(n/3).
+10
5
0, 0, 0, 3, 4, 5, 12, 14, 16, 27, 30, 33, 48, 52, 56, 75, 80, 85, 108, 114, 120, 147, 154, 161, 192, 200, 208, 243, 252, 261, 300, 310, 320, 363, 374, 385, 432, 444, 456, 507, 520, 533, 588, 602, 616, 675, 690, 705, 768, 784, 800, 867, 884, 901, 972, 990
OFFSET
0,4
COMMENTS
For n = 0, 1, 2, 4, 8, 49, 98, 676, 1352, 9409, 18818, 131044, 262088, 1825201, 3650402, ... a(n) is a square.
FORMULA
G.f.: x^3*(3 + x + x^2 + x^3)/((1 - x)^3*(1 + x + x^2)^2).
a(3m) = A033428(m), a(3m+1) = A049451(m), a(3m+2) = A045944(m).
Sum_{n>=3} (-1)^(n+1)/a(n) = 9/4 + Pi^2/36 - Pi/(2*sqrt(3)) - 2*log(2). - Amiram Eldar, Mar 30 2023
MATHEMATICA
Table[n Floor[n/3], {n, 0, 60}]
PROG
(Magma) [n*Floor(n/3): n in [0..60]];
(Sage) [n*floor(n/3) for n in (0..60)];
(PARI) a(n)=n\3*n \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
Cf. A000290 (n^2), A010762 (floor(n/2)*floor(n/3)), A093353 (n*floor(n/2)), A213033 (n*floor(n/2)*floor(n/3)), A233035 (n*floor(n/4)).
Cf. A002264 (floor(n/3)).
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jul 01 2014
STATUS
approved
Triangle read by rows: A128621 * A000012 as infinite lower triangular matrices.
+10
3
1, 2, 2, 6, 3, 3, 8, 8, 4, 4, 15, 10, 10, 5, 5, 18, 18, 12, 12, 6, 6, 28, 21, 21, 14, 14, 7, 7, 32, 32, 24, 24, 16, 16, 8, 8, 45, 36, 36, 27, 27, 18, 18, 9, 9, 50, 50, 40, 40, 30, 30, 20, 20, 10, 10, 66, 55, 55, 44, 44, 33, 33, 22, 22, 11, 11, 72, 72, 60, 60, 48, 48, 36, 36, 24, 24, 12, 12, 91, 78, 78, 65, 65, 52, 52, 39, 39, 26, 26, 13, 13
OFFSET
1,2
FORMULA
Sum_{k=1..n} T(n, k) = A128624(n) (row sums).
T(n,k) = n*(1+floor((n-k)/2)), 1 <= k <= n. - R. J. Mathar, Jun 27 2012
From G. C. Greubel, Mar 13 2024: (Start)
T(n, k) = n*A115514(n, k).
T(n, k) = Sum_{j=k..n} A128621(n, j).
T(n, 1) = A093005(n).
T(n, 2) = A093353(n-1), n >= 2.
T(n, n) = A000027(n).
T(2*n-1, n) = A245524(n).
Sum_{k=1..n} (-1)^k*T(n, k) = (1/2)*(1-(-1)^n)*A000384(floor((n+1)/2)). (End)
EXAMPLE
First few rows of the triangle are:
1;
2, 2;
6, 3, 3;
8, 8, 4, 4;
15, 10, 10, 5, 5;
18, 18, 12, 12, 6, 6;
28, 21, 21, 14, 14, 7, 7;
...
MATHEMATICA
Table[n*Floor[(n-k+2)/2], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Mar 13 2024 *)
PROG
(Magma) [n*Floor((n-k+2)/2): k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 13 2024
(SageMath) flatten([[n*((n-k+2)//2) for k in range(1, n+1)] for n in range(1, 16)]) # G. C. Greubel, Mar 13 2024
CROSSREFS
Cf. A128624 (row sums).
KEYWORD
nonn,easy,tabl
AUTHOR
Gary W. Adamson, Mar 14 2007
EXTENSIONS
a(41) = 27 inserted and more terms from Georg Fischer, Jun 05 2023
STATUS
approved
Partial sums of A042964 (numbers congruent to 2 or 3 mod 4).
+10
3
2, 5, 11, 18, 28, 39, 53, 68, 86, 105, 127, 150, 176, 203, 233, 264, 298, 333, 371, 410, 452, 495, 541, 588, 638, 689, 743, 798, 856, 915, 977, 1040, 1106, 1173, 1243, 1314, 1388, 1463, 1541, 1620, 1702, 1785, 1871, 1958, 2048, 2139, 2233, 2328, 2426, 2525
OFFSET
1,1
COMMENTS
If we insert an initial 0, and alternate the signs: 0,2,-5,11,-18,28,..., we get a sequence where the average of the first n terms is an integer, with no repeats: specifically A001057(n-1). The sum of the first n terms is (-1)^(n-1)*A093353(n-1). - Franklin T. Adams-Watters, May 20 2010
Suppose that n cards have the numbers 1..2n written on them randomly, one number to a side, and are set out on a table randomly. You have the task of maximizing the sum of the visible numbers by flipping cards. If you have no information other than the numbers on the upper faces, and may not flip any particular card more than once, a(n) is the largest sum you can guarantee in the worst case. - Andrew Woods, Jun 06 2013
FORMULA
a(n) = Sum_{i=1..n} A042964(i).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - R. H. Hardin, Nov 13 2011
a(n) = ceiling((2*n+1)*n/2). - Andrew Woods, Jun 06 2013
G.f.: x*(2+x+x^2) / ((1-x)^3*(x+1)). - Colin Barker, Jun 04 2014
a(n) = round(n/(1-exp(-1/n))). - Richard R. Forberg, Jan 28 2015
MATHEMATICA
a[n_]:=Ceiling[((2n+1)n/2)]; Array[a, 60] (* Vincenzo Librandi, Jul 02 2019 *)
LinearRecurrence[{2, 0, -2, 1}, {2, 5, 11, 18}, 60] (* G. C. Greubel, Jul 02 2019 *)
PROG
(PARI) Vec(x*(x^2+x+2)/((1-x)^3*(x+1)) + O(x^60)) \\ Colin Barker, Jun 04 2014
(Magma) [Ceiling((2*n+1)*n/2): n in [1..60]]; // Vincenzo Librandi, Jul 02 2019
(Sage) [ceiling(n*(1+2*n)/2) for n in (1..60)] # G. C. Greubel, Jul 02 2019
(GAP) a:=[2, 5, 11, 18];; for n in [5..60] do a[n]:=2*a[n-1]-2*a[n-3] + a[n-4]; od; a; # G. C. Greubel, Jul 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jaroslav Krizek, Dec 18 2009
STATUS
approved
Total number of ON (black) cells after n iterations of the "Rule 54" elementary cellular automaton starting with a single ON (black) cell.
+10
3
1, 4, 6, 12, 15, 24, 28, 40, 45, 60, 66, 84, 91, 112, 120, 144, 153, 180, 190, 220, 231, 264, 276, 312, 325, 364, 378, 420, 435, 480, 496, 544, 561, 612, 630, 684, 703, 760, 780, 840, 861, 924, 946, 1012, 1035, 1104, 1128, 1200, 1225, 1300, 1326, 1404, 1431
OFFSET
0,2
COMMENTS
Take the first 2n positive integers and choose n of them such that their sum: a) is divisible by n, and b) is minimal. It seems their sum equals a(n). - Ivan N. Ianakiev, Feb 16 2019
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
LINKS
FORMULA
Conjectures from Colin Barker, Dec 08 2015 and Apr 20 2019: (Start)
a(n) = (n+1)*(2*n -(-1)^n +5)/4.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
G.f.: (1+3*x) / ((1-x)^3*(1+x)^2).
(End)
a(n) = n + 1 + (n+1) * floor((n+1)/2), conjectured. - Wesley Ivan Hurt, Dec 25 2016
a(n) = A093353(n) + n + 1, conjectured. - Matej Veselovac, Jan 21 2020
EXAMPLE
From Michael De Vlieger, Dec 14 2015: (Start)
First 12 rows, replacing "0" with "." for better visibility of ON cells, followed by the total number of 1's per row, and the running total up to that row:
1 = 1 -> 1
1 1 1 = 3 -> 4
1 . . . 1 = 2 -> 6
1 1 1 . 1 1 1 = 6 -> 12
1 . . . 1 . . . 1 = 3 -> 15
1 1 1 . 1 1 1 . 1 1 1 = 9 -> 24
1 . . . 1 . . . 1 . . . 1 = 4 -> 28
1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 = 12 -> 40
1 . . . 1 . . . 1 . . . 1 . . . 1 = 5 -> 45
1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 = 15 -> 60
1 . . . 1 . . . 1 . . . 1 . . . 1 . . . 1 = 6 -> 66
1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 = 18 -> 84
1 . . . 1 . . . 1 . . . 1 . . . 1 . . . 1 . . . 1 = 7 -> 91
(End)
MAPLE
A265225:=n->1/4*(n+1)*(2*n-(-1)^n+5): seq(A265225(n), n=0..60); # Wesley Ivan Hurt, Dec 25 2016
MATHEMATICA
rule = 54; rows = 30; Table[Total[Take[Table[Total[Table[Take[CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}][[k]], {rows-k+1, rows+k-1}], {k, 1, rows}][[k]]], {k, 1, rows}], k]], {k, 1, rows}]
Accumulate[Total /@ CellularAutomaton[54, {{1}, 0}, 52]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Price, Dec 05 2015
STATUS
approved

Search completed in 0.015 seconds