[go: up one dir, main page]

login
Search: a000027 -id:a000027
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 5*a(n-1) - a(n-2) for n > 1, a(0) = 0, a(1) = 1.
(Formerly M3930)
+0
73
0, 1, 5, 24, 115, 551, 2640, 12649, 60605, 290376, 1391275, 6665999, 31938720, 153027601, 733199285, 3512968824, 16831644835, 80645255351, 386394631920, 1851327904249, 8870244889325, 42499896542376, 203629237822555, 975646292570399, 4674602225029440
OFFSET
0,3
COMMENTS
Nonnegative values of y satisfying x^2 - 21*y^2 = 4; values of x are in A003501. - Wolfdieter Lang, Nov 29 2002
a(n) is equal to the permanent of the (n-1) X (n-1) Hessenberg matrix with 5's along the main diagonal, i's along the superdiagonal and the subdiagonal (i is the imaginary unit), and 0's everywhere else. - John M. Campbell, Jun 09 2011
For n >= 1, a(n) equals the number of 01-avoiding words of length n-1 on alphabet {0,1,2,3,4}. - Milan Janjic, Jan 25 2015
Lim_{n->oo} a(n+1)/a(n) = (5 + sqrt(21))/2 = A107905. - Wolfdieter Lang, Nov 15 2023
From Klaus Purath, Jul 26 2024: (Start)
For any three consecutive terms (x, y, z), y^2 - xz = 1 always applies.
a(n) = (t(i+2n) - t(i))/(t(i+n+1) - t(i+n-1)) where (t) is any recurrence t(k) = 4t(k-1) + 4t(k-2) - t(k-3) or t(k) = 5t(k-1) - t(k-2) without regard to initial valus.
In particular, if the recurrence (t) of the form (4,4,-1) has the same three initial values as the current sequence, a(n) = t(n) applies.
a(n) = (t(k+1)*t(k+n) - t(k)*t(k+n+1))/(y^2 - xz) where (t) is any recurrence of the current family with signature (5,-1) and (x, y, z) are any three consecutive terms of (t), for integer k >= 0. (End)
REFERENCES
F. A. Haight, On a generalization of Pythagoras' theorem, pp. 73-77 of J. C. Butcher, editor, A Spectrum of Mathematics. Auckland University Press, 1971.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1467 (terms 0..200 from T. D. Noe)
Marco Abrate, Stefano Barbero, Umberto Cerruti, and Nadir Murru, Polynomial sequences on quadratic curves, Integers, Vol. 15, 2015, #A38.
K. Andersen, L. Carbone, and D. Penta, Kac-Moody Fibonacci sequences, hyperbolic golden ratios, and real quadratic fields, Journal of Number Theory and Combinatorics, Vol 2, No. 3 pp 245-278, 2011. See Section 9.
Francesca Arici and Jens Kaad, Gysin sequences and SU(2)-symmetries of C*-algebras, arXiv:2012.11186 [math.OA], 2020.
D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3 , Example 12
Chair, Noureddine Exact two-point resistance, and the simple random walk on the complete graph minus N edges, Ann. Phys. 327, No. 12, 3116-3129 (2012), B(7).
E. I. Emerson, Recurrent Sequences in the Equation DQ^2=R^2+N, Fib. Quart., 7 (1969), pp. 231-242.
Dale Gerdemann, Fractal images from (5,-1) recursion, YouTube Video, Nov 05 2014.
Dale Gerdemann, Fractal images from (5,-1) recursion: Selections in detail, YouTube Video, Nov 05 2014.
Frank A. Haight, On a generalization of Pythagoras' theorem, pp. 73-77 of J. C. Butcher, editor, A Spectrum of Mathematics. Auckland University Press, 1971. [Annotated scanned copy]
A. F. Horadam, Special properties of the sequence W_n(a,b; p,q), Fib. Quart., 5.5 (1967), 424-434. Case a=0,b=1; p=5, q=-1.
A. F. Horadam, Pell Identities, Fib. Quart., Vol. 9, No. 3, 1971, pp. 245-252.
M. Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.7.
Tanya Khovanova, Recursive Sequences
Wolfdieter Lang, On polynomials related to powers of the generating function of Catalan's numbers, Fib. Quart. 38,5 (2000) 408-419; Eq.(44), lhs, m=7.
Ioana-Claudia Lazăr, Lucas sequences in t-uniform simplicial complexes, arXiv:1904.06555 [math.GR], 2019.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
F. M. van Lamoen, Square wreaths around hexagons, Forum Geometricorum, 6 (2006) 311-325.
FORMULA
G.f.: x/(1-5*x+x^2).
a(n) = ((5+sqrt(21))/2)^n-((5-sqrt(21))/2)^n)/sqrt(21). - Barry E. Williams, Aug 29 2000
a(n) = S(2*n-1, sqrt(7))/sqrt(7) = S(n-1, 5); S(n, x)=U(n, x/2), Chebyshev polynomials of 2nd kind, A049310.
A003501(n) = sqrt(21*a(n)^2 + 4).
a(n) = Sum_{k=0..n-1} binomial(n+k, 2*k+1)*2^k. - Paul Barry, Nov 30 2004
[A004253(n), a(n)] = [1,3; 1,4]^n * [1,0]. - Gary W. Adamson, Mar 19 2008
a(n+1) = Sum_{k=0..n} Gegenbauer_C(n-k,k+1,2). - Paul Barry, Apr 21 2009
a(n+1) = Sum_{k=0..n} A101950(n,k)*4^k. - Philippe Deléham, Feb 10 2012
Product {n >= 1} (1 + 1/a(n)) = (1/3)*(3 + sqrt(21)). - Peter Bala, Dec 23 2012
Product {n >= 2} (1 - 1/a(n)) = (1/10)*(3 + sqrt(21)). - Peter Bala, Dec 23 2012
A054493(2*n - 1) = 7 * a(n)^2 for all n in Z. - Michael Somos, Jan 22 2017
a(n) = -a(-n) for all n in Z. - Michael Somos, Jan 22 2017
0 = -1 + a(n)*(+a(n) - 5*a(n+1)) + a(n+1)*(+a(n+1)) for all n in Z. - Michael Somos, Jan 22 2017
From Klaus Purath, Jul 26 2024: (Start)
a(n) = 4(a(n-1) + a(n-2)) - a(n-3).
a(n) = 6(a(n-1) - a(n-2)) + a(n-3).
In general, for all sequences of the form U(n) = P*U(n-1) - U(n-2) the following applies:
U(n) = (P-1)*U(n-1) + (P-1)*U(n-2) - U(n-3).
U(n) = (P+1)*U(n-1) - (P+1)*U(n-2) + U(n-3). (End)
EXAMPLE
G.f. = x + 5*x^2 + 24*x^3 + 115*x^4 + 551*x^5 + 2640*x^6 + 12649*x^7 + ...
MAPLE
A004254:=1/(1-5*z+z**2); # Simon Plouffe in his 1992 dissertation
MATHEMATICA
a[n_]:=(MatrixPower[{{1, 3}, {1, 4}}, n].{{1}, {1}})[[2, 1]]; Table[a[n], {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
a[ n_] := ChebyshevU[2 n - 1, Sqrt[7]/2] / Sqrt[7]; (* Michael Somos, Jan 22 2017 *)
PROG
(PARI) {a(n) = subst(4*poltchebi(n+1) - 10*poltchebi(n), x, 5/2) / 21}; /* Michael Somos, Dec 04 2002 */
(PARI) {a(n) = imag((5 + quadgen(84))^n) / 2^(n-1)}; /* Michael Somos, Dec 04 2002 */
(PARI) {a(n) = polchebyshev(n - 1, 2, 5/2)}; /* Michael Somos, Jan 22 2017 */
(PARI) {a(n) = simplify( polchebyshev( 2*n - 1, 2, quadgen(28)/2) / quadgen(28))}; /* Michael Somos, Jan 22 2017 */
(Sage) [lucas_number1(n, 5, 1) for n in range(27)] # Zerinvary Lajos, Jun 25 2008
(Magma) [ n eq 1 select 0 else n eq 2 select 1 else 5*Self(n-1)-Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Aug 19 2011
CROSSREFS
Partial sums of A004253.
Cf. A000027, A001906, A001353, A003501, A030221. a(n) = sqrt((A003501(n)^2 - 4)/21).
First differences of a(n) are in A004253, partial sums in A089817.
Cf. A004253.
INVERT transformation yields A001109. - R. J. Mathar, Sep 11 2008
KEYWORD
easy,nonn,easy
STATUS
approved
Binomial coefficient C(3n, n-3).
+0
6
1, 12, 105, 816, 5985, 42504, 296010, 2035800, 13884156, 94143280, 635745396, 4280561376, 28760021745, 192928249296, 1292706174900, 8654327655120, 57902201338905, 387221678682300, 2588713818544245
OFFSET
3,2
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
LINKS
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Alin Bostan, Frédéric Chyzak, and Vincent Pilaud, Refined product formulas for Tamari intervals, arXiv:2303.10986 [math.CO], 2023.
Daniel W. Stasiuk, An Enumeration Problem for Sequences of n-ary Trees Arising from Algebraic Operads, Master's Thesis, University of Saskatchewan-Saskatoon (2018).
FORMULA
a(n) = binomial(3n, n-3), n > 2. - Wesley Ivan Hurt, Feb 04 2014
From Ilya Gutkovskiy, Jan 31 2017: (Start)
E.g.f.: (1/6)*x^3*2F2(10/3,11/3; 5,11/2; 27*x/4).
a(n) ~ 3^(3*n+1/2)/(sqrt(Pi*n)*4^(n+2)). (End)
MAPLE
a:=n->sum(binomial(2*n-2, n+j)*binomial(n-1, n-j+1), j=0..n): seq(a(n), n=4..22); # Zerinvary Lajos, Jan 29 2007
MATHEMATICA
Table[Binomial[3n, n-3], {n, 3, 30}] (* Wesley Ivan Hurt, Feb 04 2014 *)
PROG
(PARI) {a(n) = binomial(3*n, n-3)}; \\ G. C. Greubel, Mar 21 2019
(Magma) [Binomial(3*n, n-3): n in [3..30]]; // G. C. Greubel, Mar 21 2019
(Sage) [binomial(3*n, n-3) for n in (3..30)] # G. C. Greubel, Mar 21 2019
(GAP) List([3..30], n-> Binomial(3*n, n-3)) # G. C. Greubel, Mar 21 2019
CROSSREFS
Cf. binomial(k*n, n-k): A000027 (k=1), A002694 (k=2), this sequence (k=3), A004334 (k=4), A004347 (k=5), A004361 (k=6), A004375 (k=7), A004389 (k=8), A281580 (k=9).
KEYWORD
nonn,easy
STATUS
approved
Binomial coefficient C(4n,n-4).
+0
4
1, 20, 276, 3276, 35960, 376992, 3838380, 38320568, 377348994, 3679075400, 35607051480, 342700125300, 3284214703056, 31368725759168, 298824321028320, 2840671544105280, 26958221130508525, 255485622301674660
OFFSET
4,2
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
LINKS
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Daniel W. Stasiuk, An Enumeration Problem for Sequences of n-ary Trees Arising from Algebraic Operads, Master's Thesis, University of Saskatchewan-Saskatoon (2018).
FORMULA
From Ilya Gutkovskiy, Jan 31 2017: (Start)
E.g.f.: (1/24)*x^4*3F3(17/4,9/2,19/4; 17/3,6,19/3; 256*x/27).
a(n) ~ 2^(8*n+1/2)/(sqrt(Pi*n)*3^(3*n+9/2)). (End)
MATHEMATICA
Table[Binomial[4n, n-4], {n, 4, 30}] (* Vincenzo Librandi, Feb 01 2017 *)
PROG
(Magma) [Binomial(4*n, n-4): n in [4..30]]; // Vincenzo Librandi, Feb 01 2017
(PARI) a(n)=binomial(4*n, n-4) \\ Charles R Greathouse IV, Feb 01 2017
(Sage) [binomial(4*n, n-4) for n in (4..30)] # G. C. Greubel, Mar 21 2019
(GAP) List([4..30], n-> Binomial(4*n, n-4)) # G. C. Greubel, Mar 21 2019
CROSSREFS
Cf. binomial(k*n, n-k): A000027 (k=1), A002694 (k=2), A004321 (k=3), this sequence (k=4), A004347 (k=5), A004361 (k=6), A004375 (k=7), A004389 (k=8), A281580 (k=9).
KEYWORD
nonn,easy
STATUS
approved
Triangle read by rows: row n lists the first n positive integers in decreasing order.
+0
331
1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
OFFSET
1,2
COMMENTS
Old name: Triangle T(n,k) = n-k, n >= 1, 0 <= k < n. Fractal sequence formed by repeatedly appending strings m, m-1, ..., 2, 1.
The PARI functions t1 (this sequence), t2 (A002260) can be used to read a square array T(n,k) (n >= 1, k >= 1) by antidiagonals upwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002, edited by M. F. Hasler, Mar 31 2020
A004736 is the mirror of the self-fission of the polynomial sequence (q(n,x)) given by q(n,x) = x^n+ x^(n-1) + ... + x + 1. See A193842 for the definition of fission. - Clark Kimberling, Aug 07 2011
Seen as flattened list: a(A000217(n)) = 1; a(A000124(n)) = n and a(m) <> n for m < A000124(n). - Reinhard Zumkeller, Jul 22 2012
Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order. Sequence A004736 is the reverse reluctant sequence of sequence 1,2,3,... (A000027). - Boris Putievskiy, Dec 13 2012
The row sums equal A000217(n). The alternating row sums equal A004526(n+1). The antidiagonal sums equal A002620(n+1) respectively A008805(n-1). - Johannes W. Meijer, Sep 28 2013
From Peter Bala, Jul 29 2014: (Start)
Riordan array (1/(1-x)^2,x). Call this array M and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the infinite matrix product M(0)*M(1)*M(2)*... is equal to A078812. (End)
T(n, k) gives the number of subsets of [n] := {1, 2, ..., n} with k consecutive numbers (consecutive k-subsets of [n]). - Wolfdieter Lang, May 30 2018
a(n) gives the distance from (n-1) to the smallest triangular number > (n-1). - Ctibor O. Zizka, Apr 09 2020
To construct the sequence, start from 1,2,,3,,,4,,,,5,,,,,6... where there are n commas after each "n". Then fill the empty places by the sequence itself. - Benoit Cloitre, Aug 17 2021
T(n,k) is the number of cycles of length 2*(k+1) in the (n+1)-ladder graph. There are no cycles of odd length. - Mohammed Yaseen, Jan 14 2023
The first 77 entries are also the signature sequence of log(3)=A002391. Then the two sequences start to differ. - R. J. Mathar, May 27 2024
REFERENCES
H. S. M. Coxeter, Regular Polytopes, 3rd ed., Dover, NY, 1973, pp 159-162.
LINKS
Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Combinatorial Identities Associated with a Multidimensional Polynomial Sequence, J. Int. Seq., Vol. 21 (2018), Article 18.7.4.
Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Intrinsic Properties of a Non-Symmetric Number Triangle, J. Int. Seq., Vol. 26 (2023), Article 23.4.8.
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.
Eric Weisstein's World of Mathematics, Ladder Graph
Eric Weisstein's World of Mathematics, Smarandache Sequences
FORMULA
a(n+1) = 1 + A025581(n).
a(n) = (2 - 2*n + round(sqrt(2*n)) + round(sqrt(2*n))^2)/2. - Brian Tenneson, Oct 11 2003
G.f.: 1 / ((1-x)^2 * (1-x*y)). - Ralf Stephan, Jan 23 2005
Recursion: e(n,k) = (e(n - 1, k)*e(n, k - 1) + 1)/e(n - 1, k - 1). - Roger L. Bagula, Mar 25 2009
a(n) = (t*t+3*t+4)/2-n, where t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 13 2012
From Johannes W. Meijer, Sep 28 2013: (Start)
T(n, k) = n - k + 1, n >= 1 and 1 <= k <= n.
T(n, k) = A002260(n+k-1, n-k+1). (End)
a(n) = A000217(A002024(n)) - n + 1. - Enrique Pérez Herrero, Aug 29 2016
EXAMPLE
The triangle T(n, k) starts:
n\k 1 2 3 4 5 6 7 8 9 10 11 12 ...
1: 1
2: 2 1
3: 3 2 1
4: 4 3 2 1
5: 5 4 3 2 1
6: 6 5 4 3 2 1
7: 7 6 5 4 3 2 1
8: 8 7 6 5 4 3 2 1
9: 9 8 7 6 5 4 3 2 1
10: 10 9 8 7 6 5 4 3 2 1
11: 11 10 9 8 7 6 5 4 3 2 1
12: 12 11 10 9 8 7 6 5 4 3 2 1
... Reformatted. - Wolfdieter Lang, Feb 04 2015
T(6, 3) = 4 because the four consecutive 3-subsets of [6] = {1, 2, ..., 6} are {1, 2, 3}, {2, 3, 4}, {3, 4, 5} and {4, 5, 6}. - Wolfdieter Lang, May 30 2018
MAPLE
A004736 := proc(n, m) n-m+1 ; end:
T := (n, k) -> n-k+1: seq(seq(T(n, k), k=1..n), n=1..13); # Johannes W. Meijer, Sep 28 2013
MATHEMATICA
Flatten[ Table[ Reverse[ Range[n]], {n, 12}]] (* Robert G. Wilson v, Apr 27 2004 *)
Table[Range[n, 1, -1], {n, 20}]//Flatten (* Harvey P. Dale, May 27 2020 *)
PROG
(PARI) {a(n) = 1 + binomial(1 + floor(1/2 + sqrt(2*n)), 2) - n}
(PARI) {t1(n) = binomial( floor(3/2 + sqrt(2*n)), 2) - n + 1} /* A004736 */
(PARI) {t2(n) = n - binomial( floor(1/2 + sqrt(2*n)), 2)} /* A002260 */
(PARI) apply( A004736(n)=1-n+(n=sqrtint(8*n)\/2)*(n+1)\2, [1..99]) \\ M. F. Hasler, Mar 31 2020
(Excel) =if(row()>=column(); row()-column()+1; "") [Mats Granvik, Jan 19 2009]
(Haskell)
a004736 n k = n - k + 1
a004736_row n = a004736_tabl !! (n-1)
a004736_tabl = map reverse a002260_tabl
-- Reinhard Zumkeller, Aug 04 2014, Jul 22 2012
(Python)
def agen(rows):
for n in range(1, rows+1): yield from range(n, 0, -1)
print([an for an in agen(13)]) # Michael S. Branicky, Aug 17 2021
CROSSREFS
Ordinal transform of A002260. See also A078812.
Cf. A141419 (partial sums per row).
Cf. A134546 (T * A051731, matrix product).
See A001511 for definition of ordinal transform.
KEYWORD
nonn,easy,tabl,nice
AUTHOR
R. Muller
EXTENSIONS
New name from Omar E. Pol, Jul 15 2012
STATUS
approved
Concatenation of sequences (1,2,...,n-1,n,n-1,...,2) for n >= 2.
+0
12
1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9
OFFSET
1,2
COMMENTS
Also concatenation of sequences n,n-1,...,2,1,2,...,n-1,n.
Table T(n,k) n, k > 0, T(n,k) = n-k+1, if n >= k, T(n,k) = k-n+1, if n < k. Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). General case A209301. Let m be a natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A004739, for m=2 the result is A004738, for m=3 the result is A209301. - Boris Putievskiy, Jan 24 2013
REFERENCES
F. Smarandache, "Numerical Sequences", University of Craiova, 1975; [ See Arizona State University, Special Collection, Tempe, AZ, USA ].
LINKS
Boris Putievskiy, Transformations [Of] Integer Sequences And Pairing Functions, arXiv preprint arXiv:1212.2732 [math.CO], 2012.
Eric Weisstein's World of Mathematics, Smarandache Sequences
FORMULA
a(n) = floor(sqrt(n) + 1/2) + 1 - abs(n - 1 - (floor(sqrt(n) + 1/2))^2). - Benoit Cloitre, Feb 08 2003
From Boris Putievskiy, Jan 24 2013: (Start)
For the general case, a(n) = m*v + (2*v-1)*(t*t-n) + t, where t = floor((sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1.
For m=2, a(n) = 2*v + (2*v-1)*(t*t-n)+t, where t = floor((sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1. (End)
EXAMPLE
From Boris Putievskiy, Jan 24 2013: (Start)
The start of the sequence as table:
1, 2, 3, 4, 5, 6, 7, ...
2, 1, 2, 3, 4, 5, 6, ...
3, 2, 1, 2, 3, 4, 5, ...
4, 3, 2, 1, 2, 3, 4, ...
5, 4, 3, 2, 1, 2, 3, ...
6, 5, 4, 3, 2, 1, 2, ...
7, 6, 5, 4, 3, 2, 1, ...
...
The start of the sequence as triangle array read by rows:
1;
2, 1, 2;
3, 2, 1, 2, 3;
4, 3, 2, 1, 2, 3, 4;
5, 4, 3, 2, 1, 2, 3, 4, 5;
6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6;
7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7;
...
Row number r contains 2*r - 1 numbers: r, r-1, ..., 1, 2, ..., r. (End)
MAPLE
A004738 := proc(n)
local tri ;
tri := floor(sqrt(n)+1/2) ;
tri+1-abs(n-1-tri^2) ;
end proc:
seq(A004738(n), n=1..30) ; #R. J. Mathar, Feb 14 2019
MATHEMATICA
row[n_] := Range[n, 1, -1] ~Join~ Range[2, n];
Array[row, 10] // Flatten (* Jean-François Alcover, Apr 19 2020 *)
PROG
(PARI) a(n)= floor(sqrt(n)+1/2)+1-abs(n-1-(floor(sqrt(n)+1/2)-1/2)^2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. Muller
EXTENSIONS
More terms from Patrick De Geest, Jun 15 1998
STATUS
approved
Concatenation of sequences (1,2,2,...,n-1,n-1,n,n,n-1,n-1,...,2,2,1) for n >= 1.
+0
5
1, 1, 1, 2, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 3, 4, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7
OFFSET
1,4
COMMENTS
From Artur Jasinski, Mar 07 2010: (Start)
Zeta(2, k/p) + Zeta(2, (p-k)/p) = (Pi/sin((Pi*a(n))/p))*2, where p=2,3,4, k=1..p-1.
This sequence is the odd subset of A003983 for odd p=3,5,7,9,....
For the even subset of A003983 see A004737. (End)
Table T(n,k) n, k > 0, T(n,k) = n-k+1, if n >= k, T(n,k) = k-n, if n < k. Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). General case A209301. Let m be a natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A004739, for m=2 the result is A004738, for m=3 the result is A209301. - Boris Putievskiy, Jan 24 2013
LINKS
Boris Putievskiy, Transformations [Of] Integer Sequences And Pairing Functions, arXiv preprint arXiv:1212.2732 [math.CO], 2012.
Eric Weisstein's World of Mathematics, Smarandache Sequences
FORMULA
From Boris Putievskiy, Jan 24 2013: (Start)
For the general case,
a(n) = m*v + (2*v-1)*(t*t-n) + t, where t = floor((sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1.
For m=1,
a(n) = v + (2*v-1)*(t*t-n) + t, where t = floor((sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1. (End)
EXAMPLE
From Boris Putievskiy, Jan 24 2013: (Start)
The start of the sequence as table:
1, 1, 2, 3, 4, 5, 6, ...
2, 1, 1, 2, 3, 4, 5, ...
3, 2, 1, 1, 2, 3, 4, ...
4, 3, 2, 1, 1, 2, 3, ...
5, 4, 3, 2, 1, 1, 2, ...
6, 5, 4, 3, 2, 1, 1, ...
7, 6, 5, 4, 3, 2, 1, ...
...
The start of the sequence as triangle array read by rows:
1;
1, 1, 2;
2, 1, 1, 2, 3;
3, 2, 1, 1, 2, 3, 4;
4, 3, 2, 1, 1, 2, 3, 4, 5;
5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6;
6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7;
...
Row number r contains 2*r - 1 numbers: r-1, r-2, ..., 1, 1, 2, ..., r. (End)
MATHEMATICA
aa = {}; Do[Do[AppendTo[aa, (p/Pi) ArcSin[Sqrt[1/((1/Pi^2) (Zeta[2, k/p] + Zeta[2, (p - k)/p]))]]], {k, 1, p - 1}], {p, 3, 50, 2}]; Round[N[aa, 50]] (* Artur Jasinski, Mar 07 2010 *)
PROG
(Haskell)
a004739 n = a004739_list !! (n-1)
a004739_list = concat $ map (\n -> [1..n] ++ [n, n-1..1]) [1..]
-- Reinhard Zumkeller, Mar 26 2011
KEYWORD
nonn,easy
AUTHOR
R. Muller
EXTENSIONS
More terms from Patrick De Geest, Jun 15 1998
STATUS
approved
The odd numbers: a(n) = 2*n + 1.
(Formerly M2400)
+0
1212
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
OFFSET
0,2
COMMENTS
Leibniz's series: Pi/4 = Sum_{n>=0} (-1)^n/(2n+1) (cf. A072172).
Beginning of the ordering of the natural numbers used in Sharkovski's theorem - see the Cielsielski-Pogoda paper.
The Sharkovski ordering begins with the odd numbers >= 3, then twice these numbers, then 4 times them, then 8 times them, etc., ending with the powers of 2 in decreasing order, ending with 2^0 = 1.
Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0(6).
Also continued fraction for coth(1) (A073747 is decimal expansion). - Rick L. Shepherd, Aug 07 2002
a(1) = 1; a(n) is the smallest number such that a(n) + a(i) is composite for all i = 1 to n-1. - Amarnath Murthy, Jul 14 2003
Smallest number greater than n, not a multiple of n, but containing it in binary representation. - Reinhard Zumkeller, Oct 06 2003
Numbers n such that phi(2n) = phi(n), where phi is Euler's totient (A000010). - Lekraj Beedassy, Aug 27 2004
Pi*sqrt(2)/4 = Sum_{n>=0} (-1)^floor(n/2)/(2n+1) = 1 + 1/3 - 1/5 - 1/7 + 1/9 + 1/11 ... [since periodic f(x)=x over -Pi < x < Pi = 2(sin(x)/1 - sin(2x)/2 + sin(3x)/3 - ...) using x = Pi/4 (Maor)]. - Gerald McGarvey, Feb 04 2005
For n > 1, numbers having 2 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
a(n) = shortest side a of all integer-sided triangles with sides a <= b <= c and inradius n >= 1.
First differences of squares (A000290). - Lekraj Beedassy, Jul 15 2006
The odd numbers are the solution to the simplest recursion arising when assuming that the algorithm "merge sort" could merge in constant unit time, i.e., T(1):= 1, T(n):= T(floor(n/2)) + T(ceiling(n/2)) + 1. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 14 2006
2n-5 counts the permutations in S_n which have zero occurrences of the pattern 312 and one occurrence of the pattern 123. - David Hoek (david.hok(AT)telia.com), Feb 28 2007
For n > 0: number of divisors of (n-1)th power of any squarefree semiprime: a(n) = A000005(A001248(k)^(n-1)); a(n) = A000005(A000302(n-1)) = A000005(A001019(n-1)) = A000005(A009969(n-1)) = A000005(A087752(n-1)). - Reinhard Zumkeller, Mar 04 2007
For n > 2, a(n-1) is the least integer not the sum of < n n-gonal numbers (0 allowed). - Jonathan Sondow, Jul 01 2007
A134451(a(n)) = abs(A134452(a(n))) = 1; union of A134453 and A134454. - Reinhard Zumkeller, Oct 27 2007
Numbers n such that sigma(2n) = 3*sigma(n). - Farideh Firoozbakht, Feb 26 2008
a(n) = A139391(A016825(n)) = A006370(A016825(n)). - Reinhard Zumkeller, Apr 17 2008
Number of divisors of 4^(n-1) for n > 0. - J. Lowell, Aug 30 2008
Equals INVERT transform of A078050 (signed - cf. comments); and row sums of triangle A144106. - Gary W. Adamson, Sep 11 2008
Odd numbers(n) = 2*n+1 = square pyramidal number(3*n+1) / triangular number(3*n+1). - Pierre CAMI, Sep 27 2008
A000035(a(n))=1, A059841(a(n))=0. - Reinhard Zumkeller, Sep 29 2008
Multiplicative closure of A065091. - Reinhard Zumkeller, Oct 14 2008
a(n) is also the maximum number of triangles that n+2 points in the same plane can determine. 3 points determine max 1 triangle; 4 points can give 3 triangles; 5 points can give 5; 6 points can give 7 etc. - Carmine Suriano, Jun 08 2009
Binomial transform of A130706, inverse binomial transform of A001787(without the initial 0). - Philippe Deléham, Sep 17 2009
Also the 3-rough numbers: positive integers that have no prime factors less than 3. - Michael B. Porter, Oct 08 2009
Or n without 2 as prime factor. - Juri-Stepan Gerasimov, Nov 19 2009
Given an L(2,1) labeling l of a graph G, let k be the maximum label assigned by l. The minimum k possible over all L(2,1) labelings of G is denoted by lambda(G). For n > 0, this sequence gives lambda(K_{n+1}) where K_{n+1} is the complete graph on n+1 vertices. - K.V.Iyer, Dec 19 2009
A176271 = odd numbers seen as a triangle read by rows: a(n) = A176271(A002024(n+1), A002260(n+1)). - Reinhard Zumkeller, Apr 13 2010
For n >= 1, a(n-1) = numbers k such that arithmetic mean of the first k positive integers is integer. A040001(a(n-1)) = 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
Union of A179084 and A179085. - Reinhard Zumkeller, Jun 28 2010
For n>0, continued fraction [1,1,n] = (n+1)/a(n); e.g., [1,1,7] = 8/15. - Gary W. Adamson, Jul 15 2010
Numbers that are the sum of two sequential integers. - Dominick Cancilla, Aug 09 2010
Cf. property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n - h)/4 (h and n in A000027), therefore ((2*h*n + (h-4)*(-1)^n - h)/4)^2 - 1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 4). Also a(n)^2 - 1 == 0 (mod 8). - Bruno Berselli, Nov 17 2010
A004767 = a(a(n)). - Reinhard Zumkeller, Jun 27 2011
A001227(a(n)) = A000005(a(n)); A048272(a(n)) < 0. - Reinhard Zumkeller, Jan 21 2012
a(n) is the minimum number of tosses of a fair coin needed so that the probability of more than n heads is at least 1/2. In fact, Sum_{k=n+1..2n+1} Pr(k heads|2n+1 tosses) = 1/2. - Dennis P. Walsh, Apr 04 2012
A007814(a(n)) = 0; A037227(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2012
1/N (i.e., 1/1, 1/2, 1/3, ...) = Sum_{j=1,3,5,...,infinity} k^j, where k is the infinite set of constants 1/exp.ArcSinh(N/2) = convergents to barover(N). The convergent to barover(1) or [1,1,1,...] = 1/phi = 0.6180339..., whereas c.f. barover(2) converges to 0.414213..., and so on. Thus, with k = 1/phi we obtain 1 = k^1 + k^3 + k^5 + ..., and with k = 0.414213... = (sqrt(2) - 1) we get 1/2 = k^1 + k^3 + k^5 + .... Likewise, with the convergent to barover(3) = 0.302775... = k, we get 1/3 = k^1 + k^3 + k^5 + ..., etc. - Gary W. Adamson, Jul 01 2012
Conjecture on primes with one coach (A216371) relating to the odd integers: iff an integer is in A216371 (primes with one coach either of the form 4q-1 or 4q+1, (q > 0)); the top row of its coach is composed of a permutation of the first q odd integers. Example: prime 19 (q = 5), has 5 terms in each row of its coach: 19: [1, 9, 5, 7, 3] ... [1, 1, 1, 2, 4]. This is interpreted: (19 - 1) = (2^1 * 9), (19 - 9) = (2^1 * 5), (19 - 5) = (2^1 - 7), (19 - 7) = (2^2 * 3), (19 - 3) = (2^4 * 1). - Gary W. Adamson, Sep 09 2012
A005408 is the numerator 2n-1 of the term (1/m^2 - 1/n^2) = (2n-1)/(mn)^2, n = m+1, m > 0 in the Rydberg formula, while A035287 is the denominator (mn)^2. So the quotient a(A005408)/a(A035287) simulates the Hydrogen spectral series of all hydrogen-like elements. - Freimut Marschner, Aug 10 2013
This sequence has unique factorization. The primitive elements are the odd primes (A065091). (Each term of the sequence can be expressed as a product of terms of the sequence. Primitive elements have only the trivial factorization. If the products of terms of the sequence are always in the sequence, and there is a unique factorization of each element into primitive elements, we say that the sequence has unique factorization. So, e.g., the composite numbers do not have unique factorization, because for example 36 = 4*9 = 6*6 has two distinct factorizations.) - Franklin T. Adams-Watters, Sep 28 2013
These are also numbers k such that (k^k+1)/(k+1) is an integer. - Derek Orr, May 22 2014
a(n-1) gives the number of distinct sums in the direct sum {1,2,3,..,n} + {1,2,3,..,n}. For example, {1} + {1} has only one possible sum so a(0) = 1. {1,2} + {1,2} has three distinct possible sums {2,3,4} so a(1) = 3. {1,2,3} + {1,2,3} has 5 distinct possible sums {2,3,4,5,6} so a(2) = 5. - Derek Orr, Nov 22 2014
The number of partitions of 4*n into at most 2 parts. - Colin Barker, Mar 31 2015
a(n) is representable as a sum of two but no fewer consecutive nonnegative integers, e.g., 1 = 0 + 1, 3 = 1 + 2, 5 = 2 + 3, etc. (see A138591). - Martin Renner, Mar 14 2016
Unique solution a( ) of the complementary equation a(n) = a(n-1)^2 - a(n-2)*b(n-1), where a(0) = 1, a(1) = 3, and a( ) and b( ) are increasing complementary sequences. - Clark Kimberling, Nov 21 2017
Also the number of maximal and maximum cliques in the n-centipede graph. - Eric W. Weisstein, Dec 01 2017
Lexicographically earliest sequence of distinct positive integers such that the average of any number of consecutive terms is always an integer. (For opposite property see A042963.) - Ivan Neretin, Dec 21 2017
Maximum number of non-intersecting line segments between vertices of a convex (n+2)-gon. - Christoph B. Kassir, Oct 21 2022
a(n) is the number of parking functions of size n+1 avoiding the patterns 123, 132, and 231. - Lara Pudwell, Apr 10 2023
a(n) is the maximum number of triangles in planar connected graphs of triangles with n+3 nodes. - Ya-Ping Lu, Jun 25 2024
REFERENCES
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
T. Dantzig, The Language of Science, 4th Edition (1954) page 276.
H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 73.
D. Hök, Parvisa mönster i permutationer [Swedish], (2007).
E. Maor, Trigonometric Delights, Princeton University Press, NJ, 1998, pp. 203-205.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Ayomikun Adeniran and Lara Pudwell, Pattern avoidance in parking functions, Enumer. Comb. Appl. 3:3 (2023), Article S2R17.
D. Applegate and J. C. Lagarias, The 3x+1 semigroup, Journal of Number Theory, Vol. 177, Issue 1, March 2006, pp. 146-159; see also the arXiv version, arXiv:math/0411140 [math.NT], 2004-2005.
Paul Barry, A Catalan Transform and Related Transformations on Integer Sequences, J. Integer Sequ., Vol. 8 (2005), Article 05.4.5.
Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão and Graça Tomaz, Combinatorial Identities Associated with a Multidimensional Polynomial Sequence, J. Int. Seq., Vol. 21 (2018), Article 18.7.4.
Hongwei Chen, Evaluations of Some Variant Euler Sums, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.3.
K. Ciesielski and Z. Pogoda, On ordering the natural numbers, or the Sharkovski theorem, Amer. Math. Monthly, 115 (No. 2, 2008), 158-165.
T.-X. He and L. W. Shapiro, Fuss-Catalan matrices, their weighted sums, and stabilizer subgroups of the Riordan group, Lin. Alg. Applic. 532 (2017) 25-41, theorem 2.5, k=4.
Milan Janjić, On Restricted Ternary Words and Insets, arXiv:1905.04465 [math.CO], 2019.
Jay Kappraff and Gary W. Adamson, Polygons and Chaos, Bridges.
Tanya Khovanova, Recursive Sequences
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
Franck Ramaharo, Enumerating the states of the twist knot, arXiv:1712.06543 [math.CO], 2017.
William A. Stein, The modular forms database
Eric Weisstein's World of Mathematics, Centipede Graph
Eric Weisstein's World of Mathematics, Davenport-Schinzel Sequence
Eric Weisstein's World of Mathematics, Gnomonic Number
Eric Weisstein's World of Mathematics, Inverse Cotangent,
Eric Weisstein's World of Mathematics, Inverse Hyperbolic Cotangent
Eric Weisstein's World of Mathematics, Inverse Hyperbolic Tangent
Eric Weisstein's World of Mathematics, Inverse Tangent
Eric Weisstein's World of Mathematics, Maximal Clique
Eric Weisstein's World of Mathematics, Maximum Clique
Eric Weisstein's World of Mathematics, Nexus Number
Eric Weisstein's World of Mathematics, Odd Number
Eric Weisstein's World of Mathematics, Pythagorean Triple
FORMULA
a(n) = 2*n + 1. a(-1 - n) = -a(n). a(n+1) = a(n) + 2.
G.f.: (1 + x) / (1 - x)^2.
E.g.f.: (1 + 2*x) * exp(x).
G.f. with interpolated zeros: (x^3+x)/((1-x)^2 * (1+x)^2); e.g.f. with interpolated zeros: x*(exp(x)+exp(-x))/2. - Geoffrey Critzer, Aug 25 2012
a(n) = L(n,-2)*(-1)^n, where L is defined as in A108299. - Reinhard Zumkeller, Jun 01 2005
Euler transform of length 2 sequence [3, -1]. - Michael Somos, Mar 30 2007
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = v * (1 + 2*u) * (1 - 2*u + 16*v) - (u - 4*v)^2 * (1 + 2*u + 2*u^2). - Michael Somos, Mar 30 2007
a(n) = b(2*n + 1) where b(n) = n if n is odd is multiplicative. [This seems to say that A000027 is multiplicative? - R. J. Mathar, Sep 23 2011]
From Hieronymus Fischer, May 25 2007: (Start)
a(n) = (n+1)^2 - n^2.
G.f. g(x) = Sum_{k>=0} x^floor(sqrt(k)) = Sum_{k>=0} x^A000196(k). (End)
a(0) = 1, a(1) = 3, a(n) = 2*a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
a(n) = A000330(A016777(n))/A000217(A016777(n)). - Pierre CAMI, Sep 27 2008
a(n) = A034856(n+1) - A000217(n) = A005843(n) + A000124(n) - A000217(n) = A005843(n) + 1. - Jaroslav Krizek, Sep 05 2009
a(n) = (n - 1) + n (sum of two sequential integers). - Dominick Cancilla, Aug 09 2010
a(n) = 4*A000217(n)+1 - 2*Sum_{i=1..n-1} a(i) for n > 1. - Bruno Berselli, Nov 17 2010
n*a(2n+1)^2+1 = (n+1)*a(2n)^2; e.g., 3*15^2+1 = 4*13^2. - Charlie Marion, Dec 31 2010
arctanh(x) = Sum_{n>=0} x^(2n+1)/a(n). - R. J. Mathar, Sep 23 2011
a(n) = det(f(i-j+1))_{1<=i,j<=n}, where f(n) = A113311(n); for n < 0 we have f(n)=0. - Mircea Merca, Jun 23 2012
G.f.: Q(0), where Q(k) = 1 + 2*(k+1)*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
a(n) = floor(sqrt(2*A000384(n+1))). - Ivan N. Ianakiev, Jun 17 2013
a(n) = 3*A000330(n)/A000217(n), n > 0. - Ivan N. Ianakiev, Jul 12 2013
a(n) = Product_{k=1..2*n} 2*sin(Pi*k/(2*n+1)) = Product_{k=1..n} (2*sin(Pi*k/(2*n+1)))^2, n >= 0 (undefined product = 1). See an Oct 09 2013 formula contribution in A000027 with a reference. - Wolfdieter Lang, Oct 10 2013
Noting that as n -> infinity, sqrt(n^2 + n) -> n + 1/2, let f(n) = n + 1/2 - sqrt(n^2 + n). Then for n > 0, a(n) = round(1/f(n))/4. - Richard R. Forberg, Feb 16 2014
a(n) = Sum_{k=0..n+1} binomial(2*n+1,2*k)*4^(k)*bernoulli(2*k). - Vladimir Kruchinin, Feb 24 2015
a(n) = Sum_{k=0..n} binomial(6*n+3, 6*k)*Bernoulli(6*k). - Michel Marcus, Jan 11 2016
a(n) = A000225(n+1) - A005803(n+1). - Miquel Cerda, Nov 25 2016
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
Sum_{n>=0} 1/a(n)^2 = Pi^2/8 = A111003. - Bernard Schott, Dec 10 2020
Sum_{n >= 1} (-1)^n/(a(n)*a(n+1)) = Pi/4 - 1/2 = 1/(3 + (1*3)/(4 + (3*5)/(4 + ... + (4*n^2 - 1)/(4 + ... )))). Cf. A016754. - Peter Bala, Mar 28 2024
a(n) = A055112(n)/oblong(n) = A193218(n+1)/Hex number(n). Compare to the Sep 27 2008 comment by Pierre CAMI. - Klaus Purath, Apr 23 2024
a(k*m) = k*a(m) - (k-1). - Ya-Ping Lu, Jun 25 2024
EXAMPLE
G.f. = q + 3*q^3 + 5*q^5 + 7*q^7 + 9*q^9 + 11*q^11 + 13*q^13 + 15*q^15 + ...
MAPLE
A005408 := n->2*n+1;
A005408:=(1+z)/(z-1)^2; # Simon Plouffe in his 1992 dissertation
MATHEMATICA
Table[2 n - 1, {n, 1, 50}] (* Stefan Steinerberger, Apr 01 2006 *)
Range[1, 131, 2] (* Harvey P. Dale, Apr 26 2011 *)
2 Range[0, 20] + 1 (* Eric W. Weisstein, Dec 01 2017 *)
LinearRecurrence[{2, -1}, {1, 3}, 20] (* Eric W. Weisstein, Dec 01 2017 *)
CoefficientList[Series[(1 + x)/(-1 + x)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Dec 01 2017 *)
PROG
(Magma) [ 2*n+1 : n in [0..100]];
(PARI) {a(n) = 2*n + 1}
(PARI) first(n) = Vec((1 + x)/(1 - x)^2 + O(x^n)) \\ Iain Fox, Dec 29 2017
(Haskell)
a005408 n = (+ 1) . (* 2)
a005408_list = [1, 3 ..] -- Reinhard Zumkeller, Feb 11 2012, Jun 28 2011
(Maxima) makelist(2*n+1, n, 0, 30); /* Martin Ettl, Dec 11 2012 */
(Python) a=lambda n: 2*n+1 # Indranil Ghosh, Jan 04 2017
(GAP) List([0..100], n->2*n+1); # Muniru A Asiru, Oct 16 2018
(Sage) [2*n+1 for n in range(100)] # G. C. Greubel, Nov 28 2018
CROSSREFS
See A120062 for sequences related to integer-sided triangles with integer inradius n.
Cf. A001651 (n=1 or 2 mod 3), A047209 (n=1 or 4 mod 5).
Cf. A003558, A216371, A179480 (relating to the Coach theorem).
Cf. A000754 (boustrophedon transform).
KEYWORD
nonn,core,nice,easy
EXTENSIONS
Incorrect comment and example removed by Joerg Arndt, Mar 11 2010
Peripheral comments deleted by N. J. A. Sloane, May 09 2022
STATUS
approved
a(n) = n*(n+2) = (n+1)^2 - 1.
(Formerly M2720)
+0
308
0, 3, 8, 15, 24, 35, 48, 63, 80, 99, 120, 143, 168, 195, 224, 255, 288, 323, 360, 399, 440, 483, 528, 575, 624, 675, 728, 783, 840, 899, 960, 1023, 1088, 1155, 1224, 1295, 1368, 1443, 1520, 1599, 1680, 1763, 1848, 1935, 2024, 2115, 2208, 2303, 2400, 2499, 2600
OFFSET
0,2
COMMENTS
Erdős conjectured that n^2 - 1 = k! has a solution if and only if n is 5, 11 or 71 (when k is 4, 5 or 7).
Second-order linear recurrences y(m) = 2y(m-1) + a(n)*y(m-2), y(0) = y(1) = 1, have closed form solutions involving only powers of integers. - Len Smiley, Dec 08 2001
Number of edges in the join of two cycle graphs, both of order n, C_n * C_n. - Roberto E. Martinez II, Jan 07 2002
Let k be a positive integer, M_n be the n X n matrix m_(i,j) = k^abs(i-j) then det(M_n) = (-1)^(n-1)*a(k-1)^(n-1). - Benoit Cloitre, May 28 2002
Also numbers k such that 4*k + 4 is a square. - Cino Hilliard, Dec 18 2003
For each term k, the function sqrt(x^2 + 1), starting with 1, produces an integer after k iterations. - Gerald McGarvey, Aug 19 2004
a(n) mod 3 = 0 if and only if n mod 3 > 0: a(A008585(n)) = 2; a(A001651(n)) = 0; a(n) mod 3 = 2*(1-A079978(n)). - Reinhard Zumkeller, Oct 16 2006
a(n) is the number of divisors of a(n+1) that are not greater than n. - Reinhard Zumkeller, Apr 09 2007
Nonnegative X values of solutions to the equation X^3 + X^2 = Y^2. To find Y values: b(n) = n(n+1)(n+2). - Mohamed Bouhamida, Nov 06 2007
Sequence allows us to find X values of the equation: X + (X + 1)^2 + (X + 2)^3 = Y^2. To prove that X = n^2 + 2n: Y^2 = X + (X + 1)^2 + (X + 2)^3 = X^3 + 7*X^2 + 15X + 9 = (X + 1)(X^2 + 6X + 9) = (X + 1)*(X + 3)^2 it means: (X + 1) must be a perfect square, so X = k^2 - 1 with k>=1. we can put: k = n + 1, which gives: X = n^2 + 2n and Y = (n + 1)(n^2 + 2n + 3). - Mohamed Bouhamida, Nov 12 2007
From R. K. Guy, Feb 01 2008: (Start)
Toads and Frogs puzzle:
This is also the number of moves that it takes n frogs to swap places with n toads on a strip of 2n + 1 squares (or positions, or lily pads) where a move is a single slide or jump, illustrated for n = 2, a(n) = 8 by
T T - F F
T - T F F
T F T - F
T F T F -
T F - F T
- F T F T
F - T F T
F F T - T
F F - T T
I was alerted to this by the Holton article, but on consulting Singmaster's sources, I find that the puzzle goes back at least to 1867.
Probably the first to publish the number of moves for n of each animal was Edouard Lucas in 1883. (End)
a(n+1) = terms of rank 0, 1, 3, 6, 10 = A000217 of A120072 (3, 8, 5, 15). - Paul Curtz, Oct 28 2008
Row 3 of array A163280, n >= 1. - Omar E. Pol, Aug 08 2009
Final digit belongs to a periodic sequence: 0, 3, 8, 5, 4, 5, 8, 3, 0, 9. - Mohamed Bouhamida, Sep 04 2009 [Comment edited by N. J. A. Sloane, Sep 24 2009]
Let f(x) be a polynomial in x. Then f(x + n*f(x)) is congruent to 0 (mod(f(x)); here n belongs to N. There is nothing interesting in the quotients f(x + n*f(x))/f(x) when x belongs to Z. However, when x is irrational these quotients consist of two parts, a) rational integers and b) integer multiples of x. The present sequence represents the non-integer part when the polynomial is x^2 + x + 1 and x = sqrt(2), f(x+n*f(x))/f(x) = A056108(n) + a(n)*sqrt(2). - A.K. Devaraj, Sep 18 2009
For n >= 1, a(n) is the number for which 1/a(n) = 0.0101... (A000035) in base (n+1). - Rick L. Shepherd, Sep 27 2009
For n > 0, continued fraction [n, 1, n] = (n+1)/a(n); e.g., [6, 1, 6] = 7/48. - Gary W. Adamson, Jul 15 2010
Starting (3, 8, 15, ...) = binomial transform of [3, 5, 2, 0, 0, 0, ...]; e.g., a(3) = 15 = (1*3 + 2*5 +1*2) = (3 + 10 + 2). - Gary W. Adamson, Jul 30 2010
a(n) is essentially the case 0 of the polygonal numbers. The polygonal numbers are defined as P_k(n) = Sum_{i=1..n} ((k-2)*i-(k-3)). Thus P_0(n) = 2*n-n^2 and a(n) = -P_0(n+2). See also A067998 and for the case k=1 A080956. - Peter Luschny, Jul 08 2011
a(n) is the maximal determinant of a 2 X 2 matrix with integer elements from {1, ..., n+1}, so the maximum determinant of a 2x2 matrix with integer elements from {1, ..., 5} = 5^2 - 1 = a(4) = 24. - Aldo González Lorenzo, Oct 12 2011
Using four consecutive triangular numbers t1, t2, t3 and t4, plot the points (0, 0), (t1, t2), and (t3, t4) to create a triangle. Twice the area of this triangle are the numbers in this sequence beginning with n = 1 to give 8. - J. M. Bergot, May 03 2012
Given a particle with spin S = n/2 (always a half-integer value), the quantum-mechanical expectation value of the square of the magnitude of its spin vector evaluates to <S^2> = S(S+1) = n(n+2)/4, i.e., one quarter of a(n) with n = 2S. This plays an important role in the theory of magnetism and magnetic resonance. - Stanislav Sykora, May 26 2012
Twice the harmonic mean [H(x, y) = (2*x*y)/(x + y)] of consecutive triangular numbers A000217(n) and A000217(n+1). - Raphie Frank, Sep 28 2012
Number m such that floor(sqrt(m)) = floor(m/floor(sqrt(m))) - 2 for m > 0. - Takumi Sato, Oct 10 2012
The solutions of equation 1/(i - sqrt(j)) = i + sqrt(j), when i = (n+1), j = a(n). For n = 1, 2 + sqrt(3) = 3.732050.. = A019973. For n = 2, 3 + sqrt(8) = 5.828427... = A156035. - Kival Ngaokrajang, Sep 07 2013
The integers in the closed form solution of a(n) = 2*a(n-1) + a(m-2)*a(n-2), n >= 2, a(0) = 0, a(1) = 1 mentioned by Len Smiley, Dec 08 2001, are m and -m + 2 where m >= 3 is a positive integer. - Felix P. Muga II, Mar 18 2014
Let m >= 3 be a positive integer. If a(n) = 2*a(n-1) + a(m-2) * a(n-2), n >= 2, a(0) = 0, a(1) = 1, then lim_{n->oo} a(n+1)/a(n) = m. - Felix P. Muga II, Mar 18 2014
For n >= 4 the Szeged index of the wheel graph W_n (with n + 1 vertices). In the Sarma et al. reference, Theorem 2.7 is incorrect. - Emeric Deutsch, Aug 07 2014
If P_{k}(n) is the n-th k-gonal number, then a(n) = t*P_{s}(n+2) - s*P_{t}(n+2) for s=t+1. - Bruno Berselli, Sep 04 2014
For n >= 1, a(n) is the dimension of the simple Lie algebra A_n. - Wolfdieter Lang, Oct 21 2015
Finding all positive integers (n, k) such that n^2 - 1 = k! is known as Brocard's problem, (see A085692). - David Covert, Jan 15 2016
For n > 0, a(n) mod (n+1) = a(n) / (n+1) = n. - Torlach Rush, Apr 04 2016
Conjecture: When using the Sieve of Eratosthenes and sieving (n+1..a(n)), with divisors (1..n) and n>0, there will be no more than a(n-1) composite numbers. - Fred Daniel Kline, Apr 08 2016
a(n) mod 8 is periodic with period 4 repeating (0,3,0,7), that is a(n) mod 8 = 5/2 - (5/2) cos(n*Pi) - sin(n*Pi/2) + sin(3*n*Pi/2). - Andres Cicuttin, Jun 02 2016
Also for n > 0, a(n) is the number of times that n-1 occurs among the first (n+1)! terms of A055881. - R. J. Cano, Dec 21 2016
The second diagonal of composites (the only prime is number 3) from the right on the Klauber triangle (see Kival Ngaokrajang link), which is formed by taking the positive integers and taking the first 1, the next 3, the following 5, and so on, each centered below the last. - Charles Kusniec, Jul 03 2017
Also the number of independent vertex sets in the n-barbell graph. - Eric W. Weisstein, Aug 16 2017
Interleaving of A000466 and A033996. - Bruce J. Nicholson, Nov 08 2019
a(n) is the number of degrees of freedom in a triangular cell for a Raviart-Thomas or Nédélec first kind finite element space of order n. - Matthew Scroggs, Apr 22 2020
From Muge Olucoglu, Jan 19 2021: (Start)
For n > 1, a(n-2) is the maximum number of elements in the second stage of the Quine-McCluskey algorithm whose minterms are not covered by the functions of n bits. At n=3, we have a(3-2) = a(1) = 1*(1+2) = 3 and f(A,B,C) = sigma(0,1,2,5,6,7).
.
0 1 2 5 6 7
+---------------
*(0,1)| X X
(0,2)| X X
(1,5)| X X
*(2,6)| X X
*(5,7)| X X
(6,7)| X X
.
*: represents the elements that are covered. (End)
1/a(n) is the ratio of the sum of the first k odd numbers and the sum of the next n*k odd numbers. - Melvin Peralta, Jul 15 2021
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [n; {1, 2n}]. - Magus K. Chu, Sep 09 2022
Number of diagonals parallel to an edge in a regular (2*n+4)-gon (cf. A367204). - Paolo Xausa, Nov 21 2023
REFERENCES
E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see index under Toads and Frogs Puzzle.
Martin Gardner, Perplexing Puzzles and Tantalizing Teasers, p. 21 (for "The Dime and Penny Switcheroo").
R. K. Guy, Unsolved Problems in Theory of Numbers, Section D25.
Derek Holton, Math in School, 37 #1 (Jan 2008) 20-22.
Edouard Lucas, Récréations Mathématiques, Gauthier-Villars, Vol. 2 (1883) 141-143.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Jeremiah Bartz, Bruce Dearden, and Joel Iiams, Classes of Gap Balancing Numbers, arXiv:1810.07895 [math.NT], 2018.
Spencer Daugherty, Pamela E. Harris, Ian Klein, and Matt McClinton, Metered Parking Functions, arXiv:2406.12941 [math.CO], 2024. See p. 22.
R. K. Guy, Catwalks, sandsteps and Pascal pyramids, J. Integer Sequences, Vol. 3 (2000), Article #00.1.6.
Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585.
F. P. Muga II, Extending the Golden Ratio and the Binet-de Moivre Formula, March 2014; Preprint on ResearchGate.
Kival Ngaokrajang, Klauber triangle
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081 [math.CO], 2014.
K. V. S. Sarma and I. V. N. Uma, On Szeged index of standard graphs, International J. of Math. Archive, 3(8), 2012, 3129-3135. - Emeric Deutsch, Aug 07 2014
Stanislav Sýkora, Magnetic Resonance on OEIS, Stan's NMR Blog (Dec 31, 2014), Retrieved Nov 12, 2019.
Eric Weisstein's World of Mathematics, Barbell Graph.
Eric Weisstein's World of Mathematics, Independent Vertex Set.
Eric Weisstein's World of Mathematics, Near-Square Prime.
FORMULA
G.f.: x*(3-x)/(1-x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = A000290(n+1) - 1.
A002378(a(n)) = A002378(n)*A002378(n+1); e.g., A002378(15)=240=12*20. - Charlie Marion, Dec 29 2003
a(n) = A067725(n)/3. - Zerinvary Lajos, Mar 06 2007
a(n) = Sum_{k=1..n} A144396(k). - Zerinvary Lajos, May 11 2007
a(n) = A134582(n+1)/4. - Zerinvary Lajos, Feb 01 2008
A143053(a(n)) = A000290(n+1), for n > 0. - Reinhard Zumkeller, Jul 20 2008
a(n) = Real((n+1+i)^2). - Gerald Hillier, Oct 12 2008
A053186(a(n)) = 2*n. - Reinhard Zumkeller, May 20 2009
a(n) = (n! + (n+1)!)/(n-1)!, n > 0. - Gary Detlefs, Aug 10 2009
a(n) = floor(n^5/(n^3+1)) with offset 1 (a(1)=0). - Gary Detlefs, Feb 11 2010
a(n) = a(n-1) + 2*n + 1 (with a(0)=0). - Vincenzo Librandi, Nov 18 2010
Sum_{n>=1} 1/a(n) = 3/4. - Mohammad K. Azarian, Dec 29 2010
a(n) = 2/(Integral_{x=0..Pi/2} (sin(x))^(n-1)*(cos(x))^3), for n > 0. - Francesco Daddi, Aug 02 2011
a(n) = A002378(n) + floor(sqrt(A002378(n))); pronic number + its root. - Fred Daniel Kline, Sep 16 2011
a(n-1) = A008833(n) * A068310(n) for n > 1. - Reinhard Zumkeller, Nov 26 2011
G.f.: U(0) where U(k) = -1 + (k+1)^2/(1 - x/(x + (k+1)^2/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 19 2012
a(n) = 15*C(n+4,3)*C(n+4,5)/(C(n+4,2)*C(n+4,4)). - Gary Detlefs, Aug 05 2013
a(n) = (n+2)!/((n-1)! + n!), n > 0. - Ivan N. Ianakiev, Nov 11 2013
a(n) = 3*C(n+1,2) - C(n,2) for n >= 0. - Felix P. Muga II, Mar 11 2014
a(n) = (A016742(n+1) - 4)/4 for n >= 0. - Felix P. Muga II, Mar 11 2014
a(-2 - n) = a(n) for all n in Z. - Michael Somos, Aug 07 2014
A253607(a(n)) = 1. - Reinhard Zumkeller, Jan 05 2015
E.g.f.: x*(x + 3)*exp(x). - Ilya Gutkovskiy, Jun 03 2016
For n >= 1, a(n^2 + n - 2) = a(n-1) * a(n). - Miko Labalan, Oct 15 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = 1/4. - Amiram Eldar, Nov 04 2020
From Amiram Eldar, Feb 17 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = 2.
Product_{n>=1} (1 - 1/a(n)) = -sqrt(2)*sin(sqrt(2)*Pi)/Pi. (End)
a(n) = A000290(n+2) - n*2. See Bounded Squares illustration. - Leo Tavares, Oct 05 2021
From Leo Tavares, Oct 10 2021: (Start)
a(n) = A008585(n) + 2*A000217(n-1). See Trapezoids illustration.
2*A005563 = A054000(n+1). See Trapagons illustration.
a(n) = 2*A000217(n) + n. (End)
a(n) = (n+2)!!/(n-2)!! for n > 1. - Jacob Szlachetka, Jan 02 2022
EXAMPLE
G.f. = 3*x + 8*x^2 + 15*x^3 + 24*x^4 + 35*x^5 + 48*x^6 + 63*x^7 + 80*x^8 + ...
MATHEMATICA
Table[n^2 - 1, {n, 42}] (* Zerinvary Lajos, Mar 21 2007 *)
ListCorrelate[{1, 2}, Range[-1, 50], {1, -1}, 0, Plus, Times] (* Harvey P. Dale, Aug 29 2015 *)
Range[60]^2 - 1 (* Eric W. Weisstein, Aug 16 2017 *)
PROG
(PARI) a(n)=n*(n+2) \\ Charles R Greathouse IV, Dec 22 2011
(PARI) concat(0, Vec(x*(3-x)/(1-x)^3 + O(x^90))) \\ Altug Alkan, Oct 22 2015
(Maxima) makelist(n*(n+2), n, 0, 56); /* Martin Ettl, Oct 15 2012 */
(Haskell)
a005563 n = n * (n + 2)
a005563_list = zipWith (*) [0..] [2..] -- Reinhard Zumkeller, Dec 16 2012
(Magma) [n*(n+2): n in [0..60]]; // G. C. Greubel, Mar 29 2024
(SageMath) [n*(n+2) for n in range(61)] # G. C. Greubel, Mar 29 2024
KEYWORD
nonn,easy
EXTENSIONS
Partially edited by Joerg Arndt, Mar 11 2010
More terms from N. J. A. Sloane, Aug 01 2010
STATUS
approved
Number of letters in the US English name of n, excluding spaces and hyphens.
(Formerly M2277)
+0
97
4, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 5, 8, 8, 10, 9, 9, 8, 10, 10, 9, 5, 8, 8, 10, 9, 9, 8, 10, 10, 9, 5, 8, 8, 10, 9, 9, 8, 10, 10, 9, 7, 10, 10, 12, 11, 11, 10, 12, 12, 11, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 10, 13, 13, 15, 14, 14, 13, 15, 15, 14, 13, 16, 16, 18, 18, 17, 17, 19, 18, 18, 16
OFFSET
0,1
COMMENTS
Diane Karloff observes (Nov 27 2007) that repeatedly applying the map k->A005589(k) to any starting value n always leads to 4 (cf. A016037, A133418).
The above observation was previously made in 1972 by R. Schroeppel and R. W. Gosper in HAKMEM (Item 134). - Bartlomiej Pawlik, Jun 12 2023
For terms beyond a(100), this sequence uses the US English style, "one hundred one" (not "one hundred and one"), and the short scale (a billion = 10^9, not 10^12). - M. F. Hasler, Nov 03 2013
Explanation of Diane Karloff's observation above: In many languages there exists a number N, after which all numbers are written with fewer letters than the number itself. N is 4 in English, German and Bulgarian, and 11 in Russian. If in the interval [1,N] there are numbers equal to the number of their letters, then they are attractors. In English and German the only attractor is 4, in Bulgarian 3, in Russian there are two, 3 and 11. In the interval [1,N] there may also exist loops of numbers, for instance 4 and 6 in Bulgarian (6 and 4 letters respectively) or 4,5 and 6 in Russian (6,4 and 5 letters respectively). There are no loops in English, therefore the above observation is true. - Ivan N. Ianakiev, Sep 20 2014
REFERENCES
Problems Drive, Eureka, 37 (1974), 8-11 and 33.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
M. Beeler, R. W. Gosper and R. Schroeppel, Item 134, in Beeler, M., Gosper, R. W. and Schroeppel, R. HAKMEM. MIT AI Memo 239, Feb 29 1972.
Eureka, Problems Drive, Eureka, 37 (1974), 8-11, 32-33, 24-27. (Annotated scanned copy)
Landon Curt Noll, The English Name of a Number.
Eric Weisstein's World of Mathematics, Number.
EXAMPLE
Note that A052360(373373) = 64 whereas a(373373) = 56.
MATHEMATICA
inWords[n_] := Module[{r,
numNames = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"},
teenNames = {"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"},
tensNames = {"", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"},
decimals = {"", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "septillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "quindecillion", "sexdecillion", "septendecillion", "octodecillion", "novemdecillion", "vigintillion", "unvigintillion", "duovigintillion", "trevigintillion", "quattuorvigintillion", "quinvigintillion", "sexvigintillion", "septenvigintillion", "octovigintillion", "novemvigintillion", "trigintillion", "untrigintillion", "duotrigintillion"}},
r = If[# != 0, numNames[[# + 1]] <> "hundred"
(* <> If[#2 != 0||#3 != 0, " and", ""] *),
""] <> Switch[#2, 0, numNames[[#3 + 1]], 1, teenNames[[#3 + 1]], _, tensNames[[#2 + 1]] <> numNames[[#3 + 1]]] & @@@
(PadLeft[ FromDigits /@ Characters@ StringReverse@#, 3] & /@ StringCases[ StringReverse@ IntegerString@ n, RegularExpression["\\d{1, 3}"]]);
StringJoin@ Reverse@ MapThread[ If[# != "", StringJoin[##], ""] &, {r, Take[decimals, Length@ r]} ]]; (* modified for this sequence from what is presented in the link and good to 10^102 -1 *)
f[n_] := StringLength@ inWords@ n; f[0] = 4; Array[f, 84, 0]
(* Robert G. Wilson v, Nov 04 2007 and revised Mar 31 2015, small revision by Ivan Panchenko, Nov 10 2019 *)
a[n_] := StringLength[ StringReplace[ IntegerName[n, "Words"], ", " | " " | "\[Hyphen]" -> ""]]; a /@ Range[0, 83] (* Mma version >= 10, Giovanni Resta, Apr 10 2017 *)
PROG
(PARI) A005589(n, t=[10^12, #"trillion", 10^9, #"billion", 10^6, #"million", 1000, #"thousand", 100, #"hundred"])={ n>99 && forstep( i=1, #t, 2, n<t[i] && next; n=divrem(n, t[i]); n[1]>999 && error("n >= 10^", valuation(t[1], 10)+3, " requires extended 2nd argument"); return( A005589(n[1])+t[i+1]+if( n[2], A005589( n[2] )))); if( n<20, #(["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"][n+1]), #([ "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" ][n\10-1])+if( n%10, A005589(n%10)))} \\ Extension of 2nd arg to larger numbers is easy using the names listed in Mathematica section above. Only the string lengths are required, so it's easy to extend this list further without additional knowledge and without writing out the names. - M. F. Hasler, Jul 26 2011, minor edit on Jun 15 2021
(Python)
from num2words import num2words
def a(n):
x = num2words(n).replace(' and ', '')
l = [chr(i) for i in range(97, 123)]
return sum(1 for i in x if i in l)
print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 05 2017
CROSSREFS
See A362123 for another version.
Cf. A007208 (analog for German).
KEYWORD
nonn,word,nice
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org) and Allan C. Wechsler, Mar 20 2000
Erroneous b-file deleted by N. J. A. Sloane, Sep 25 2008
More than the usual number of terms are shown in the DATA field to avoid confusion with A362123. - N. J. A. Sloane, Apr 20 2023
STATUS
approved
Numbers whose base-3 representation contains no 2.
(Formerly M2353)
+0
239
0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 243, 244, 246, 247, 252, 253, 255, 256, 270, 271, 273, 274, 279, 280, 282, 283, 324, 325, 327, 328, 333, 334, 336, 337, 351, 352
OFFSET
1,3
COMMENTS
3 does not divide binomial(2s, s) if and only if s is a member of this sequence, where binomial(2s, s) = A000984(s) are the central binomial coefficients.
This is the lexicographically earliest increasing sequence of nonnegative numbers that contains no arithmetic progression of length 3. - Robert Craigen (craigenr(AT)cc.umanitoba.ca), Jan 29 2001
In the notation of A185256 this is the Stanley Sequence S(0,1). - N. J. A. Sloane, Mar 19 2010
Complement of A074940. - Reinhard Zumkeller, Mar 23 2003
Sums of distinct powers of 3. - Ralf Stephan, Apr 27 2003
Numbers n such that central trinomial coefficient A002426(n) == 1 (mod 3). - Emeric Deutsch and Bruce E. Sagan, Dec 04 2003
A039966(a(n)+1) = 1; A104406(n) = number of terms <= n.
Subsequence of A125292; A125291(a(n)) = 1 for n>1. - Reinhard Zumkeller, Nov 26 2006
Also final value of n - 1 written in base 2 and then read in base 3 and with finally the result translated in base 10. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 23 2007
a(n) modulo 2 is the Thue-Morse sequence A010060. - Dennis Tseng, Jul 16 2009
Also numbers such that the balanced ternary representation is the same as the base 3 representation. - Alonso del Arte, Feb 25 2011
Fixed point of the morphism: 0 -> 01; 1 -> 34; 2 -> 67; ...; n -> (3n)(3n+1), starting from a(1) = 0. - Philippe Deléham, Oct 22 2011
It appears that this sequence lists the values of n which satisfy the condition sum(binomial(n, k)^(2*j), k = 0..n) mod 3 <> 0, for any j, with offset 0. See Maple code. - Gary Detlefs, Nov 28 2011
Also, it follows from the above comment by Philippe Lallouet that the sequence must be generated by the rules: a(1) = 0, and if m is in the sequence then so are 3*m and 3*m + 1. - L. Edson Jeffery, Nov 20 2015
Add 1 to each term and we get A003278. - N. J. A. Sloane, Dec 01 2019
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section E10, pp. 317-323.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
David W. Wilson, Table of n, a(n) for n = 1..10000 (first 1024 terms from T. D. Noe)
J.-P. Allouche, G.-N. Han, and J. Shallit, On some conjectures of P. Barry, arXiv:2006.08909 [math.NT], 2020.
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
J.-P. Allouche, J. Shallit and G. Skordev, Self-generating sets, integers with missing blocks and substitutions, Discrete Math. 292 (2005) 1-15.
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.]
Megumi Asada, Bruce Fang, Eva Fourakis, Sarah Manski, Nathan McNew, Steven J. Miller, Gwyneth Moreland, Ajmain Yamin, and Sindy Xin Zhang, Avoiding 3-Term Geometric Progressions in Hurwitz Quaternions, Williams College (2023).
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
Noam Benson-Tilsen, Samuel Brock, Brandon Faunce, Monish Kumar, Noah Dokko Stein, and Joshua Zelinsky, Total Difference Labeling of Regular Infinite Graphs, arXiv:2107.11706 [math.CO], 2021.
Raghavendra Bhat, Cristian Cobeli, and Alexandru Zaharescu, Filtered rays over iterated absolute differences on layers of integers, arXiv:2309.03922 [math.NT], 2023. See page 16.
Matvey Borodin, Hannah Han, Kaylee Ji, Tanya Khovanova, Alexander Peng, David Sun, Isabel Tu, Jason Yang, William Yang, Kevin Zhang, and Kevin Zhao, Variants of Base 3 over 2, arXiv:1901.09818 [math.NT], 2019.
Ben Chen, Richard Chen, Joshua Guo, Tanya Khovanova, Shane Lee, Neil Malur, Nastia Polina, Poonam Sahoo, Anuj Sakarda, Nathan Sheffield, and Armaan Tipirneni, On Base 3/2 and its Sequences, arXiv:1808.04304 [math.NT], 2018.
Karl Dilcher and Larry Ericksen, Hyperbinary expansions and Stern polynomials, Elec. J. Combin, Vol. 22 (2015), Article P2.24.
P. Erdős, V. Lev, G. Rauzy, C. Sandor, and A. Sarkozy, Greedy algorithm, arithmetic progressions, subset sums and divisibility, Discrete Math., Vol. 200, No. 1-3 (1999), pp. 119-135 (see Table 1). alternate link.
Joseph L. Gerver and L. Thomas Ramsey, Sets of integers with no long arithmetic progressions generated by the greedy algorithm, Math. Comp., Vol. 33, No. 148 (1979), pp. 1353-1359.
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 45.
Kathrin Kostorz, Robert W. Hölzel and Katharina Krischer, Distributed coupling complexity in a weakly coupled oscillatory network with associative properties, New J. Phys., Vol. 15 (2013), #083010; doi:10.1088/1367-2630/15/8/083010.
Clark Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., Vol. 274, Vol. 1-3 (2004), pp. 147-160.
John W. Layman, Some Properties of a Certain Nonaveraging Sequence, J. Integer Sequences, Vol. 2 (1999), Article 99.1.3.
Manfred. Madritsch and Stephan Wagner, A central limit theorem for integer partitions, Monatsh. Math., Vol. 161, No. 1 (2010), pp. 85-114.
Richard A. Moy and David Rolnick, Novel structures in Stanley sequences, Discrete Math., Vol. 339, No. 2 (2016), pp. 689-698; arXiv preprint, arXiv:1502.06013 [math.CO], 2015.
A. M. Odlyzko and R. P. Stanley, Some curious sequences constructed with the greedy algorithm, 1978, remark 1 (PDF, PS, TeX).
Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228. [?Broken link]
Paul Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228.
David Rolnick and Praveen S. Venkataramana, On the growth of Stanley sequences, Discrete Math., Vol. 338, No. 11 (2015), pp. 1928-1937, see p. 1930; arXiv preprint, arXiv:1408.4710 [math.CO], 2014.
Ralf Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
Zoran Sunic, Tree morphisms, transducers and integer sequences, arXiv:math/0612080 [math.CO], 2006.
B. Vasic, K. Pedagani and M. Ivkovic, High-rate girth-eight low-density parity-check codes on rectangular integer lattices, IEEE Transactions on Communications, Vol. 52, Issue 8 (2004), pp. 1248-1252.
Eric Weisstein's World of Mathematics, Central Binomial Coefficient.
FORMULA
a(n) = A005823(n)/2 = A003278(n)-1 = A033159(n)-2 = A033162(n)-3.
Numbers n such that the coefficient of x^n is > 0 in prod (k >= 0, 1 + x^(3^k)). - Benoit Cloitre, Jul 29 2003
a(n+1) = Sum_{k=0..m} b(k)* 3^k and n = Sum( b(k)* 2^k ).
a(2n+1) = 3a(n+1), a(2n+2) = a(2n+1) + 1, a(0) = 0.
a(n+1) = 3*a(floor(n/2)) + n - 2*floor(n/2). - Ralf Stephan, Apr 27 2003
G.f.: (x/(1-x)) * Sum_{k>=0} 3^k*x^2^k/(1+x^2^k). - Ralf Stephan, Apr 27 2003
a(n) = Sum_{k = 1..n-1} (1 + 3^A007814(k)) / 2. - Philippe Deléham, Jul 09 2005
From Reinhard Zumkeller, Mar 02 2008: (Start)
A081603(a(n)) = 0.
If the offset were changed to zero, then: a(0) = 0, a(n+1) = f(a(n) + 1, f(a(n)+1) where f(x, y) = if x < 3 and x <> 2 then y else if x mod 3 = 2 then f(y+1, y+1) else f(floor(x/3), y). (End)
With offset a(0) = 0: a(n) = Sum_{k>=0} A030308(n,k)*3^k. - Philippe Deléham, Oct 15 2011
a(2^n) = A003462(n). - Philippe Deléham, Jun 06 2015
We have liminf_{n->infinity} a(n)/n^(log(3)/log(2)) = 1/2 and limsup_{n->infinity} a(n)/n^(log(3)/log(2)) = 1. - Gheorghe Coserea, Sep 13 2015
a(2^k+m) = a(m) + 3^k with 1 <= m <= 2^k and 1 <= k, a(1)=0, a(2)=1. - Paul Weisenhorn, Mar 22 2020
Sum_{n>=2} 1/a(n) = 2.682853110966175430853916904584699374821677091415714815171756609672281184705... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 12 2022
A065361(a(n)) = n-1. - Rémy Sigrist, Feb 06 2023
a(n) ≍ n^k, where k = log 3/log 2 = 1.5849625007. (I believe the constant varies from 1/2 to 1.) - Charles R Greathouse IV, Mar 29 2024
EXAMPLE
a(6) = 12 because 6 = 0*2^0 + 1*2^1 + 1*2^2 = 2+4 and 12 = 0*3^0 + 1*3^1 + 1*3^2 = 3 + 9.
This sequence regarded as a triangle with rows of lengths 1, 1, 2, 4, 8, 16, ...:
0
1
3, 4
9, 10, 12, 13
27, 28, 30, 31, 36, 37, 39, 40
81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121
... - Philippe Deléham, Jun 06 2015
MAPLE
t := (j, n) -> add(binomial(n, k)^j, k=0..n):
for i from 1 to 400 do
if(t(4, i) mod 3 <>0) then print(i) fi
od; # Gary Detlefs, Nov 28 2011
# alternative Maple program:
a:= proc(n) option remember: local k, m:
if n=1 then 0 elif n=2 then 1 elif n>2 then k:=floor(log[2](n-1)): m:=n-2^k: procname(m)+3^k: fi: end proc:
seq(a(n), n=1.. 20); # Paul Weisenhorn, Mar 22 2020
# third Maple program:
a:= n-> `if`(n=1, 0, irem(n-1, 2, 'q')+3*a(q+1)):
seq(a(n), n=1..100); # Alois P. Heinz, Jan 26 2022
MATHEMATICA
Table[FromDigits[IntegerDigits[k, 2], 3], {k, 60}]
Select[Range[0, 400], DigitCount[#, 3, 2] == 0 &] (* Harvey P. Dale, Jan 04 2012 *)
Join[{0}, Accumulate[Table[(3^IntegerExponent[n, 2] + 1)/2, {n, 57}]]] (* IWABUCHI Yu(u)ki, Aug 01 2012 *)
FromDigits[#, 3]&/@Tuples[{0, 1}, 7] (* Harvey P. Dale, May 10 2019 *)
PROG
(PARI) A=vector(100); for(n=2, #A, A[n]=if(n%2, 3*A[n\2+1], A[n-1]+1)); A \\ Charles R Greathouse IV, Jul 24 2012
(PARI) is(n)=while(n, if(n%3>1, return(0)); n\=3); 1 \\ Charles R Greathouse IV, Mar 07 2013
(PARI) a(n) = fromdigits(binary(n-1), 3); \\ Gheorghe Coserea, Jun 15 2018
(Haskell)
a005836 n = a005836_list !! (n-1)
a005836_list = filter ((== 1) . a039966) [0..]
-- Reinhard Zumkeller, Jun 09 2012, Sep 29 2011
(Python)
def A005836(n):
return int(format(n-1, 'b'), 3) # Chai Wah Wu, Jan 04 2015
(Julia)
function a(n)
m, r, b = n, 0, 1
while m > 0
m, q = divrem(m, 2)
r += b * q
b *= 3
end
r end; [a(n) for n in 0:57] |> println # Peter Luschny, Jan 03 2021
CROSSREFS
Cf. A039966 (characteristic function).
For generating functions Product_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
Row 3 of array A104257.
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).
See also A000452.
KEYWORD
nonn,nice,easy,base,tabf
EXTENSIONS
Offset corrected by N. J. A. Sloane, Mar 02 2008
Edited by the Associate Editors of the OEIS, Apr 07 2009
STATUS
approved

Search completed in 1.270 seconds