cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 53 results. Next

A130520 a(n) = Sum_{k=0..n} floor(k/5). (Partial sums of A002266.)

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 7, 9, 11, 13, 15, 18, 21, 24, 27, 30, 34, 38, 42, 46, 50, 55, 60, 65, 70, 75, 81, 87, 93, 99, 105, 112, 119, 126, 133, 140, 148, 156, 164, 172, 180, 189, 198, 207, 216, 225, 235, 245, 255, 265, 275, 286, 297, 308, 319, 330, 342, 354, 366
Offset: 0

Views

Author

Hieronymus Fischer, Jun 01 2007

Keywords

Comments

Complementary with A130483 regarding triangular numbers, in that A130483(n) + 5*a(n) = n*(n+1)/2 = A000217(n).
Given a sequence b(n) defined by variables b(0) to b(5) and recursion b(n) = -(b(n-6) * a(n-2) * (b(n-4) * b(n-2)^3 - b(n-3)^3 * b(n-1)) - b(n-5) * b(n-3) * b(n-1) * (b(n-5) * b(n-2)^2 - b(n-4)^2 * b(n-1)))/(b(n-4) * (b(n-5) * b(n-3)^3 - b(n-4)^3 * b(n-2))). The denominator of b(n+1) has a factor of (b(1) * b(3)^3 - b(2)^3 * b(4))^a(n+1). For example, if b(0) = 2, b(1) = b(2) = b(3) = 1, b(4) = 1+x, b(5) = 4, then the denominator of b(n+1) is x^a(n+1). - Michael Somos, Nov 15 2023

Crossrefs

Programs

  • GAP
    List([0..70], n-> Int((n-1)*(n-2)/10)); # G. C. Greubel, Aug 31 2019
  • Magma
    [Round(n*(n-3)/10): n in [0..70]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    seq(floor((n-1)*(n-2)/10), n=0..70); # G. C. Greubel, Aug 31 2019
  • Mathematica
    Accumulate[Floor[Range[0,70]/5]] (* Harvey P. Dale, May 25 2016 *)
  • PARI
    a(n) = sum(k=0, n, k\5); \\ Michel Marcus, May 13 2016
    
  • Sage
    [floor((n-1)*(n-2)/10) for n in (0..70)] # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = floor(n/5)*(2*n - 3 - 5*floor(n/5))/2.
a(n) = A002266(n)*(2*n - 3 - 5*A002266(n))/2.
a(n) = A002266(n)*(n -3 +A010874(n))/2.
G.f.: x^5/((1-x^5)*(1-x)^2) = x^5/( (1+x+x^2+x^3+x^4)*(1-x)^3 ).
a(n) = floor((n-1)*(n-2)/10). - Mitch Harris, Sep 08 2008
a(n) = round(n*(n-3)/10) = ceiling((n+1)*(n-4)/10) = round((n^2 - 3*n - 1)/10). - Mircea Merca, Nov 28 2010
a(n) = A008732(n-5), n > 4. - R. J. Mathar, Nov 22 2008
a(n) = a(n-5) + n - 4, n > 4. - Mircea Merca, Nov 28 2010
a(5n) = A000566(n), a(5n+1) = A005476(n), a(5n+2) = A005475(n), a(5n+3) = A147875(n), a(5n+4) = A028895(n). - Philippe Deléham, Mar 26 2013
From Amiram Eldar, Sep 17 2022: (Start)
Sum_{n>=5} 1/a(n) = 518/45 - 2*sqrt(2*(sqrt(5)+5))*Pi/3.
Sum_{n>=5} (-1)^(n+1)/a(n) = 8*sqrt(5)*arccoth(3/sqrt(5))/3 + 92*log(2)/15 - 418/45. (End)

A004526 Nonnegative integers repeated, floor(n/2).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36
Offset: 0

Views

Author

Keywords

Comments

Number of elements in the set {k: 1 <= 2k <= n}.
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).
Dimension of the space of weight 1 modular forms for Gamma_1(n+1).
Number of ways 2^n is expressible as r^2 - s^2 with s > 0. Proof: (r+s) and (r-s) both should be powers of 2, even and distinct hence a(2k) = a(2k-1) = (k-1) etc. - Amarnath Murthy, Sep 20 2002
Lengths of sides of Ulam square spiral; i.e., lengths of runs of equal terms in A063826. - Donald S. McDonald, Jan 09 2003
Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = a(n) + 1 for all n >= 0. Partial sums are A002620 (Quarter-squares). - Rick L. Shepherd, Feb 27 2004
a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - Paul Barry, Jan 13 2005
Number of partitions of n+1 into two distinct (nonzero) parts. Example: a(8) = 4 because we have [8,1],[7,2],[6,3] and [5,4]. - Emeric Deutsch, Apr 14 2006
Complement of A000035, since A000035(n)+2*a(n) = n. Also equal to the partial sums of A000035. - Hieronymus Fischer, Jun 01 2007
Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n-2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (-1)^n det(A). - Milan Janjic, Jan 24 2010
From Clark Kimberling, Mar 10 2011: (Start)
Let RT abbreviate rank transform (A187224). Then
RT(this sequence) = A187484;
RT(this sequence without 1st term) = A026371;
RT(this sequence without 1st 2 terms) = A026367;
RT(this sequence without 1st 3 terms) = A026363. (End)
The diameter (longest path) of the n-cycle. - Cade Herron, Apr 14 2011
For n >= 3, a(n-1) is the number of two-color bracelets of n beads, three of them are black, having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Pelesko (2004) refers erroneously to this sequence instead of A008619. - M. F. Hasler, Jul 19 2012
Number of degree 2 irreducible characters of the dihedral group of order 2(n+1). - Eric M. Schmidt, Feb 12 2013
For n >= 3 the sequence a(n-1) is the number of non-congruent regions with infinite area in the exterior of a regular n-gon with all diagonals drawn. See A217748. - Martin Renner, Mar 23 2013
a(n) is the number of partitions of 2n into exactly 2 even parts. a(n+1) is the number of partitions of 2n into exactly 2 odd parts. This just rephrases the comment of E. Deutsch above. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct rectangles and square in a regular n-gon is a(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link. - Kival Ngaokrajang, Jun 25 2013
x-coordinate from the image of the point (0,-1) after n reflections across the lines y = n and y = x respectively (alternating so that one reflection is applied on each step): (0,-1) -> (0,1) -> (1,0) -> (1,2) -> (2,1) -> (2,3) -> ... . - Wesley Ivan Hurt, Jul 12 2013
a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n-1) is the number of partitions of 2n into exactly two distinct even parts, n > 0. - Wesley Ivan Hurt, Jul 21 2013
a(n) is the number of permutations of length n avoiding 213, 231 and 312, or avoiding 213, 312 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Also a(n) is the number of different patterns of 2-color, 2-partition of n. - Ctibor O. Zizka, Nov 19 2014
Minimum in- and out-degree for a directed K_n (see link). - Jon Perry, Nov 22 2014
a(n) is also the independence number of the triangular graph T(n). - Luis Manuel Rivera Martínez, Mar 12 2015
For n >= 3, a(n+4) is the least positive integer m such that every m-element subset of {1,2,...,n} contains distinct i, j, k with i + j = k (equivalently, with i - j = k). - Rick L. Shepherd, Jan 24 2016
More generally, the ordinary generating function for the integers repeated k times is x^k/((1 - x)(1 - x^k)). - Ilya Gutkovskiy, Mar 21 2016
a(n) is the number of numbers of the form F(i)*F(j) between F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers). - Clark Kimberling, May 02 2016
The arithmetic function v_2(n,2) as defined in A289187. - Robert Price, Aug 22 2017
a(n) is also the total domination number of the (n-3)-gear graph. - Eric W. Weisstein, Apr 07 2018
Consider the numbers 1, 2, ..., n; a(n) is the largest integer t such that these numbers can be arranged in a row so that all consecutive terms differ by at least t. Example: a(6) = a(7) = 3, because of respectively (4, 1, 5, 2, 6, 3) and (1, 5, 2, 6, 3, 7, 4) (see link BMO - Problem 2). - Bernard Schott, Mar 07 2020
a(n-1) is also the number of integer-sided triangles whose sides a < b < c are in arithmetic progression with a middle side b = n (see A307136). Example, for b = 4, there exists a(3) = 1 such triangle corresponding to Pythagorean triple (3, 4, 5). For the triples, miscellaneous properties and references, see A336750. - Bernard Schott, Oct 15 2020
For n >= 1, a(n-1) is the greatest remainder on division of n by any k in 1..n. - David James Sycamore, Sep 05 2021
Number of incongruent right triangles that can be formed from the vertices of a regular n-gon is given by a(n/2) for n even. For n odd such number is zero. For a regular n-gon, the number of incongruent triangles formed from its vertices is given by A069905(n). The number of incongruent acute triangles is given by A005044(n). The number of incongruent obtuse triangles is given by A008642(n-4) for n > 3 otherwise 0, with offset 0. - Frank M Jackson, Nov 26 2022
The inverse binomial transform is 0, 0, 1, -2, 4, -8, 16, -32, ... (see A122803). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ...
		

