login
Search: a010673 -id:a010673
     Sort: relevance | references | number | modified | created      Format: long | short | data
Odd numbers repeated.
+10
86
1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 63, 63, 65, 65, 67, 67, 69, 69, 71, 71, 73
OFFSET
0,3
COMMENTS
The number of rounds in a round-robin tournament with n competitors. - A. Timothy Royappa, Aug 13 2011
Diagonal sums of number triangle A113126. - Paul Barry, Oct 14 2005
When partitioning a convex n-gon by all the diagonals, the maximum number of sides in resulting polygons is 2*floor(n/2)+1 = a(n-1) (from Moscow Olympiad problem 1950). - Tanya Khovanova, Apr 06 2008
The inverse values of the coefficients in the series expansion of f(x) = (1/2)*(1+x)*log((1+x)/(1-x)) lead to this sequence; cf. A098557. - Johannes W. Meijer, Nov 12 2009
From Reinhard Zumkeller, Dec 05 2009: (Start)
First differences: A010673; partial sums: A000982;
A059329(n) = Sum_{k = 0..n} a(k)*a(n-k);
A167875(n) = Sum_{k = 0..n} a(k)*A005408(n-k);
A171218(n) = Sum_{k = 0..n} a(k)*A005843(n-k);
A008794(n+2) = Sum_{k = 0..n} a(k)*A059841(n-k). (End)
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(5). - Michael Somos, May 29 2013
For n > 4: a(n) = A230584(n) - A230584(n-2). - Reinhard Zumkeller, Feb 10 2015
The arithmetic function v+-(n,2) as defined in A290988. - Robert Price, Aug 22 2017
For n > 0, also the chromatic number of the (n+1)-triangular (Johnson) graph. - Eric W. Weisstein, Nov 17 2017
a(n-1), for n >= 1, is also the upper bound a_{up}(b), where b = 2*n + 1, in the first (top) row of the complete coach system Sigma(b) of Hilton and Pedersen [H-P]. All odd numbers <= a_{up}(b) of the smallest positive restricted residue system of b appear once in the first rows of the c(2*n+1) = A135303(n) coaches. If b is an odd prime a_{up}(b) is the maximum. See a comment in the proof of the quasi-order theorem of H-P, on page 263 ["Furthermore, every possible a_i < b/2 ..."]. For an example see below. - Wolfdieter Lang, Feb 19 2020
Satisfies the nested recurrence a(n) = a(a(n-2)) + 2*a(n-a(n-1)) with a(0) = a(1) = 1. Cf. A004001. - Peter Bala, Aug 30 2022
The binomial transform is 1, 2, 6, 16, 40, 96, 224, 512, 1152, 2560,.. (see A057711). - R. J. Mathar, Feb 25 2023
REFERENCES
Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, 3rd printing 2012, pp. (260-281).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Chromatic Number
Eric Weisstein's World of Mathematics, Johnson Graph
Eric Weisstein's World of Mathematics, Triangular Graph
FORMULA
a(n) = 2*floor(n/2) + 1.
a(n) = A052928(n) + 1 = 2*A004526(n) + 1.
a(n) = A028242(n) + A110654(n).
a(n) = A052938(n-2) + A084964(n-2) for n > 1. - Reinhard Zumkeller, Aug 27 2005
G.f.: (1 + x + x^2 + x^3)/(1 - x^2)^2. - Paul Barry, Oct 14 2005
a(n) = 2*a(n-2) - a(n-4), a(0) = 1, a(1) = 1, a(2) = 3, a(3) = 3. - Philippe Deléham, Nov 03 2008
a(n) = A001477(n) + A059841(n). - Philippe Deléham, Mar 31 2009
a(n) = 2*n - a(n-1), with a(0) = 1. - Vincenzo Librandi, Nov 13 2010
a(n) = R(n, -2), where R(n, x) is the n-th row polynomial of A211955. a(n) = (-1)^n + 2*Sum_{k = 1..n} (-1)^(n - k - 2)*4^(k-1)*binomial(n+k, 2*k). Cf. A084159. - Peter Bala, May 01 2012
a(n) = A182579(n+1, n). - Reinhard Zumkeller, May 06 2012
G.f.: ( 1 + x^2 ) / ( (1 + x)*(x - 1)^2 ). - R. J. Mathar, Jul 12 2016
E.g.f.: x*exp(x) + cosh(x). - Ilya Gutkovskiy, Jul 12 2016
From Guenther Schrack, Sep 10 2018: (Start)
a(-n) = -a(n-1).
a(n) = A047270(n+1) - (2*n + 2).
a(n) = A005408(A004526(n)). (End)
a(n) = A000217(n) / A004526(n+1), n > 0. - Torlach Rush, Nov 10 2023
EXAMPLE
G.f. = 1 + x + 3*x^2 + 3*x^3 + 5*x^4 + 5*x^5 + 7*x^6 + 7*x^7 + 9*x^8 + 9*x^9 + ...
Complete coach system for (a composite) b = 2*n + 1 = 33: Sigma(33) ={[1; 5], [5, 7, 13; 2, 1, 2]} (the first two rows are here 1 and 5, 7, 13), a_{up}(33) = a(15) = 15. But 15 is not in the reduced residue system modulo 33, so the maximal (odd) a number is 13. For the prime b = 31, a_{up}(31) = a(14) = 15 appears as maximum of the first rows. - Wolfdieter Lang, Feb 19 2020
MAPLE
A109613:=n->2*floor(n/2)+1; seq(A109613(k), k=0..100); # Wesley Ivan Hurt, Oct 22 2013
MATHEMATICA
Flatten@ Array[{2# - 1, 2# - 1} &, 37] (* Robert G. Wilson v, Jul 07 2012 *)
(# - Boole[EvenQ[#]] &) /@ Range[80] (* Alonso del Arte, Sep 11 2019 *)
With[{c=2*Range[0, 40]+1}, Riffle[c, c]] (* Harvey P. Dale, Jan 02 2020 *)
PROG
(Haskell)
a109613 = (+ 1) . (* 2) . (`div` 2)
a109613_list = 1 : 1 : map (+ 2) a109613_list
-- Reinhard Zumkeller, Oct 27 2012, Feb 21 2011
(PARI) A109613(n)=n>>1<<1+1 \\ Charles R Greathouse IV, Feb 24 2011
(Sage) def a(n) : return( len( CuspForms( Gamma0( 5), 2*n + 4, prec=1). basis())); # Michael Somos, May 29 2013
(Scala) ((1 to 49) by 2) flatMap { List.fill(2)(_) } // Alonso del Arte, Sep 11 2019
CROSSREFS
Complement of A052928 with respect to the universe A004526. - Guenther Schrack, Aug 21 2018
First differences of A000982, A061925, A074148, A105343, A116940, and A179207. - Guenther Schrack, Aug 21 2018
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Aug 01 2005
STATUS
approved
The even numbers repeated.
+10
65
0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 46, 48, 48, 50, 50, 52, 52, 54, 54, 56, 56, 58, 58, 60, 60, 62, 62, 64, 64, 66, 66, 68, 68, 70, 70, 72, 72
OFFSET
0,3
COMMENTS
a(n) is also the binary rank of the complete graph K(n). - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 07 2009
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n >= 6, a(n) is the number of (0,1) n X n matrices A <= P^(-1)+I+P having exactly two 1's in every row and column with perA=2. - Vladimir Shevelev, Apr 12 2010
a(n+2) is the number of symmetry allowed, linearly independent terms at n-th order in the series expansion of the (E+A)xe vibronic perturbation matrix, H(Q) (cf. Eisfeld & Viel). - Bradley Klee, Jul 21 2015
The arithmetic function v_2(n,1) as defined in A289187. - Robert Price, Aug 22 2017
For n > 1, also the chromatic number of the n X n white bishop graph. - Eric W. Weisstein, Nov 17 2017
For n > 2, also the maximum vertex degree of the n-polygon diagonal intersection graph. - Eric W. Weisstein, Mar 23 2018
For n >= 2, a(n+2) gives the minimum weight of a Boolean function of algebraic degree at most n-2 whose support contains n linearly independent elements. - Christof Beierle, Nov 25 2019
REFERENCES
C. D. Godsil and G. Royle, Algebraic Graph Theory, Springer, 2001, page 181. - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 07 2009
V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3(1992),15-19.
LINKS
C. Beierle, A. Biryukov and A. Udovenko, On degree-d zero-sum sets of full rank, Cryptography and Communications, November 2019.
W. Eisfeld and A. Viel, Higher order (A+E)xe pseudo-Jahn-Teller coupling, J. Chem. Phys., 122, 204317 (2005).
J. Sondow and E. W. Weisstein, MathWorld: Wallis Formula
Eric Weisstein's World of Mathematics, Chromatic Number
Eric Weisstein's World of Mathematics, Legendre-Gauss Quadrature
Eric Weisstein's World of Mathematics, Maximum Vertex Degree
Eric Weisstein's World of Mathematics, Polygon Diagonal Intersection Graph
Eric Weisstein's World of Mathematics, Random Matrix
Eric Weisstein's World of Mathematics, White Bishop Graph
FORMULA
a(n) = 2*floor(n/2).
G.f.: 2*x^2/((-1+x)^2*(1+x)).
a(n) + a(n+1) + 2 - 2*n = 0.
a(n) = n - 1/2 + (-1)^n/2.
a(n) = n + Sum_{k=1..n} (-1)^k. - William A. Tedeschi, Mar 20 2008
a(n) = a(n-1) + a(n-2) - a(n-3). - R. J. Mathar, Feb 19 2010
a(n) = |A123684(n) - A064455(n)| = A032766(n) - A008619(n-1). - Jaroslav Krizek, Mar 22 2011
For n > 0, a(n) = floor(sqrt(n^2+(-1)^n)). - Francesco Daddi, Aug 02 2011
a(n) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=0 and b(k)=2^k for k>0. - Philippe Deléham, Oct 19 2011
a(n) = A109613(n) - 1. - M. F. Hasler, Oct 22 2012
a(n) = n - (n mod 2). - Wesley Ivan Hurt, Jun 29 2013
a(n) = a(a(n-1)) + a(n-a(n-1)) for n>2. - Nathan Fox, Jul 24 2016
a(n) = 2*A004526(n). - Filip Zaludek, Oct 28 2016
E.g.f.: x*exp(x) - sinh(x). - Ilya Gutkovskiy, Oct 28 2016
a(-n) = -a(n+1); a(n) = A005843(A004526(n)). - Guenther Schrack, Sep 11 2018
From Guenther Schrack, May 29 2019: (Start)
a(b(n)) = b(n) + ((-1)^b(n) - 1)/2 for any sequence b(n) of offset 0.
a(a(n)) = a(n), idempotent.
a(A086970(n)) = A124356(n-1) for n > 1.
a(A000124(n)) = A192447(n+1).
a(n)*a(n+1)/2 = A007590(n), also equals partial sums of a(n).
A007590(a(n)) = 2*A008794(n). (End)
MAPLE
spec := [S, {S=Union(Sequence(Prod(Z, Z)), Prod(Sequence(Z), Sequence(Z)))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
Flatten[Table[{2n, 2n}, {n, 0, 39}]] (* Alonso del Arte, Jun 24 2012 *)
With[{ev=2Range[0, 40]}, Riffle[ev, ev]] (* Harvey P. Dale, May 08 2021 *)
PROG
(PARI) a(n)=n\2*2 \\ Charles R Greathouse IV, Nov 20 2011
(Magma) [2*Floor(n/2) : n in [0..50]]; // Wesley Ivan Hurt, Sep 13 2014
(Haskell)
a052928 = (* 2) . flip div 2
a052928_list = 0 : 0 : map (+ 2) a052928_list
-- Reinhard Zumkeller, Jun 20 2015
CROSSREFS
First differences: A010673; partial sums: A007590; partial sums of partial sums: A212964(n+1).
Complement of A109613 with respect to universe A004526. - Guenther Schrack, Dec 07 2017
Is first differences of A099392. Fixed point sequence: A005843. - Guenther Schrack, May 30 2019
For n >= 3, A329822(n) gives the minimum weight of a Boolean function of algebraic degree at most n-3 whose support contains n linearly independent elements. - Christof Beierle, Nov 25 2019
KEYWORD
nonn,easy
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
Removed duplicate of recurrence; corrected original recurrence and g.f. against offset - R. J. Mathar, Feb 19 2010
STATUS
approved
Multiples of 2 and of 3 interleaved: a(2n-1) = 2n, a(2n) = 3n.
+10
13
2, 3, 4, 6, 6, 9, 8, 12, 10, 15, 12, 18, 14, 21, 16, 24, 18, 27, 20, 30, 22, 33, 24, 36, 26, 39, 28, 42, 30, 45, 32, 48, 34, 51, 36, 54, 38, 57, 40, 60, 42, 63, 44, 66, 46, 69, 48, 72, 50, 75, 52, 78, 54, 81, 56, 84, 58, 87, 60, 90, 62, 93, 64, 96, 66, 99, 68, 102
OFFSET
1,1
COMMENTS
First differences of A195014.
LINKS
D. H. Bailey, J. M. Borwein, and J. S. Kimberley, Discovery of large Poisson polynomials using a new arbitrary precision software package, Slides, 2015.
D. H. Bailey, J. M. Borwein, and J. S. Kimberley, Computer discovery and analysis of large Poisson polynomials, 2016.
FORMULA
Pair(2*n, 3*n).
From Bruno Berselli, Sep 26 2011: (Start)
G.f.: x*(2+3*x)/(1-x^2)^2.
a(n) = (5*n+(n-2)*(-1)^n+2)/4.
a(n) = 2*a(n-2) - a(n-4) = a(n-2) + A010693(n-1).
a(n)+a(-n) = A010673(n).
a(n)-a(-n) = A106832(n). (End)
MATHEMATICA
With[{r = Range[50]}, Riffle[2*r, 3*r]] (* or *)
LinearRecurrence[{0, 2, 0, -1}, {2, 3, 4, 6}, 100] (* Paolo Xausa, Feb 09 2024 *)
PROG
(Magma) &cat[[2*n, 3*n]: n in [1..34]]; // Bruno Berselli, Sep 25 2011
(Haskell)
import Data.List (transpose)
a195013 n = a195013_list !! (n-1)
a195013_list = concat $ transpose [[2, 4 ..], [3, 6 ..]]
-- Reinhard Zumkeller, Apr 06 2015
(PARI) a(n)=(5*n+(n-2)*(-1)^n+2)/4 \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
Cf. A111712 (partial sums of this sequence prepended with 1).
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 09 2011
STATUS
approved
Triangle read by rows: T(n, k) = (2^(n-k) + 2^k)*binomial(n,k), 0 <= k <= n.
+10
7
2, 3, 3, 5, 8, 5, 9, 18, 18, 9, 17, 40, 48, 40, 17, 33, 90, 120, 120, 90, 33, 65, 204, 300, 320, 300, 204, 65, 129, 462, 756, 840, 840, 756, 462, 129, 257, 1040, 1904, 2240, 2240, 2240, 1904, 1040, 257, 513, 2322, 4752, 6048, 6048, 6048, 6048, 4752, 2322, 513
OFFSET
0,1
COMMENTS
From G. C. Greubel, Jan 18 2025: (Start)
A more general triangle of coefficients may be defined by T(n, k, p, q) = (p^(n-k)*q^k + p^k*q^(n-k))*A007318(n, k). When (p, q) = (2, 1) this sequence is obtained.
Some related triangles are:
(p, q) = (1, 1) : 2*A007318(n,k).
(p, q) = (2, 2) : 2*A038208(n,k).
(p, q) = (3, 2) : A154692(n,k).
(p, q) = (3, 3) : 2*A038221(n,k). (End)
LINKS
A. Lakhtakia, R. Messier, V. K. Varadan, and V. V. Varadan, Use of combinatorial algebra for diffusion on fractals, Physical Review A, volume 34, Number 3 (1986) p. 2502, Fig. 3.
FORMULA
T(n, k) = (2^(n-k) + 2^k)*A007318(n, k).
Sum_{k=0..n} T(n, k) = A008776(n) = A025192(n+1).
From G. C. Greubel, Jan 18 2025: (Start)
T(n, n-k) = T(n, k) (symmetry).
T(n, 1) = n + A215149(n), n >= 1.
T(2*n-1, n) = 3*A069720(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A010673(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A000129(n+1) + A001045(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = n+1 + A107920(n+1). (End)
EXAMPLE
Triangle begins as:
2;
3, 3;
5, 8, 5;
9, 18, 18, 9;
17, 40, 48, 40, 17;
33, 90, 120, 120, 90, 33;
65, 204, 300, 320, 300, 204, 65;
129, 462, 756, 840, 840, 756, 462, 129;
257, 1040, 1904, 2240, 2240, 2240, 1904, 1040, 257;
513, 2322, 4752, 6048, 6048, 6048, 6048, 4752, 2322, 513;
1025, 5140, 11700, 16320, 16800, 16128, 16800, 16320, 11700, 5140, 1025;
MAPLE
A154690 := proc(n, m) binomial(n, m)*(2^(n-m)+2^m) ; end proc: # R. J. Mathar, Jan 13 2011
MATHEMATICA
T[n_, m_]:= (2^(n-m) + 2^m)*Binomial[n, m];
Table[T[n, m], {n, 0, 12}, {m, 0, n}]//Flatten
PROG
(Magma)
A154690:= func< n, k | (2^(n-k)+2^k)*Binomial(n, k) >;
[A154690(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 18 2025
(Python)
from sage.all import *
def A154690(n, k): return (pow(2, n-k)+pow(2, k))*binomial(n, k)
print(flatten([[A154690(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 18 2025
CROSSREFS
Cf. A215149.
Sums include: A008776 (row), A010673 (alternating sign row).
Columns k: A000051 (k=0).
Main diagonal: A059304.
KEYWORD
nonn,tabl,easy
AUTHOR
STATUS
approved
Triangle read by rows: T(n, k) = (2^(n-k)*3^k + 2^k*3^(n-k))*binomial(n, k).
+10
7
2, 5, 5, 13, 24, 13, 35, 90, 90, 35, 97, 312, 432, 312, 97, 275, 1050, 1800, 1800, 1050, 275, 793, 3492, 7020, 8640, 7020, 3492, 793, 2315, 11550, 26460, 37800, 37800, 26460, 11550, 2315, 6817, 38064, 97776, 157248, 181440, 157248, 97776, 38064, 6817
OFFSET
0,1
LINKS
A. Lakhtakia, R. Messier, V. K. Varadan, and V. V. Varadan, Use of combinatorial algebra for diffusion on fractals, Physical Review A, volume 34, Number 3 (1986) p. 2502, Fig. 3.
FORMULA
Sum_{k=0..n} T(n, k) = A020729(n) = A020699(n+1).
T(n,m) = A013620(n,m) + A013620(m,n). - R. J. Mathar, Oct 24 2011
From G. C. Greubel, Jan 18 2025: (Start)
T(2*n, n) = A119309(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A010673(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A015518(n+1) + A007482(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A088137(n+1) + A000225(n+1). (End)
EXAMPLE
Triangle begins
2;
5, 5;
13, 24, 13;
35, 90, 90, 35;
97, 312, 432, 312, 97;
275, 1050, 1800, 1800, 1050, 275;
793, 3492, 7020, 8640, 7020, 3492, 793;
2315, 11550, 26460, 37800, 37800, 26460, 11550, 2315;
6817, 38064, 97776, 157248, 181440, 157248, 97776, 38064, 6817;
MAPLE
A154692 := proc(n, m)
(2^(n-m)*3^m+2^m*3^(n-m))*binomial(n, m) ;
end proc:
seq(seq(A154692(n, m), m=0..n), n=0..10) ; # R. J. Mathar, Oct 24 2011
MATHEMATICA
p=2; q=3;
T[n_, m_]= (p^(n-m)*q^m + p^m*q^(n-m))*Binomial[n, m];
Table[T[n, m], {n, 0, 10}, {m, 0, n}]//Flatten
PROG
(Magma)
A154692:= func< n, k | (2^(n-k)*3^k + 2^k*3^(n-k))*Binomial(n, k) >;
[A154692(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 18 2025
(Python)
from sage.all import *
def A154692(n, k): return (pow(2, n-k)*pow(3, k)+pow(2, k)*pow(3, n-k))*binomial(n, k)
print(flatten([[A154692(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 18 2025
CROSSREFS
Sums include: A010673 (alternating sign row), A020699 (row), A020729 (row).
Related sequences: A007318, A154690,
KEYWORD
nonn,tabl,easy
AUTHOR
STATUS
approved
Sum over the divisors d = 2 and/or 3 of n.
+10
6
0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3, 2, 0, 5, 0, 2, 3
OFFSET
1,2
COMMENTS
Periodic with period {0,2,3,2,0,5}.
FORMULA
a(n) = Sum_{d|n, d=2 or d=3} d.
a(n+6) = a(n).
a(n) = -a(n-1) + a(n-3) + a(n-4).
G.f.: -x*(2+5*x+5*x^2) / ( (x-1)*(1+x)*(1+x+x^2) ).
a(n) = A010673(n) + A021337(n). - R. J. Mathar, May 28 2010
a(n) = A000203(n) - A171405(n). - Amiram Eldar, Aug 03 2024
MATHEMATICA
Table[Total@ Select[Divisors@ n, 2 <= # <= 3 &], {n, 120}] (* or *)
Table[Total[Divisors@ n /. {d_ /; d < 2 -> Nothing, d_ /; d > 3 -> Nothing} ], {n, 120}] (* Michael De Vlieger, Feb 07 2016 *)
Flatten[Table[{0, 2, 3, 2, 0, 5}, {16}]] (* Amiram Eldar, Aug 03 2024 *)
PROG
(PARI) a(n) = sumdiv(n, d, d*((d==2) || (d==3))); \\ Michel Marcus, Feb 07 2016
(PARI) a(n) = [0, 2, 3, 2, 0, 5][(n-1) % 6 + 1]; \\ Amiram Eldar, Aug 03 2024
KEYWORD
nonn,easy,less
AUTHOR
Vladimir Shevelev, May 21 2010
EXTENSIONS
Replaced recurrence by a shorter one; added keyword:less - R. J. Mathar, May 28 2010
STATUS
approved
Even bisection of A263273; terms of A263262 doubled.
+10
5
0, 2, 4, 6, 8, 10, 12, 22, 16, 18, 20, 14, 24, 26, 28, 30, 64, 46, 36, 58, 40, 66, 76, 34, 48, 70, 52, 54, 56, 38, 60, 74, 32, 42, 68, 50, 72, 62, 44, 78, 80, 82, 84, 190, 136, 90, 172, 118, 192, 226, 100, 138, 208, 154, 108, 166, 112, 174, 220, 94, 120, 202, 148, 198, 184, 130
OFFSET
0,2
FORMULA
a(n) = 2 * A263272(n).
a(n) = A263273(2*n).
Other identities. For all n >= 0:
A010873(a(n)) = 2 * A000035(n) = A010673(n).
PROG
(Scheme) (define (A264984 n) (A263273 (+ n n)))
(Python)
from sympy import factorint
from sympy.ntheory.factor_ import digits
from operator import mul
def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
def a038502(n):
f=factorint(n)
return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
def a038500(n): return n/a038502(n)
def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
def a(n): return a263273(2*n) # Indranil Ghosh, May 22 2017
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 05 2015
STATUS
approved
Square array read by antidiagonals upwards in which each new term is the least nonnegative integer distinct from its neighbors.
+10
5
0, 1, 2, 0, 3, 0, 1, 2, 1, 2, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
OFFSET
0,3
COMMENTS
In the square array we have that:
Antidiagonal sums give A168237.
Odd-indexed rows give A010673.
Even-indexed rows give A010684.
Odd-indexed columns give A000035.
Even-indexed columns give A010693.
Odd-indexed antidiagonals give the initial terms of A010674.
Even-indexed antidiagonals give the initial terms of A000034.
Main diagonal gives A010674.
This is also a triangle read by rows in which each new term is the least nonnegative integer distinct from its neighbors.
In the triangle we have that:
Row sums give A168237.
Odd-indexed columns give A000035.
Even-indexed columns give A010693.
Odd-indexed diagonals give A010673.
Even-indexed diagonals give A010684.
Odd-indexed rows give the initial terms of A010674.
Even-indexed rows give the initial terms of A000034.
Odd-indexed antidiagonals give the initial terms of A010673.
Even-indexed antidiagonals give the initial terms of A010684.
FORMULA
a(n) = A274913(n) - 1.
From Robert Israel, Nov 14 2016: (Start)
G.f.: 3*x/(1-x^2) - Sum_{k>=0} (2*x^(2*k^2+3*k+1)-x^(2*k^2+5*k+3))/(1+x).
G.f. as triangle: x*(1+2*y+3*x*y)/((1-x^2*y^2)*(1-x^2)). (End)
EXAMPLE
The corner of the square array begins:
0, 2, 0, 2, 0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, 1, ...
0, 2, 0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, 3, 1, ...
0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, ...
0, 2, 0, 2, ...
1, 3, 1, ...
0, 2, ...
1, ...
...
The sequence written as a triangle begins:
0;
1, 2;
0, 3, 0;
1, 2, 1, 2;
0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2;
0, 3, 0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2, 1, 2;
0, 3, 0, 3, 0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2, 1, 2, 1, 2;
...
MAPLE
ListTools:-Flatten([seq([[0, 3]$i, 0, [1, 2]$(i+1)], i=0..10)]); # Robert Israel, Nov 14 2016
MATHEMATICA
Table[Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)
KEYWORD
nonn,tabl
AUTHOR
Omar E. Pol, Jul 11 2016
STATUS
approved
Number of toothpicks and D-toothpicks added at n-th stage to the H-toothpick structure of A182838.
+10
4
0, 1, 2, 4, 4, 4, 6, 10, 8, 4, 6, 12, 16, 14, 14, 22, 16, 4, 6, 12, 16, 16, 20, 32, 36, 22, 14, 28, 42, 40, 36, 50, 32, 4, 6, 12, 16, 16, 20, 32, 36, 24
OFFSET
0,3
COMMENTS
From Omar E. Pol, Feb 06 2023: (Start)
The "word" of this cellular automaton is "ab".
Apart from the initial zero the structure of the irregular triangle is as shown below:
a,b;
a,b;
a,b,a,b;
a,b,a,b,a,b,a,b;
a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b;
...
Columns "a" contain numbers of toothpicks and D-toothpicks when in the top border of the structure there are only toothpicks (of length 1).
Columns "b" contain numbers of toothpicks and D-toothpicks when in the top border of the structure there are only D-toothpicks (of length sqrt(2)).
An associated sound to the animation could be (tick, tock), (tick, tock), ..., the same as the ticking clock sound.
Row lengths are the terms of A011782 multiplied by 2, also the column 2 of A296612.
For further information about the word of cellular automata see A296612.
It appears that the right border of the irregular triangle gives the even powers of 2. (End)
LINKS
David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
FORMULA
Conjecture: a(n) = (A182841(n+1) + A010673(n))/4, n >= 2. - Omar E. Pol, Feb 10 2023
EXAMPLE
From Omar E. Pol, Feb 06 2023: (Start)
The nonzero terms can write as an irregular triangle as shown below:
1, 2;
4, 4;
4, 6, 10, 8;
4, 6, 12, 16, 14, 14, 22, 16;
4, 6, 12, 16, 16, 20, 32, 36, 22, 14, 28, 42, 40, 36, 50, 32;
...
(End)
CROSSREFS
First differences of A182838.
KEYWORD
nonn,tabf,more
AUTHOR
Omar E. Pol, Dec 12 2010
EXTENSIONS
a(19)-a(41) from Omar E. Pol, Jan 06 2023
STATUS
approved
Decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 14", based on the 5-celled von Neumann neighborhood.
+10
4
1, 3, 3, 7, 11, 23, 43, 87, 171, 343, 683, 1367, 2731, 5463, 10923, 21847, 43691, 87383, 174763, 349527, 699051, 1398103, 2796203, 5592407, 11184811, 22369623, 44739243, 89478487, 178956971, 357913943, 715827883, 1431655767, 2863311531, 5726623063
OFFSET
0,2
COMMENTS
Initialized with a single black (ON) cell at stage zero.
Essentially the same as A267052. - R. J. Mathar, Nov 09 2016
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
FORMULA
G.f.: (1 + x - 4*x^2)/(1 - 2*x - x^2 + 2*x^3). - Robert G. Wilson v, Nov 05 2016
From Colin Barker, Nov 06 2016: (Start)
a(n) = (3 - 2*(-1)^n + 2^(1+n))/3.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>2. (End)
From Paul Curtz, May 08 2024: (Start)
a(2*n) = A007583(n). a(2*n+1) = A163834(n+1).
a(n) = A001045(n+1) + A010673(n).
a(n) = a(n-1) + 2*A078008(n-1). (End)
MATHEMATICA
CAStep[rule_, a_]:=Map[rule[[10-#]]&, ListConvolve[{{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}, a, 2], {2}];
code=14; stages=128;
rule=IntegerDigits[code, 2, 10];
g=2*stages+1; (* Maximum size of grid *)
a=PadLeft[{{1}}, {g, g}, 0, Floor[{g, g}/2]]; (* Initial ON cell on grid *)
ca=a;
ca=Table[ca=CAStep[rule, ca], {n, 1, stages+1}];
PrependTo[ca, a];
(* Trim full grid to reflect growth by one cell at each stage *)
k=(Length[ca[[1]]]+1)/2;
ca=Table[Table[Part[ca[[n]][[j]], Range[k+1-n, k-1+n]], {j, k+1-n, k-1+n}], {n, 1, k}];
Table[FromDigits[Part[ca[[i]][[i]], Range[i, 2*i-1]], 2], {i, 1, stages-1}]
LinearRecurrence[{2, 1, -2}, {1, 3, 3}, 32] (* or *)
CoefficientList[ Series[(1 + x - 4x^2)/(1 - 2x - x^2 + 2x^3), {x, 0, 31}], x] (* Robert G. Wilson v, Nov 05 2016 *)
PROG
(Magma) I:=[1, 3, 3]; [n le 3 select I[n] else 2*Self(n-1)+Self(n-2)-2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Nov 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Price, Nov 05 2016
STATUS
approved

Search completed in 0.015 seconds