References

  • G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).
  • Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1989, page 77 (partitions of n into at most 2 parts).

Crossrefs

a(n+2) = A008619(n). See A008619 for more references.
A001477(n) = a(n+1)+a(n). A000035(n) = a(n+1)-A002456(n).
a(n) = A008284(n, 2), n >= 1.
Zero followed by the partial sums of A000035.
Column 2 of triangle A094953. Second row of A180969.
Partial sums: A002620. Other related sequences: A010872, A010873, A010874.
Cf. similar sequences of the integers repeated k times: A001477 (k = 1), this sequence (k = 2), A002264 (k = 3), A002265 (k = 4), A002266 (k = 5), A152467 (k = 6), A132270 (k = 7), A132292 (k = 8), A059995 (k = 10).
Cf. A289187, A139756 (binomial transf).

Programs

  • Haskell
    a004526 = (`div` 2)
    a004526_list = concatMap (\x -> [x, x]) [0..]
    -- Reinhard Zumkeller, Jul 27 2012
    
  • Magma
    [Floor(n/2): n in [0..100]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    A004526 := n->floor(n/2); seq(floor(i/2),i=0..50);
  • Mathematica
    Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] (* Stefan Steinerberger, Apr 02 2006 *)
    f[n_] := If[OddQ[n], (n - 1)/2, n/2]; Array[f, 74, 0] (* Robert G. Wilson v, Apr 20 2012 *)
    With[{c=Range[0,40]},Riffle[c,c]] (* Harvey P. Dale, Aug 26 2013 *)
    CoefficientList[Series[x^2/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
    LinearRecurrence[{1, 1, -1}, {0, 0, 1}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
    Floor[Range[0, 40]/2] (* Eric W. Weisstein, Apr 07 2018 *)
  • Maxima
    makelist(floor(n/2),n,0,50); /* Martin Ettl, Oct 17 2012 */
    
  • PARI
    a(n)=n\2 /* Jaume Oliver Lafont, Mar 25 2009 */
    
  • PARI
    x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x-1)^2))) \\ Altug Alkan, Mar 21 2016
    
  • Python
    def a(n): return n//2
    print([a(n) for n in range(74)]) # Michael S. Branicky, Apr 30 2022
  • Sage
    def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # Michael Somos, Jul 03 2014
    
  • Sage
    def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # Michael Somos, Jul 03 2014
    

Formula

G.f.: x^2/((1+x)*(x-1)^2).
a(n) = floor(n/2).
a(n) = ceiling((n+1)/2). - Eric W. Weisstein, Jan 11 2024
a(n) = 1 + a(n-2).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(2*n) = a(2*n+1) = n.
a(n+1) = n - a(n). - Henry Bottomley, Jul 25 2001
For n > 0, a(n) = Sum_{i=1..n} (1/2)/cos(Pi*(2*i-(1-(-1)^n)/2)/(2*n+1)). - Benoit Cloitre, Oct 11 2002
a(n) = (2*n-1)/4 + (-1)^n/4; a(n+1) = Sum_{k=0..n} k*(-1)^(n+k). - Paul Barry, May 20 2003
E.g.f.: ((2*x-1)*exp(x) + exp(-x))/4. - Paul Barry, Sep 03 2003
G.f.: (1/(1-x)) * Sum_{k >= 0} t^2/(1-t^4) where t = x^2^k. - Ralf Stephan, Feb 24 2004
a(n+1) = A000120(A001045(n)). - Paul Barry, Jan 13 2005
a(n) = (n-(1-(-1)^n)/2)/2 = (1/2)*(n-|sin(n*Pi/2)|). Likewise: a(n) = (n-A000035(n))/2. Also: a(n) = Sum_{k=0..n} A000035(k). - Hieronymus Fischer, Jun 01 2007
The expression floor((x^2-1)/(2*x)) (x >= 1) produces this sequence. - Mohammad K. Azarian, Nov 08 2007; corrected by M. F. Hasler, Nov 17 2008
a(n+1) = A002378(n) - A035608(n). - Reinhard Zumkeller, Jan 27 2010
a(n+1) = A002620(n+1) - A002620(n) = floor((n+1)/2)*ceiling((n+1)/2) - floor(n^2/4). - Jonathan Vos Post, May 20 2010
For n >= 2, a(n) = floor(log_2(2^a(n-1) + 2^a(n-2))). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 24 2010
A001057(n-1) = (-1)^n*a(n), n > 0. - M. F. Hasler, Jul 19 2012
a(n) = A008615(n) + A002264(n). - Reinhard Zumkeller, Apr 28 2014
Euler transform of length 2 sequence [1, 1]. - Michael Somos, Jul 03 2014

Extensions

Partially edited by Joerg Arndt, Mar 11 2010, and M. F. Hasler, Jul 19 2012

A010888 Digital root of n (repeatedly add the digits of n until a single digit is reached).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5
Offset: 0

Views

Author

Keywords

Comments

This is sometimes also called the additive digital root of n.
n mod 9 (A010878) is a very similar sequence.
Partial sums are given by A130487(n-1) + n (for n > 0). - Hieronymus Fischer, Jun 08 2007
Decimal expansion of 13717421/111111111 is 0.123456789123456789123456789... with period 9. - Eric Desbiaux, May 19 2008
Decimal expansion of 13717421 / 1111111110 = 0.0[123456789] (periodic) - Daniel Forgues, Feb 27 2017
a(A005117(n)) < 9. - Reinhard Zumkeller, Mar 30 2010
My friend Jahangeer Kholdi has found that 19 is the smallest prime p such that for each number n, a(p*n) = a(n). In fact we have: a(m*n) = a(a(m)*a(n)) so all numbers with digital root 1 (numbers of the form 9k + 1) have this property. See comment lines of A017173. Also we have a(m+n) = a(a(m) + a(n)). - Farideh Firoozbakht, Jul 23 2010

Examples

			The digits of 37 are 3 and 7, and 3 + 7 = 10. And the digits of 10 are 1 and 0, and 1 + 0 = 1, so a(37) = 1.
		

References

  • Martin Gardner, Mathematics, Magic and Mystery, 1956.

Crossrefs

Cf. A007953, A007954, A031347, A113217, A113218, A010878 (n mod 9), A010872, A010873, A010874, A010875, A010876, A010877, A010879, A004526, A002264, A002265, A002266, A017173, A031286 (additive persistence of n), (multiplicative digital root of n), A031346 (multiplicative persistence of n).

Programs

Formula

If n = 0 then a(n) = 0; otherwise a(n) = (n reduced mod 9), but if the answer is 0 change it to 9.
Equivalently, if n = 0 then a(n) = 0, otherwise a(n) = (n - 1 reduced mod 9) + 1.
If the initial 0 term is ignored, the sequence is periodic with period 9.
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010878(n-1) + 1 (for n > 0).
G.f.: g(x) = x*(Sum_{k = 0..8}(k+1)*x^k)/(1 - x^9). Also: g(x) = x(9x^10 - 10x^9 + 1)/((1 - x^9)(1 - x)^2). (End)
a(n) = n - 9*floor((n-1)/9), for n > 0. - José de Jesús Camacho Medina, Nov 10 2014

A001105 a(n) = 2*n^2.

Original entry on oeis.org

0, 2, 8, 18, 32, 50, 72, 98, 128, 162, 200, 242, 288, 338, 392, 450, 512, 578, 648, 722, 800, 882, 968, 1058, 1152, 1250, 1352, 1458, 1568, 1682, 1800, 1922, 2048, 2178, 2312, 2450, 2592, 2738, 2888, 3042, 3200, 3362, 3528, 3698, 3872, 4050, 4232, 4418
Offset: 0

Views

Author

Bernd.Walter(AT)frankfurt.netsurf.de

Keywords

Comments

Number of edges of the complete bipartite graph of order 3n, K_{n,2n}. - Roberto E. Martinez II, Jan 07 2002
"If each period in the periodic system ends in a rare gas ..., the number of elements in a period can be found from the ordinal number n of the period by the formula: L = ((2n+3+(-1)^n)^2)/8..." - Nature, Jun 09 1951; Nature 411 (Jun 07 2001), p. 648. This produces the present sequence doubled up.
Let z(1) = i = sqrt(-1), z(k+1) = 1/(z(k)+2i); then a(n) = (-1)*Imag(z(n+1))/Real(z(n+1)). - Benoit Cloitre, Aug 06 2002
Maximum number of electrons in an atomic shell with total quantum number n. Partial sums of A016825. - Jeremy Gardiner, Dec 19 2004
Arithmetic mean of triangular numbers in pairs: (1+3)/2, (6+10)/2, (15+21)/2, ... . - Amarnath Murthy, Aug 05 2005
These numbers form a pattern on the Ulam spiral similar to that of the triangular numbers. - G. Roda, Oct 20 2010
Integral areas of isosceles right triangles with rational legs (legs are 2n and triangles are nondegenerate for n > 0). - Rick L. Shepherd, Sep 29 2009
Even squares divided by 2. - Omar E. Pol, Aug 18 2011
Number of stars when distributed as in the U.S.A. flag: n rows with n+1 stars and, between each pair of these, one row with n stars (i.e., n-1 of these), i.e., n*(n+1)+(n-1)*n = 2*n^2 = A001105(n). - César Eliud Lozada, Sep 17 2012
Apparently the number of Dyck paths with semilength n+3 and an odd number of peaks and the central peak having height n-3. - David Scambler, Apr 29 2013
Sum of the partition parts of 2n into exactly two parts. - Wesley Ivan Hurt, Jun 01 2013
Consider primitive Pythagorean triangles (a^2 + b^2 = c^2, gcd(a, b) = 1) with hypotenuse c (A020882) and respective odd leg a (A180620); sequence gives values c-a, sorted with duplicates removed. - K. G. Stier, Nov 04 2013
Number of roots in the root systems of type B_n and C_n (for n > 1). - Tom Edgar, Nov 05 2013
Area of a square with diagonal 2n. - Wesley Ivan Hurt, Jun 18 2014
This sequence appears also as the first and second member of the quartet [a(n), a(n), p(n), p(n)] of the square of [n, n, n+1, n+1] in the Clifford algebra Cl_2 for n >= 0. p(n) = A046092(n). See an Oct 15 2014 comment on A147973 where also a reference is given. - Wolfdieter Lang, Oct 16 2014
a(n) are the only integers m where (A000005(m) + A000203(m)) = (number of divisors of m + sum of divisors of m) is an odd number. - Richard R. Forberg, Jan 09 2015
a(n) represents the first term in a sum of consecutive integers running to a(n+1)-1 that equals (2n+1)^3. - Patrick J. McNab, Dec 24 2016
Also the number of 3-cycles in the (n+4)-triangular honeycomb obtuse knight graph. - Eric W. Weisstein, Jul 29 2017
Also the Wiener index of the n-cocktail party graph for n > 1. - Eric W. Weisstein, Sep 07 2017
Numbers represented as the palindrome 242 in number base B including B=2 (binary), 3 (ternary) and 4: 242(2)=18, 242(3)=32, 242(4)=50, ... 242(9)=200, 242(10)=242, ... - Ron Knott, Nov 14 2017
a(n) is the square of the hypotenuse of an isosceles right triangle whose sides are equal to n. - Thomas M. Green, Aug 20 2019
The sequence contains all odd powers of 2 (A004171) but no even power of 2 (A000302). - Torlach Rush, Oct 10 2019
From Bernard Schott, Aug 31 2021 and Sep 16 2021: (Start)
Apart from 0, integers such that the number of even divisors (A183063) is odd.
Proof: every n = 2^q * (2k+1), q, k >= 0, then 2*n^2 = 2^(2q+1) * (2k+1)^2; now, gcd(2, 2k+1) = 1, tau(2^(2q+1)) = 2q+2 and tau((2k+1)^2) = 2u+1 because (2k+1)^2 is square, so, tau(2*n^2) = (2q+2) * (2u+1).
The 2q+2 divisors of 2^(2q+1) are {1, 2, 2^2, 2^3, ..., 2^(2q+1)}, so 2^(2q+1) has 2q+1 even divisors {2^1, 2^2, 2^3, ..., 2^(2q+1)}.
Conclusion: these 2q+1 even divisors create with the 2u+1 odd divisors of (2k+1)^2 exactly (2q+1)*(2u+1) even divisors of 2*n^2, and (2q+1)*(2u+1) is odd. (End)
a(n) with n>0 are the numbers with period length 2 for Bulgarian and Mancala solitaire. - Paul Weisenhorn, Jan 29 2022
Number of points at L1 distance = 2 from any given point in Z^n. - Shel Kaphan, Feb 25 2023
Integer that multiplies (h^2)/(m*L^2) to give the energy of a 1-D quantum mechanical particle in a box whenever it is an integer multiple of (h^2)/(m*L^2), where h = Planck's constant, m = mass of particle, and L = length of box. - A. Timothy Royappa, Mar 14 2025

Examples

			a(3) = 18; since 2(3) = 6 has 3 partitions with exactly two parts: (5,1), (4,2), (3,3).  Adding all the parts, we get: 1 + 2 + 3 + 3 + 4 + 5 = 18. - _Wesley Ivan Hurt_, Jun 01 2013
		

References

  • Peter Atkins, Julio De Paula, and James Keeler, "Atkins' Physical Chemistry," Oxford University Press, 2023, p. 31.
  • Arthur Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.
  • Martin Gardner, The Colossal Book of Mathematics, Classic Puzzles, Paradoxes and Problems, Chapter 2 entitled "The Calculus of Finite Differences," W. W. Norton and Company, New York, 2001, pages 12-13.
  • L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 44.
  • Alain M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000, p. 213.

Crossrefs

Cf. numbers of the form n*(n*k-k+4)/2 listed in A226488.
Cf. A058331 and A247375. - Bruno Berselli, Sep 16 2014
Cf. A194715 (4-cycles in the triangular honeycomb obtuse knight graph), A290391 (5-cycles), A290392 (6-cycles). - Eric W. Weisstein, Jul 29 2017
Integers such that: this sequence (the number of even divisors is odd), A028982 (the number of odd divisors is odd), A028983 (the number of odd divisors is even), A183300 (the number of even divisors is even).

Programs

Formula

a(n) = (-1)^(n+1) * A053120(2*n, 2).
G.f.: 2*x*(1+x)/(1-x)^3.
a(n) = A100345(n, n).
Sum_{n>=1} 1/a(n) = Pi^2/12 =A072691. [Jolley eq. 319]. - Gary W. Adamson, Dec 21 2006
a(n) = A049452(n) - A033991(n). - Zerinvary Lajos, Jun 12 2007
a(n) = A016742(n)/2. - Zerinvary Lajos, Jun 20 2008
a(n) = 2 * A000290(n). - Omar E. Pol, May 14 2008
a(n) = 4*n + a(n-1) - 2, n > 0. - Vincenzo Librandi
a(n) = A002378(n-1) + A002378(n). - Joerg M. Schuetze (joerg(AT)cyberheim.de), Mar 08 2010 [Corrected by Klaus Purath, Jun 18 2020]
a(n) = A176271(n,k) + A176271(n,n-k+1), 1 <= k <= n. - Reinhard Zumkeller, Apr 13 2010
a(n) = A007607(A000290(n)). - Reinhard Zumkeller, Feb 12 2011
For n > 0, a(n) = 1/coefficient of x^2 in the Maclaurin expansion of 1/(cos(x)+n-1). - Francesco Daddi, Aug 04 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Artur Jasinski, Nov 24 2011
a(n) = A070216(n,n) for n > 0. - Reinhard Zumkeller, Nov 11 2012
a(n) = A014132(2*n-1,n) for n > 0. - Reinhard Zumkeller, Dec 12 2012
a(n) = A000217(n) + A000326(n). - Omar E. Pol, Jan 11 2013
(a(n) - A000217(k))^2 = A000217(2*n-1-k)*A000217(2*n+k) + n^2, for all k. - Charlie Marion, May 04 2013
a(n) = floor(1/(1-cos(1/n))), n > 0. - Clark Kimberling, Oct 08 2014
a(n) = A251599(3*n-1) for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = Sum_{j=1..n} Sum_{i=1..n} ceiling((i+j-n+4)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = A002061(n+1) + A165900(n). - Torlach Rush, Feb 21 2019
E.g.f.: 2*exp(x)*x*(1 + x). - Stefano Spezia, Oct 12 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/24 (A222171). - Amiram Eldar, Jul 03 2020
From Amiram Eldar, Feb 03 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = sqrt(2)*sinh(Pi/sqrt(2))/Pi.
Product_{n>=1} (1 - 1/a(n)) = sqrt(2)*sin(Pi/sqrt(2))/Pi. (End)

A010879 Final digit of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
Offset: 0

Views

Author

Keywords

Comments

Also decimal expansion of 137174210/1111111111 = 0.1234567890123456789012345678901234... - Jason Earls, Mar 19 2001
In general the base k expansion of A062808(k)/A048861(k) (k>=2) will produce the numbers 0,1,2,...,k-1 repeated with period k, equivalent to the sequence n mod k. The k-digit number in base k 123...(k-1)0 (base k) expressed in decimal is A062808(k), whereas A048861(k) = k^k-1. In particular, A062808(10)/A048861(10)=1234567890/9999999999=137174210/1111111111.
a(n) = n^5 mod 10. - Zerinvary Lajos, Nov 04 2009

Crossrefs

Cf. A008959, A008960, A070514. - Doug Bell, Jun 15 2015
Partial sums: A130488. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486, A130487.

Programs

Formula

a(n) = n mod 10.
Periodic with period 10.
From Hieronymus Fischer, May 31 and Jun 11 2007: (Start)
Complex representation: a(n) = 1/10*(1-r^n)*sum{1<=k<10, k*product{1<=m<10,m<>k, (1-r^(n-m))}} where r=exp(Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (256/5)^2*(sin(n*Pi/10))^2 * sum{1<=k<10, k*product{1<=m<10,m<>k, (sin((n-m)*Pi/10))^2}}.
G.f.: g(x) = (Sum_{k=1..9} k*x^k)/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +5*x^4 +6*x^5 +7*x^6 +8*x^7 +9*x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
Also: g(x) = x*(9*x^10-10*x^9+1)/((1-x^10)*(1-x)^2).
a(n) = n mod 2+2*(floor(n/2)mod 5) = A000035(n) + 2*A010874(A004526(n)).
Also: a(n) = n mod 5+5*(floor(n/5)mod 2) = A010874(n)+5*A000035(A002266(n)). (End)
a(n) = 10*{n/10}, where {x} means fractional part of x. - Enrique Pérez Herrero, Jul 30 2009
a(n) = n - 10*A059995(n). - Reinhard Zumkeller, Jul 26 2011
a(n) = n^k mod 10, for k > 0, where k mod 4 = 1. - Doug Bell, Jun 15 2015

Extensions

Formula section edited for better readability by Hieronymus Fischer, Jun 13 2012

A010873 a(n) = n mod 4.

Original entry on oeis.org

0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0
Offset: 0

Views

Author

Keywords

Comments

Complement of A002265, since 4*A002265(n)+a(n) = n. - Hieronymus Fischer, Jun 01 2007
The rightmost digit in the base-4 representation of n. Also, the equivalent value of the two rightmost digits in the base-2 representation of n. - Hieronymus Fischer, Jun 11 2007
Periodic sequences of this type can be also calculated by a(n) = floor(q/(p^m-1)*p^n) mod p, where q is the number representing the periodic digit pattern and m is the period length. p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D. Than p := max + 1 and q := p^m*sum_{i=1..m} D(i)/p^i. Example: D = (0, 1, 2, 3), p = 4 and q = 57 for this sequence. - Hieronymus Fischer, Jan 04 2013

Crossrefs

Partial sums: A130482. Other related sequences A130481, A130483, A130484, A130485.

Programs

Formula

a(n) = (1/2)*(3-(-1)^n-2*(-1)^floor(n/2));
also a(n) = (1/2)*(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4));
also a(n) = (1/2)*(3-(-1)^n-2*sin(Pi/4*(2n+1+(-1)^n))).
G.f.: (3x^3+2x^2+x)/(1-x^4). - Hieronymus Fischer, May 29 2007
From Hieronymus Fischer, Jun 11 2007: (Start)
Trigonometric representation: a(n)=2^2*(sin(n*Pi/4))^2*sum{1<=k<4, k*product{1<=m<4,m<>k, (sin((n-m)*Pi/4))^2}}. Clearly, the squared terms may be replaced by their absolute values '|.|'.
Complex representation: a(n)=1/4*(1-r^n)*sum{1<=k<4, k*product{1<=m<4,m<>k, (1-r^(n-m))}} where r=exp(Pi/2*i)=i=sqrt(-1). All these formulas can be easily adapted to represent any periodic sequence.
a(n) = n mod 2+2*(floor(n/2)mod 2) = A000035(n)+2*A000035(A004526(n)). (End)
a(n) = 6 - a(n-1) - a(n-2) - a(n-3) for n > 2. - Reinhard Zumkeller, Apr 13 2008
a(n) = 3/2 + cos((n+1)*Pi)/2 + sqrt(2)*cos((2*n+3)*Pi/4). - Jaume Oliver Lafont, Dec 05 2008
From Hieronymus Fischer, Jan 04 2013: (Start)
a(n) = floor(41/3333*10^(n+1)) mod 10.
a(n) = floor(19/85*4^(n+1)) mod 4. (End)
E.g.f.: 2*sinh(x) - sin(x) + cosh(x) - cos(x). - Stefano Spezia, Apr 20 2021
From Nicolas Bělohoubek, May 30 2024: (Start)
a(n) = (2*a(n-1)-1)*(2-a(n-2)) for n > 1.
a(n) = (2*a(n-1)^2+1)*(3-a(n-1))/3 for n > 0. (End)

Extensions

First to third formulas re-edited for better readability by Hieronymus Fischer, Dec 05 2011
Incorrect g.f. removed by Georg Fischer, May 18 2019

A002264 Nonnegative integers repeated 3 times.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25
Offset: 0

Views

Author

Keywords

Comments

Complement of A010872, since A010872(n) + 3*a(n) = n. - Hieronymus Fischer, Jun 01 2007
Chvátal proved that, given an arbitrary n-gon, there exist a(n) points such that all points in the interior are visible from at least one of those points; further, for all n >= 3, there exists an n-gon which cannot be covered in this fashion with fewer than a(n) points. This is known as the "art gallery problem". - Charles R Greathouse IV, Aug 29 2012
The inverse binomial transform is 0, 0, 0, 1, -3, 6, -9, 9, 0, -27, 81, -162, 243, -243, 0, 729,.. (see A000748). - R. J. Mathar, Feb 25 2023

Crossrefs

Partial sums give A130518.
Cf. A004523 interlaced with A004396.
Apart from the zeros, this is column 3 of A235791.

Programs

  • Haskell
    a002264 n = a002264_list !! n
    a002264_list = 0 : 0 : 0 : map (+ 1) a002264_list
    -- Reinhard Zumkeller, Nov 06 2012, Apr 16 2012
    
  • Magma
    [Floor(n/3): n in [0..100]]; // Vincenzo Librandi, Apr 29 2015
    
  • Magma
    &cat [[n,n,n]: n in [0..30]]; // Bruno Berselli, Apr 29 2015
  • Maple
    seq(i$3,i=0..100); # Robert Israel, Aug 04 2014
  • Mathematica
    Flatten[Table[{n, n, n}, {n, 0, 25}]] (* Harvey P. Dale, Jun 09 2013 *)
    Floor[Range[0, 20]/3] (* Eric W. Weisstein, Aug 12 2023 *)
    Table[Floor[n/3], {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
    Table[(n - Cos[2 (n - 2) Pi/3] + Sin[2 (n - 2) Pi/3]/Sqrt[3] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
    Table[(n - ChebyshevU[n - 2, -1/2] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 0, 0, 1}, 20] (* Eric W. Weisstein, Aug 12 2023 *)
    CoefficientList[Series[x^3/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Aug 12 2023 *)
  • PARI
    a(n)=n\3  /* Jaume Oliver Lafont, Mar 25 2009 */
    
  • PARI
    v=[0,0];for(n=2,50,v=concat(v,n-2-v[#v]-v[#v-1]));v \\ Derek Orr, Apr 28 2015
    
  • Sage
    [floor(n/3) for n in range(0,79)] # Zerinvary Lajos, Dec 01 2009
    

Formula

a(n) = floor(n/3).
a(n) = (3*n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3))/9. - Hieronymus Fischer, Sep 18 2007
a(n) = (n - A010872(n))/3. - Hieronymus Fischer, Sep 18 2007
Complex representation: a(n) = (n - (1 - r^n)*(1 + r^n/(1 - r)))/3 where r = exp(2*Pi/3*i) = (-1 + sqrt(3)*i)/2 and i = sqrt(-1). - Hieronymus Fischer, Sep 18 2007; - corrected by Guenther Schrack, Sep 26 2019
a(n) = Sum_{k=0..n-1} A022003(k). - Hieronymus Fischer, Sep 18 2007
G.f.: x^3/((1-x)*(1-x^3)). - Hieronymus Fischer, Sep 18 2007
a(n) = (n - 1 + 2*sin(4*(n+2)*Pi/3)/sqrt(3))/3. - Jaume Oliver Lafont, Dec 05 2008
For n >= 3, a(n) = floor(log_3(3^a(n-1) + 3^a(n-2) + 3^a(n-3))). - Vladimir Shevelev, Jun 22 2010
a(n) = (n - 3 + A010872(n-1) + A010872(n-2))/3 using Zumkeller's 2008 formula in A010872. - Adriano Caroli, Nov 23 2010
a(n) = A004526(n) - A008615(n). - Reinhard Zumkeller, Apr 28 2014
a(2*n) = A004523(n) and a(2*n+1) = A004396(n). - L. Edson Jeffery, Jul 30 2014
a(n) = n - 2 - a(n-1) - a(n-2) for n > 1 with a(0) = a(1) = 0. - Derek Orr, Apr 28 2015
From Wesley Ivan Hurt, May 27 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4), n > 4.
a(n) = (n - 1 + 0^((-1)^(n/3) - (-1)^n) - 0^((-1)^(n/3)*(-1)^(1/3) + (-1)^n))/3. (End)
a(n) = (3*n - 3 + r^n*(1 - r) + r^(2*n)*(r + 2))/9 where r = (-1 + sqrt(-3))/2. - Guenther Schrack, Sep 26 2019
E.g.f.: exp(x)*(x - 1)/3 + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 17 2022

A010872 a(n) = n mod 3.

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Fixed point of morphism 0 -> 01, 1 -> 20, 2 -> 12.
Complement of A002264, since 3*A002264(n) + a(n) = n. - Hieronymus Fischer, Jun 01 2007
Decimal expansion of 4/333. - Elmo R. Oliveira, Feb 19 2024
Period 3: repeat [0, 1, 2]. - Elmo R. Oliveira, Jun 20 2024

Examples

			G.f. = x + 2*x^2 + x^4 + 2*x^5 + x^7 + 2*x^8 + x^10 + 2*x^11 + x^13 + ...
		

Crossrefs

Cf. A010882, A130481 (partial sums), A131555.
Other related sequences are A130482, A130483, A130484, A130485.

Programs

  • Haskell
    a010872 = (`mod` 3)
    a010872_list = cycle [0,1,2]  -- Reinhard Zumkeller, May 26 2012
    
  • Magma
    [n mod 3 : n in [0..100]]; // Wesley Ivan Hurt, May 27 2015
    
  • Maple
    A010872:=n->(n mod 3): seq(A010872(n), n=0..100); # Wesley Ivan Hurt, May 27 2015
  • Mathematica
    Nest[ Function[ l, {Flatten[(l /. {0 -> {0, 1}, 1 -> {2, 0}, 2 -> {1, 2}})]}], {0}, 7] (* Robert G. Wilson v, Feb 28 2005 *)
    PadRight[{},120,{0,1,2}] (* or *) Mod[Range[0,120],3] (* Harvey P. Dale, Jul 20 2025 *)
  • PARI
    my(x='x+O('x^200)); concat(0, Vec((2*x^2+x)/(1-x^3))) \\ Altug Alkan, Mar 23 2016

Formula

a(n) = n - 3*floor(n/3) = a(n-3).
G.f.: (2*x^2+x)/(1-x^3). - Mario Catalani (mario.catalani(AT)unito.it), Jan 08 2003
From Hieronymus Fischer, May 29 2007: (Start)
a(n) = 1 + (1-2*cos(2*Pi*(n-1)/3)) * sin(2*Pi*(n-1)/3) / sqrt(3).
a(n) = (1-r^n)*(1+r^n/(1-r)) where r=exp(2*Pi*i/3)=(-1+sqrt(3)*i)/2 and i=sqrt(-1). [corrected by Guenther Schrack, Sep 23 2019] (End)
From Hieronymus Fischer, Jun 01 2007: (Start)
a(n) = (16/9)*((sin(Pi*(n-2)/3))^2+2*(sin(Pi*(n-1)/3))^2)*(sin(Pi*n/3))^2.
a(n) = (4/3)*(|sin(Pi*(n-2)/3)|+2*|sin(Pi*(n-1)/3)|)*|sin(Pi*n/3)|.
a(n) = (4/9)*((1-cos(2*Pi*(n-2)/3))+2*(1-cos(2*Pi*(n-1)/3)))*(1-cos(2*Pi*n/3)). (End)
a(n) = 3 - a(n-1) - a(n-2) for n > 1. - Reinhard Zumkeller, Apr 13 2008
a(n) = 1-2*sin(4*Pi*(n+2)/3)/sqrt(3). - Jaume Oliver Lafont, Dec 05 2008
From Wesley Ivan Hurt, May 27 2015, Mar 22 2016: (Start)
a(n) = 1 - 0^((-1)^(n/3)-(-1)^n) + 0^((-1)^((n+1)/3)+(-1)^n).
a(n) = 1 + (-1)^((2*n+4)/3)/3 + (-1)^((-2*n-4)/3)/3 + 2*(-1)^((2*n+2)/3)/3 + 2*(-1)^((-2*n-2)/3)/3.
a(n) = 1 + 2*cos(Pi*(2*n+4)/3)/3 + 4*cos(Pi*(2*n+2)/3)/3. (End)
a(n) = (r^n*(r-1) - r^(2*n)*(r + 2) + 3)/3 where r = (-1 + sqrt(-3))/2. - Guenther Schrack, Sep 23 2019
E.g.f.: exp(x) - exp(-x/2)*(cos(sqrt(3)*x/2) + sin(sqrt(3)*x/2)/sqrt(3)). - Stefano Spezia, Mar 01 2020
a(n) = A010882(n) - 1 = A131555(2*n) = A131555(2*n+1). - Elmo R. Oliveira, Jun 25 2024
From Nicolas Bělohoubek, May 26 2025: (Start)
a(n) = (3*a(n-1)+1)*(2-a(n-1))/2 for n > 0.
a(n) = (2*a(n-1)-4)/(3*a(n-1)-4) for n > 0. (End)

Extensions

Edited by Joerg Arndt, Apr 21 2014

A010766 Triangle read by rows: row n gives the numbers floor(n/k), k = 1..n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 4, 2, 1, 1, 5, 2, 1, 1, 1, 6, 3, 2, 1, 1, 1, 7, 3, 2, 1, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 13, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Number of times k occurs as divisor of numbers not greater than n. - Reinhard Zumkeller, Mar 19 2004
Viewed as a partition, row n is the smallest partition that contains every partition of n in the usual ordering. - Franklin T. Adams-Watters, Mar 11 2006
Row sums = A006218. - Gary W. Adamson, Oct 30 2007
A014668 = eigensequence of the triangle. A163313 = A010766 * A014668 (diagonalized) as an infinite lower triangular matrix. - Gary W. Adamson, Jul 30 2009
A018805(T(n,k)) = A242114(n,k). - Reinhard Zumkeller, May 04 2014
Viewed as partitions, all rows are self-conjugate. - Matthew Vandermast, Sep 10 2014
Row n is the partition whose Young diagram is the union of Young diagrams of all partitions of n (rewording of Franklin T. Adams-Watters's comment). - Harry Richman, Jan 13 2022

Examples

			Triangle starts:
   1:  1;
   2:  2,  1;
   3:  3,  1, 1;
   4:  4,  2, 1, 1;
   5:  5,  2, 1, 1, 1;
   6:  6,  3, 2, 1, 1, 1;
   7:  7,  3, 2, 1, 1, 1, 1;
   8:  8,  4, 2, 2, 1, 1, 1, 1;
   9:  9,  4, 3, 2, 1, 1, 1, 1, 1;
  10: 10,  5, 3, 2, 2, 1, 1, 1, 1, 1;
  11: 11,  5, 3, 2, 2, 1, 1, 1, 1, 1, 1;
  12: 12,  6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1;
  13: 13,  6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
  14: 14,  7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
  15: 15,  7, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1;
  16: 16,  8, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1;
  17: 17,  8, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  18: 18,  9, 6, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  19: 19,  9, 6, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  20: 20, 10, 6, 5, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  ...
		

References

  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 407.

Crossrefs

Another version of A003988.
Finite differences of rows: A075993.
Cf. related triangles: A002260, A013942, A051731, A163313, A277646, A277647.
Cf. related sequences: A006218, A014668, A115725.
Columns of this triangle:
T(n,1) = n,
T(n,2) = A008619(n-2) for n>1,
T(n,3) = A008620(n-3) for n>2,
T(n,4) = A008621(n-4) for n>3,
T(n,5) = A002266(n) for n>4,
T(n,n) = A000012(n) = 1.
Rows of this triangle (with infinite trailing zeros):
T(1,k) = A000007(k-1),
T(2,k) = A033322(k),
T(3,k) = A278105(k),
T(4,k) = A033324(k),
T(5,k) = A033325(k),
T(6,k) = A033326(k),
T(7,k) = A033327(k),
T(8,k) = A033328(k),
T(9,k) = A033329(k),
T(10,k) = A033330(k),
...
T(99,k) = A033419(k),
T(100,k) = A033420(k),
T(1000,k) = A033421(k),
T(10^4,k) = A033422(k),
T(10^5,k) = A033427(k),
T(10^6,k) = A033426(k),
T(10^7,k) = A033425(k),
T(10^8,k) = A033424(k),
T(10^9,k) = A033423(k).

Programs

  • Haskell
    a010766 = div
    a010766_row n = a010766_tabl !! (n-1)
    a010766_tabl = zipWith (map . div) [1..] a002260_tabl
    -- Reinhard Zumkeller, Apr 29 2015, Aug 13 2013, Apr 13 2012
    
  • Maple
    seq(seq(floor(n/k),k=1..n),n=1..20); # Robert Israel, Sep 01 2014
  • Mathematica
    Flatten[Table[Floor[n/k],{n,20},{k,n}]] (* Harvey P. Dale, Nov 03 2012 *)
  • PARI
    a(n)=t=floor((-1+sqrt(1+8*(n-1)))/2);(t+1)\(n-t*(t+1)/2) \\ Edward Jiang, Sep 10 2014
    
  • PARI
    T(n, k) = sum(i=1, n, (i % k) == 0); \\ Michel Marcus, Apr 08 2017

Formula

G.f.: 1/(1-x)*Sum_{k>=1} x^k/(1-y*x^k). - Vladeta Jovovic, Feb 05 2004
Triangle A010766 = A000012 * A051731 as infinite lower triangular matrices. - Gary W. Adamson, Oct 30 2007
Equals A000012 * A051731 as infinite lower triangular matrices. - Gary W. Adamson, Nov 14 2007
Let T(n,0) = n+1, then T(n,k) = (sum of the k preceding elements in the previous column) minus (sum of the k preceding elements in same column). - Mats Granvik, Gary W. Adamson, Feb 20 2010
T(n,k) = (n - A048158(n,k)) / k. - Reinhard Zumkeller, Aug 13 2013
T(n,k) = 1 + T(n-k,k) (where T(n-k,k) = 0 if n < 2*k). - Robert Israel, Sep 01 2014
T(n,k) = T(floor(n/k),1) if k>1; T(n,1) = 1 - Sum_{i=2..n} A008683(i)*T(n,i). If we modify the formula to T(n,1) = 1 - Sum_{i=2..n} A008683(i)*T(n,i)/i^s, where s is a complex variable, then the first column becomes the partial sums of the Riemann zeta function. - Mats Granvik, Apr 27 2016

Extensions

Cross references edited by Jason Kimberley, Nov 23 2016

A010874 a(n) = n mod 5.

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0
Offset: 0

Views

Author

Keywords

Comments

Complement of A002266, since 5*A002266(n) + a(n) = n. - Hieronymus Fischer, Jun 01 2007

Crossrefs

Programs

Formula

Complex representation: a(n) = (1/5)*(1-r^n)*Sum{1<=k<5, k*Product{1<=m<5,m<>k, (1-r^(n-m))}} where r=exp(2*Pi/5*i) and i=sqrt(-1).
G.f.: g(x)=(4*x^4+3*x^3+2*x^2+x)/(1-x^5). - Hieronymus Fischer, May 29 2007
Trigonometric representation: a(n) = (16/5)^2*(sin(n*Pi/5))^2*Sum{1<=k<5, k*Product{1<=m<5,m<>k, (sin((n-m)*Pi/5))^2}}. Clearly, the squared terms may be replaced by their absolute values '|.|'. This formula can be easily adapted to represent any periodic sequence.
G.f.: also g(x) = x*(5*x^6 - 6*x^5 + 1)/((1-x^5)*(1-x)^2). - Hieronymus Fischer, Jun 01 2007
a(n) = -cos(4/5*Pi*n)-cos(2/5*Pi*n)+1/20*5^(1/2)*(10-2*5^(1/2))^(1/2)* sin(4/5*Pi*n)-1/4*(10-2*5^(1/2))^(1/2)*sin(4/5*Pi*n)-1/4*(10+2*5^(1/2))^(1/2)*sin(2/5*Pi*n)-1/20*5^(1/2)*(10+2*5^(1/2))^(1/2)*sin(2/5*Pi*n) + 2. - Leonid Bedratyuk, May 14 2012
a(n) = floor(1234/99999*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = floor(97/1562*5^(n+1)) mod 5. - Hieronymus Fischer, Jan 04 2013
From Wesley Ivan Hurt, Jul 23 2016: (Start)
a(n) = a(n-5) for n>4.
a(n) = 4*(1 - floor(n/5)) + Sum_{k=1..4} floor((n-k)/5).
a(n) = 4 - 4*floor(n/5) + floor((n-1)/5) + floor((n-2)/5) + floor((n-3)/5) + floor((n-4)/5).
a(n) = n - 5*floor(n/5). (End)
a(n) = 2 + (2/5)*Sum_{k=1..4} k*(cos(2*(n-k)*Pi/5) + cos(4*(n-k)*Pi/5)). - Wesley Ivan Hurt, Sep 27 2018
Showing 1-10 of 53 results. Next