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 17 results. Next

A002260 Triangle read by rows: T(n,k) = k for n >= 1, k = 1..n.

Original entry on oeis.org

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

Views

Author

Angele Hamel (amh(AT)maths.soton.ac.uk)

Keywords

Comments

Old name: integers 1 to k followed by integers 1 to k+1 etc. (a fractal sequence).
Start counting again and again.
This is a "doubly fractal sequence" - see the Franklin T. Adams-Watters link.
The PARI functions t1, t2 can be used to read a square array T(n,k) (n >= 1, k >= 1) by antidiagonals downwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002
Reading this sequence as the antidiagonals of a rectangular array, row n is (n,n,n,...); this is the weight array (Cf. A144112) of the array A127779 (rectangular). - Clark Kimberling, Sep 16 2008
The upper trim of an arbitrary fractal sequence s is s, but the lower trim of s, although a fractal sequence, need not be s itself. However, the lower trim of A002260 is A002260. (The upper trim of s is what remains after the first occurrence of each term is deleted; the lower trim of s is what remains after all 0's are deleted from the sequence s-1.) - Clark Kimberling, Nov 02 2009
Eigensequence of the triangle = A001710 starting (1, 3, 12, 60, 360, ...). - Gary W. Adamson, Aug 02 2010
The triangle sums, see A180662 for their definitions, link this triangle of natural numbers with twenty-three different sequences, see the crossrefs. The mirror image of this triangle is A004736. - Johannes W. Meijer, Sep 22 2010
A002260 is the self-fission of the polynomial sequence (q(n,x)), where q(n,x) = x^n + x^(n-1) + ... + x + 1. See A193842 for the definition of fission. - Clark Kimberling, Aug 07 2011
Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. Sequence A002260 is reluctant sequence of sequence 1,2,3,... (A000027). - Boris Putievskiy, Dec 12 2012
This is the maximal sequence of positive integers, such that once an integer k has occurred, the number of k's always exceeds the number of (k+1)'s for the remainder of the sequence, with the first occurrence of the integers being in order. - Franklin T. Adams-Watters, Oct 23 2013
A002260 are the k antidiagonal numerators of rationals in Cantor's proof of 1-to-1 correspondence between rationals and naturals; the denominators are k-numerator+1. - Adriano Caroli, Mar 24 2015
T(n,k) gives the distance to the largest triangular number < n. - Ctibor O. Zizka, Apr 09 2020

Examples

			First six rows:
  1
  1   2
  1   2   3
  1   2   3   4
  1   2   3   4   5
  1   2   3   4   5   6
		

References

  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168. (Introduces upper trimming, lower trimming, and signature sequences.)
  • M. Myers, Smarandache Crescendo Subsequences, R. H. Wilde, An Anthology in Memoriam, Bristol Banner Books, Bristol, 1998, p. 19.
  • F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.

Crossrefs

Cf. A140756 (alternating signs).
Triangle sums (see the comments): A000217 (Row1, Kn11); A004526 (Row2); A000096 (Kn12); A055998 (Kn13); A055999 (Kn14); A056000 (Kn15); A056115 (Kn16); A056119 (Kn17); A056121 (Kn18); A056126 (Kn19); A051942 (Kn110); A101859 (Kn111); A132754 (Kn112); A132755 (Kn113); A132756 (Kn114); A132757 (Kn115); A132758 (Kn116); A002620 (Kn21); A000290 (Kn3); A001840 (Ca2); A000326 (Ca3); A001972 (Gi2); A000384 (Gi3).
Cf. A108872.

Programs

  • Haskell
    a002260 n k = k
    a002260_row n = [1..n]
    a002260_tabl = iterate (\row -> map (+ 1) (0 : row)) [1]
    -- Reinhard Zumkeller, Aug 04 2014, Jul 03 2012
    
  • Maple
    at:=0; for n from 1 to 150 do for i from 1 to n do at:=at+1; lprint(at,i); od: od: # N. J. A. Sloane, Nov 01 2006
    seq(seq(i,i=1..k),k=1..13); # Peter Luschny, Jul 06 2009
  • Mathematica
    FoldList[{#1, #2} &, 1, Range[2, 13]] // Flatten (* Robert G. Wilson v, May 10 2011 *)
    Flatten[Table[Range[n],{n,20}]] (* Harvey P. Dale, Jun 20 2013 *)
  • Maxima
    T(n,k):=sum((i+k)*binomial(i+k-1,i)*binomial(k,n-i-k+1)*(-1)^(n-i-k+1),i,max(0,n+1-2*k),n-k+1); /* Vladimir Kruchinin, Oct 18 2013 */
    
  • PARI
    t1(n)=n-binomial(floor(1/2+sqrt(2*n)),2) /* this sequence */
    
  • PARI
    A002260(n)=n-binomial((sqrtint(8*n)+1)\2,2) \\ M. F. Hasler, Mar 10 2014
    
  • Python
    from math import isqrt, comb
    def A002260(n): return n-comb((m:=isqrt(k:=n<<1))+(k>m*(m+1)),2) # Chai Wah Wu, Nov 08 2024

Formula

a(n) = 1 + A002262(n).
n-th term is n - m*(m+1)/2 + 1, where m = floor((sqrt(8*n+1) - 1) / 2).
The above formula is for offset 0; for offset 1, use a(n) = n-m*(m+1)/2 where m = floor((-1+sqrt(8*n-7))/2). - Clark Kimberling, Jun 14 2011
a(k * (k + 1) / 2 + i) = i for k >= 0 and 0 < i <= k + 1. - Reinhard Zumkeller, Aug 14 2001
a(n) = (2*n + round(sqrt(2*n)) - round(sqrt(2*n))^2)/2. - Brian Tenneson, Oct 11 2003
a(n) = n - binomial(floor((1+sqrt(8*n))/2), 2). - Paul Barry, May 25 2004
T(n,k) = A001511(A118413(n,k)); T(n,k) = A003602(A118416(n,k)). - Reinhard Zumkeller, Apr 27 2006
a(A000217(n)) = A000217(n) - A000217(n-1), a(A000217(n-1) + 1) = 1, a(A000217(n) - 1) = A000217(n) - A000217(n-1) - 1. - Alexander R. Povolotsky, May 28 2008
a(A169581(n)) = A038566(n). - Reinhard Zumkeller, Dec 02 2009
T(n,k) = Sum_{i=1..k} i*binomial(k,i)*binomial(n-k,n-i) (regarded as triangle, see the example). - Mircea Merca, Apr 11 2012
T(n,k) = Sum_{i=max(0,n+1-2*k)..n-k+1} (i+k)*binomial(i+k-1,i)*binomial(k,n-i-k+1)*(-1)^(n-i-k+1). - Vladimir Kruchinin, Oct 18 2013
G.f.: x*y / ((1 - x) * (1 - x*y)^2) = Sum_{n,k>0} T(n,k) * x^n * y^k. - Michael Somos, Sep 17 2014
a(n) = n - S(n) where S(n) = sum of distinct terms in {a(1), a(2), ..., a(n-1)}. - David James Sycamore, Mar 10 2025

Extensions

More terms from Reinhard Zumkeller, Apr 27 2006
Incorrect program removed by Franklin T. Adams-Watters, Mar 19 2010
New name from Omar E. Pol, Jul 15 2012

A212959 Number of (w,x,y) such that w,x,y are all in {0,...,n} and |w-x| = |x-y|.

Original entry on oeis.org

1, 4, 11, 20, 33, 48, 67, 88, 113, 140, 171, 204, 241, 280, 323, 368, 417, 468, 523, 580, 641, 704, 771, 840, 913, 988, 1067, 1148, 1233, 1320, 1411, 1504, 1601, 1700, 1803, 1908, 2017, 2128, 2243, 2360, 2481, 2604, 2731, 2860, 2993, 3128, 3267
Offset: 0

Views

Author

Clark Kimberling, Jun 01 2012

Keywords

Comments

In the following guide to related sequences: M=max(x,y,z), m=min(x,y,z), and R=range=M-m. In some cases, it is an offset of the listed sequence which fits the conditions shown for w,x,y. Each sequence satisfies a linear recurrence relation, some of which are identified in the list by the following code (signature):
A: 2, 0, -2, 1, i.e., a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4);
B: 3, -2, -2, 3, -1;
C: 4, -6, 4, -1;
D: 1, 2, -2, -1, 1;
E: 2, 1, -4, 1, 2, -1;
F: 2, -1, 1, -2, 1;
G: 2, -1, 0, 1, -2, 1;
H: 2, -1, 2, -4, 2, -1, 2, -1;
I: 3, -3, 2, -3, 3, -1;
J: 4, -7, 8, -7, 4, -1.
...
A212959 ... |w-x|=|x-y| ...... recurrence type A
A212960 ... |w-x| != |x-y| ................... B
A212683 ... |w-x| < |x-y| .................... B
A212684 ... |w-x| >= |x-y| ................... B
A212963 ... see entry for definition ......... B
A212964 ... |w-x| < |x-y| < |y-w| ............ B
A006331 ... |w-x| < y ........................ C
A005900 ... |w-x| <= y ....................... C
A212965 ... w = R ............................ D
A212966 ... 2*w = R
A212967 ... w < R ............................ E
A212968 ... w >= R ........................... E
A077043 ... w = x > R ........................ A
A212969 ... w != x and x > R ................. E
A212970 ... w != x and x < R ................. E
A055998 ... w = x + y - 1
A011934 ... w < floor((x+y)/2) ............... B
A182260 ... w > floor((x+y)/2) ............... B
A055232 ... w <= floor((x+y)/2) .............. B
A011934 ... w >= floor((x+y)/2) .............. B
A212971 ... w < floor((x+y)/3) ............... B
A212972 ... w >= floor((x+y)/3) .............. B
A212973 ... w <= floor((x+y)/3) .............. B
A212974 ... w > floor((x+y)/3) ............... B
A212975 ... R is even ........................ E
A212976 ... R is odd ......................... E
A212978 ... R = 2*n - w - x
A212979 ... R = average{w,x,y}
A212980 ... w < x + y and x < y .............. B
A212981 ... w <= x+y and x < y ............... B
A212982 ... w < x + y and x <= y ............. B
A212983 ... w <= x + y and x <= y ............ B
A002623 ... w >= x + y and x <= y ............ B
A087811 ... w = 2*x + y ...................... A
A008805 ... w = 2*x + 2*y .................... D
A000982 ... 2*w = x + y ...................... F
A001318 ... 2*w = 2*x + y .................... F
A001840 ... w = 3*x + y
A212984 ... 3*w = x + y
A212985 ... 3*w = 3*x + y
A001399 ... w = 2*x + 3*y
A212986 ... 2*w = 3*x + y
A008810 ... 3*x = 2*x + y .................... F
A212987 ... 3*w = 2*x + 2*y
A001972 ... w = 4*x + y ...................... G
A212988 ... 4*w = x + y ...................... G
A212989 ... 4*w = 4*x + y
A008812 ... 5*w = 2*x + 3*y
A016061 ... n < w + x + y <= 2*n ............. C
A000292 ... w + x + y <=n .................... C
A000292 ... 2*n < w + x + y <= 3*n ........... C
A212977 ... n/2 < w + x + y <= n
A143785 ... w < R < x ........................ E
A005996 ... w < R <= x ....................... E
A128624 ... w <= R <= x ...................... E
A213041 ... R = 2*|w - x| .................... A
A213045 ... R < 2*|w - x| .................... B
A087035 ... R >= 2*|w - x| ................... B
A213388 ... R <= 2*|w - x| ................... B
A171218 ... M < 2*m .......................... B
A213389 ... R < 2|w - x| ..................... E
A213390 ... M >= 2*m ......................... E
A213391 ... 2*M < 3*m ........................ H
A213392 ... 2*M >= 3*m ....................... H
A213393 ... 2*M > 3*m ........................ H
A213391 ... 2*M <= 3*m ....................... H
A047838 ... w = |x + y - w| .................. A
A213396 ... 2*w < |x + y - w| ................ I
A213397 ... 2*w >= |x + y - w| ............... I
A213400 ... w < R < 2*w
A069894 ... min(|w-x|,|x-y|) = 1
A000384 ... max(|w-x|,|x-y|) = |w-y|
A213395 ... max(|w-x|,|x-y|) = w
A213398 ... min(|w-x|,|x-y|) = x ............. A
A213399 ... max(|w-x|,|x-y|) = x ............. D
A213479 ... max(|w-x|,|x-y|) = w+x+y ......... D
A213480 ... max(|w-x|,|x-y|) != w+x+y ........ E
A006918 ... |w-x| + |x-y| > w+x+y ............ E
A213481 ... |w-x| + |x-y| <= w+x+y ........... E
A213482 ... |w-x| + |x-y| < w+x+y ............ E
A213483 ... |w-x| + |x-y| >= w+x+y ........... E
A213484 ... |w-x|+|x-y|+|y-w| = w+x+y
A213485 ... |w-x|+|x-y|+|y-w| != w+x+y ....... J
A213486 ... |w-x|+|x-y|+|y-w| > w+x+y ........ J
A213487 ... |w-x|+|x-y|+|y-w| >= w+x+y ....... J
A213488 ... |w-x|+|x-y|+|y-w| < w+x+y ........ J
A213489 ... |w-x|+|x-y|+|y-w| <= w+x+y ....... J
A213490 ... w,x,y,|w-x|,|x-y| distinct
A213491 ... w,x,y,|w-x|,|x-y| not distinct
A213493 ... w,x,y,|w-x|,|x-y|,|w-y| distinct
A213495 ... w = min(|w-x|,|x-y|,|w-y|)
A213492 ... w != min(|w-x|,|x-y|,|w-y|)
A213496 ... x != max(|w-x|,|x-y|)
A213498 ... w != max(|w-x|,|x-y|,|w-y|)
A213497 ... w = min(|w-x|,|x-y|)
A213499 ... w != min(|w-x|,|x-y|)
A213501 ... w != max(|w-x|,|x-y|)
A213502 ... x != min(|w-x|,|x-y|)
...
A211795 includes a guide for sequences that count 4-tuples (w,x,y,z) having all terms in {0,...,n} and satisfying selected properties. Some of the sequences indexed at A211795 satisfy recurrences that are represented in the above list.
Partial sums of the numbers congruent to {1,3} mod 6 (see A047241). - Philippe Deléham, Mar 16 2014

Examples

			a(1)=4 counts these (x,y,z): (0,0,0), (1,1,1), (0,1,0), (1,0,1).
Numbers congruent to {1, 3} mod 6: 1, 3, 7, 9, 13, 15, 19, ...
a(0) = 1;
a(1) = 1 + 3 = 4;
a(2) = 1 + 3 + 7 = 11;
a(3) = 1 + 3 + 7 + 9 = 20;
a(4) = 1 + 3 + 7 + 9 + 13 = 33;
a(5) = 1 + 3 + 7 + 9 + 13 + 15 = 48; etc. - _Philippe Deléham_, Mar 16 2014
		

References

  • A. Barvinok, Lattice Points and Lattice Polytopes, Chapter 7 in Handbook of Discrete and Computational Geometry, CRC Press, 1997, 133-152.
  • P. Gritzmann and J. M. Wills, Lattice Points, Chapter 3.2 in Handbook of Convex Geometry, vol. B, North-Holland, 1993, 765-797.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Abs[w - x] == Abs[x - y], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 50]]   (* A212959 *)
  • PARI
    a(n)=(6*n^2+8*n+3)\/4 \\ Charles R Greathouse IV, Jul 28 2015

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: (1+2*x+3*x^2)/((1+x)*(1-x)^3).
a(n) + A212960(n) = (n+1)^3.
a(n) = (6*n^2 + 8*n + 3 + (-1)^n)/4. - Luce ETIENNE, Apr 05 2014
a(n) = 2*A069905(3*(n+1)+2) - 3*(n+1). - Ayoub Saber Rguez, Aug 31 2021

A130519 a(n) = Sum_{k=0..n} floor(k/4). (Partial sums of A002265.)

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 6, 8, 10, 12, 15, 18, 21, 24, 28, 32, 36, 40, 45, 50, 55, 60, 66, 72, 78, 84, 91, 98, 105, 112, 120, 128, 136, 144, 153, 162, 171, 180, 190, 200, 210, 220, 231, 242, 253, 264, 276, 288, 300, 312, 325, 338, 351, 364, 378, 392, 406, 420, 435, 450
Offset: 0

Views

Author

Hieronymus Fischer, Jun 01 2007

Keywords

Comments

Complementary to A130482 with respect to triangular numbers, in that A130482(n) + 4*a(n) = n(n+1)/2 = A000217(n).
Disregarding the first three 0's the resulting sequence a'(n) is the sum of the positive integers <= n that have the same residue modulo 4 as n. This is the additive counterpart of the quadruple factorial numbers. - Peter Luschny, Jul 06 2011
From Heinrich Ludwig, Dec 23 2017: (Start)
Column sums of (shift of rows = 4):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
1 2 3 4 5 6 7 8 9 10 ...
1 2 3 4 5 6 ...
1 2 ...
.......................................
---------------------------------------
1 2 3 4 6 8 10 12 15 18 21 24 28 32 ...
shift of rows = 1 see A000217
shift of rows = 2 see A002620
shift of rows = 3 see A001840
shift of rows = 5 see A130520
(End)
Conjecture: a(n+2) is the maximum effective weight of a numerical semigroup S of genus n (see Nathan Pflueger). - Stefano Spezia, Jan 04 2019

Examples

			G.f. = x^4 + 2*x^5 + 3*x^6 + 4*x^7 + 6*x^8 + 8*x^9 + 10*x^10 + 12*x^11 + ...
[ n] a(n)
---------
[ 4] 1
[ 5] 2
[ 6] 3
[ 7] 4
[ 8] 1 + 5
[ 9] 2 + 6
[10] 3 + 7
[11] 4 + 8
		

Crossrefs

Programs

  • GAP
    a:=List([0..65],n->Sum([0..n],k->Int(k/4)));; Print(a); # Muniru A Asiru, Jan 04 2019
    
  • Magma
    [Round(n*(n-2)/8): n in [0..70]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    quadsum := n -> add(k, k = select(k -> k mod 4 = n mod 4, [$1 .. n])):
    A130519 := n ->`if`(n<3,0,quadsum(n-3)); seq(A130519(n),n=0..58); # Peter Luschny, Jul 06 2011
  • Mathematica
    a[ n_] := Quotient[ (n - 1)^2, 8]; (* Michael Somos, Oct 14 2011 *)
  • Maxima
    makelist(floor((n-1)^2/8), n, 0, 70); /* Stefano Spezia, Jan 04 2019 */
    
  • PARI
    {a(n) = (n - 1)^2 \ 8}; /* Michael Somos, Oct 14 2011 */
    
  • Python
    def A130519(n): return (n-1)**2>>3  # Chai Wah Wu, Jul 30 2022

Formula

G.f.: x^4/((1-x^4)*(1-x)^2) = x^4/((1+x)*(1+x^2)*(1-x)^3).
a(n) = +2*a(n-1) -1*a(n-2) +1*a(n-4) -2*a(n-5) +1*a(n-6).
a(n) = floor(n/4)*(n - 1 - 2*floor(n/4)) = A002265(n)*(n - 1 - 2*A002265(n)).
a(n) = (1/2)*A002265(n)*(n - 2 + A010873(n)).
a(n) = floor((n-1)^2/8). - Mitch Harris, Sep 08 2008
a(n) = round(n*(n-2)/8) = round((n^2-2*n-1)/8) = ceiling((n+1)*(n-3)/8). - Mircea Merca, Nov 28 2010
a(n) = A001972(n-4), n>3. - Franklin T. Adams-Watters, Jul 10 2009
a(n) = a(n-4)+n-3, n>3. - Mircea Merca, Nov 28 2010
Euler transform of length 4 sequence [ 2, 0, 0, 1]. - Michael Somos, Oct 14 2011
a(n) = a(2-n) for all n in Z. - Michael Somos, Oct 14 2011
a(n) = A214734(n, 1, 4). - Renzo Benedetti, Aug 27 2012
a(4n) = A000384(n), a(4n+1) = A001105(n), a(4n+2) = A014105(n), a(4n+3) = A046092(n). - Philippe Deléham, Mar 26 2013
a(n) = Sum_{i=1..ceiling(n/2)-1} (i mod 2) * (n - 2*i - 1). - Wesley Ivan Hurt, Jan 23 2014
a(n) = ( 2*n^2-4*n-1+(-1)^n+2*((-1)^((2*n-1+(-1)^n)/4)-(-1)^((6*n-1+(-1)^n)/4)) )/16 = ( 2*n*(n-2) - (1-(-1)^n)*(1-2*i^(n*(n-1))) )/16, where i=sqrt(-1). - Luce ETIENNE, Aug 29 2014
E.g.f.: (1/8)*((- 1 + x)*x*cosh(x) + 2*sin(x) + (- 1 - x + x^2)*sinh(x)). - Stefano Spezia, Jan 15 2019
a(n) = (A002620(n-1) - A011765(n+1)) / 2, for n > 0. - Yuchun Ji, Feb 05 2021
Sum_{n>=4} 1/a(n) = Pi^2/12 + 5/2. - Amiram Eldar, Aug 13 2022

Extensions

Partially edited by R. J. Mathar, Jul 11 2009

A122046 Partial sums of floor(n^2/8).

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 10, 16, 24, 34, 46, 61, 79, 100, 124, 152, 184, 220, 260, 305, 355, 410, 470, 536, 608, 686, 770, 861, 959, 1064, 1176, 1296, 1424, 1560, 1704, 1857, 2019, 2190, 2370, 2560, 2760, 2970, 3190, 3421, 3663, 3916, 4180, 4456, 4744, 5044, 5356, 5681, 6019, 6370
Offset: 0

Views

Author

Roger L. Bagula, Sep 13 2006

Keywords

Comments

Degree of the polynomial P(n+1,x), defined by P(n,x) = [x^(n-1)*P(n-1,x)*P(n-4,x)+P(n-2,x)*P(n-3,x)]/P(n-5,x) with P(1,x)=P(0,x)=P(-1,x)=P(-2,x)=P(-3,x)=1.
Define the sequence b(n) = 1, 4, 10, 20, 36, 60,... for n>=0 with g.f. 1/((1+x)*(1+x^2)*(1-x)^5). Then a(n+3) = b(n)-b(n-1) and b(n)+b(n+1)+b(n+2)+b(n+3) = A052762(n+7)/24. - J. M. Bergot, Aug 21 2013
Maximum Wiener index of all maximal 4-degenerate graphs with n-1 vertices. (A maximal 4-degenerate graph can be constructed from a 4-clique by iteratively adding a new 4-leaf (vertex of degree 4) adjacent to four existing vertices.) The extremal graphs are 4th powers of paths, so the bound also applies to 4-trees. - Allan Bickle, Sep 15 2022

Examples

			a(6) = 10 = 0 + 0 + 0 + 1 + 2 + 3 + 4.
		

Crossrefs

Partial sums of A001972.
Maximum Wiener index of all maximal k-degenerate graphs for k=1..6: A000292, A002623, A014125, A122046 (this sequence), A122047, A175724.

Programs

  • Magma
    [Round((2*n^3+3*n^2-8*n)/48): n in [0..60]]; // Vincenzo Librandi, Jun 25 2011
    
  • Maple
    A122046 := proc(n) round((2*n^3+3*n^2-8*n)/48) ; end proc: # Mircea Merca
  • Mathematica
    p[n_] := p[n] = Cancel[Simplify[ (x^(n - 1)p[n - 1]p[n - 4] + p[n - 2]*p[n - 3])/p[n - 5]]]; p[ -5] = 1;p[ -4] = 1;p[ -3] = 1;p[ -2] = 1;p[ -1] = 1; Table[Exponent[p[n], x], {n, 0, 20}]
    Accumulate[Floor[Range[0,60]^2/8]] (* or *) LinearRecurrence[{3,-3,1,1,-3,3,-1},{0,0,0,1,3,6,10},60] (* Harvey P. Dale, Dec 23 2019 *)
  • PARI
    a(n)=(2*n^3+3*n^2-8*n+3)\48 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = Sum_{k=0..n} floor(k^2/8).
a(n) = round((2*n^3 + 3*n^2 - 8*n)/48) = round((4*n^3 + 6*n^2 - 16*n - 9)/96) = floor((2*n^3 + 3*n^2 - 8*n + 3)/48) = ceiling((2*n^3 + 3*n^2 - 8*n - 12)/48). - Mircea Merca
a(n) = a(n-8) + (n-4)^2 + n, n > 8. - Mircea Merca
From Andrew Hone, Jul 15 2008: (Start)
a(n+1) = cos((2*n+1)*Pi/4)/(4*sqrt(2)) + (2*n+3)*(2*n^2 + 6*n - 5)/96 + (-1)^n/32.
a(n+1) = A057077(n+1)/8 + A090294(n-1)/32 + (-1)^n/32.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-4) - 3*a(n-5) + 3*a(n-6) - a(n-7). (End)
O.g.f.: x^3 / ( (1+x)*(x^2+1)*(x-1)^4 ). - R. J. Mathar, Jul 15 2008
From Johannes W. Meijer, May 20 2011: (Start)
a(n+3) = A144678(n) + A144678(n-1) + A144678(n-2) + A144678(n-3);
a(n+3) = Sum_{k=0..6} min(6-k+1,k+1)* A190718(n+k-6). (End)
a(n) = (4*n^3 + 6*n^2 - 16*n - 9 - 3*(-1)^n + 12*(-1)^((2*n - 1 + (-1)^n)/4))/96. - Luce ETIENNE, Mar 21 2014
E.g.f.: ((2*x^3 + 9*x^2 - 3*x - 6)*cosh(x) + 6*(cos(x) + sin(x)) + (2*x^3 + 9*x^2 - 3*x - 3)*sinh(x))/48. - Stefano Spezia, Apr 05 2023

Extensions

Edited by N. J. A. Sloane, Sep 17 2006, Jul 11 2008, Jul 12 2008
More formulas and better name from Mircea Merca, Nov 19 2010

A008728 Molien series for 3-dimensional group [2,n ] = *22n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 217, 224, 231, 238
Offset: 0

Views

Author

Keywords

Comments

a(n) = A179052(n) for n < 100. - Reinhard Zumkeller, Jun 27 2010

Crossrefs

Programs

  • GAP
    a:=[1,2,3,4,5,6,7,8,9,10,12,14];; for n in [13..70] do a[n]:=2*a[n-1]-a[n-2]+a[n-10]-2*a[n-11]+a[n-12]; od; a; # G. C. Greubel, Jul 30 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 70); Coefficients(R!( 1/((1-x)^2*(1-x^10)) )); // G. C. Greubel, Jul 30 2019
    
  • Maple
    g:= 1/((1-x)^2*(1-x^10)); gser:= series(g, x=0,72); seq(coeff(gser, x, n), n=0..70); # modified by G. C. Greubel, Jul 30 2019
  • Mathematica
    CoefficientList[Series[1/((1-x)^2(1-x^10)), {x,0,70}], x] (* Vincenzo Librandi, Jun 11 2013 *)
  • PARI
    my(x='x+O('x^70)); Vec(1/((1-x)^2*(1-x^10))) \\ G. C. Greubel, Jul 30 2019
    
  • Sage
    (1/((1-x)^2*(1-x^10))).series(x, 70).coefficients(x, sparse=False) # G. C. Greubel, Jul 30 2019
    

Formula

G.f.: 1/((1-x)^2*(1-x^10)).
From Mitch Harris, Sep 08 2008: (Start)
a(n) = Sum_{j=0..n+10} floor(j/10).
a(n-10) = (1/2)*floor(n/10)*(2*n - 8 - 10*floor(n/10)). (End)

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Mar 14 2010

A083593 Expansion of 1/((1-2*x)*(1-x^4)).

Original entry on oeis.org

1, 2, 4, 8, 17, 34, 68, 136, 273, 546, 1092, 2184, 4369, 8738, 17476, 34952, 69905, 139810, 279620, 559240, 1118481, 2236962, 4473924, 8947848, 17895697, 35791394, 71582788, 143165576, 286331153, 572662306, 1145324612, 2290649224
Offset: 0

Views

Author

Paul Barry, May 02 2003

Keywords

Comments

Here we let p = 4 to produce the above sequence, but p can be an arbitrary natural number. By letting p = 2, 3, 6, 7 we produce A000975, A033138, A195904 and A117302. We denote by U[p,n,m] the number of cases in which the first player gets killed in a Russian roulette game when p players use a gun with n chambers and m bullets. They never rotate the cylinder after the game starts. The chambers can be represented by the list {1,2,...,n}.
We are going to calculate the following (0), (1), ..., (t) separately. (0) The first player gets killed when one bullet is in the first chamber and the remaining m-1 bullets are in {2,3,...,n}. We have binomial(n-1,m-1) cases for this. (1) The first gets killed when one bullet is in the (p+1)th chamber and the rest of the bullets are in {p+2,...,n}. We have binomial(n-p-1,m-1) cases for this. We continue to calculate and the last is (t), where t = floor((n-m)/p). (t) The first gets killed when one bullet is in the (pt+1)-st chamber and the remaining bullets are in {pt+2,...,n}. We have binomial(n-pt-1,m-1) cases for this. Therefore U[p,n,m] = Sum_{z=0..floor((n-m)/p)} binomial(n-pz-1,m-1). Let A[p,n] be the number of the cases in which the first player gets killed when p players use a gun with n chambers and the number of the bullets can be from 1 to n. Then A[p,n] = Sum_{m=1..n} U[p,n,m]. - Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006
A001045(n+5) without last digit. - Paul Curtz, Apr 21 2021
a(n) is the number of partitions of n into parts 1 and 4 where there are two colors of part 1 and the order of the colors of parts 1 matters. If the order of colors doesn't matter we get A001972. - Joerg Arndt, Jan 18 2024

Crossrefs

Programs

  • Mathematica
    U[p_,n_,m_,v_]:=Block[{t},t=Floor[(1+p-m+n-v)/p];Sum[Binomial[n-v-p*z,m-1],{z,0,t-1}]]; A[p_,n_,v_]:=Sum[U[p,n,k,v],{k,1,n}]; (* Here we let p = 4 to produce the above sequence, but this code can produce A000975, A033138, A195904, A117302 for p=2,3,6,7.*) Table[A[4,n,1], {n,1,20}] (* Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006 *)
    CoefficientList[Series[1/((1-2x)(1-x^4)),{x,0,40}],x] (* Vincenzo Librandi, Apr 04 2012 *)
    a[n_] := FromDigits[Table[(Mod[j, 4]/4) // Round, {j, 1, n + 3}], 2] (* Andres Cicuttin, Mar 25 2016 *)
    a[n_] := a[n] = 2 a[n - 1] + 1 - Ceiling[Mod[n, 4]/4]; a[0] = 1;
    Table[a[n], {n, 0, 31}] (* Andres Cicuttin, Mar 27 2016 *)
    LinearRecurrence[{2,0,0,1,-2},{1,2,4,8,17},40] (* Harvey P. Dale, Apr 03 2018 *)
  • PARI
    Vec(1/((1-2*x)*(1-x^4))+O(x^99)) \\ Charles R Greathouse IV, May 15 2013
    
  • PARI
    a(n)=(16<Charles R Greathouse IV, Mar 27 2016
    
  • Python
    def A083593(n): return ((32<Chai Wah Wu, Apr 25 2025

Formula

a(n) = 2*a(n-1) + a(n-4) - 2*a(n-5).
If n is a multiple of 4, then a(n) = 2*a(n-1) + 1, otherwise a(n) = 2*a(n-1). - Gerald McGarvey, Oct 14 2008
a(n) = floor((2^(n+5) + 1)/30). - Tani Akinari, Jul 09 2013
From Andres Cicuttin, Mar 29 2016: (Start)
a(n) = 2*a(n-1) + floor(((n-1) mod 4)/3), with a(0)=1.
a(n) = 2*a(n-1) + 1 - ceiling((n mod 4)/4), with a(0)=1. (End)
15*a(n) = 2^(n+4) - A133145(n). - R. J. Mathar, Feb 27 2019
E.g.f.: (3*cos(x) - 5*cosh(x) + 32*cosh(2*x) + 6*sin(x) - 10*sinh(x) + 32*sinh(2*x))/30. - Stefano Spezia, Apr 25 2025

A008726 Molien series 1/((1-x)^2*(1-x^8)) for 3-dimensional group [2,n] = *22n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 42, 45, 48, 52, 56, 60, 64, 68, 72, 76, 80, 85, 90, 95, 100, 105, 110, 115, 120, 126, 132, 138, 144, 150, 156, 162, 168, 175, 182, 189, 196, 203, 210, 217, 224, 232, 240, 248, 256, 264, 272, 280
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,2,3,4,5,6,7,8,10,12];; for n in [11..80] do a[n]:=2*a[n-1] -a[n-2]+a[n-8]-2*a[n-9]+a[n-10]; od; a; # G. C. Greubel, Sep 09 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 80); Coefficients(R!( 1/((1-x)^2*(1-x^8)) )); // G. C. Greubel, Sep 09 2019
    
  • Maple
    seq(coeff(series(1/(1-x)^2/(1-x^8), x, n+1), x, n), n=0..80);
  • Mathematica
    CoefficientList[Series[1/((1-x)^2*(1-x^8)), {x,0,80}], x] (* Vincenzo Librandi, Jun 11 2013 *)
    LinearRecurrence[{2,-1,0,0,0,0,0,1,-2,1}, {1,2,3,4,5,6,7,8,10,12}, 80] (* Harvey P. Dale, Jan 07 2015 *)
  • PARI
    my(x='x+O('x^80)); Vec(1/((1-x)^2*(1-x^8))) \\ G. C. Greubel, Sep 09 2019
    
  • Sage
    def A008726_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(1/((1-x)^2*(1-x^8))).list()
    A008726_list(80) # G. C. Greubel, Sep 09 2019
    

Formula

G.f.: 1/((1-x)^2*(1-x^8)).
From Mitch Harris, Sep 08 2008: (Start)
a(n) = Sum_{j=0..n+8} floor(j/8).
a(n-8) = (1/2)*floor(n/8)*(2*n-6-8*floor(n/8)). (End)
a(n) = 2*a(n-1) - a(n-2) + a(n-8) - 2*a(n-9) + a(n-10). - R. J. Mathar, Apr 20 2010

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Mar 14 2010
Minor edits by Jon E. Schoenfield, Mar 28 2014

A008727 Molien series for 3-dimensional group [2,n] = *22n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 141, 147, 153, 159, 165, 171, 177, 183, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into two kinds of 1's and one kind of 9. - Joerg Arndt, Dec 27 2014

Crossrefs

Programs

  • GAP
    a:=[1,2,3,4,5,6,7,8,9,11,13];; for n in [12..70] do a[n]:=2*a[n-1]-a[n-2]+a[n-9]-2*a[n-10]+a[n-11]; od; a; # G. C. Greubel, Sep 09 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 70); Coefficients(R!( 1/((1-x)^2*(1-x^9)) )); // G. C. Greubel, Sep 09 2019
    
  • Maple
    seq(coeff(series(1/((1-x)^2*(1-x^9)), x, n+1), x, n), n = 0..70); # G. C. Greubel, Sep 09 2019
  • Mathematica
    Drop[Accumulate[Floor[Range[70]/9]], 8] (* Jean-François Alcover, Mar 27 2013 *)
    CoefficientList[Series[1/(1-x)^2/(1-x^9), {x,0,70}], x] (* Vincenzo Librandi, Jun 11 2013 *)
    LinearRecurrence[{2,-1,0,0,0,0,0,0,1,-2,1},{1,2,3,4,5,6,7,8,9,11,13},120] (* Harvey P. Dale, Feb 13 2022 *)
  • PARI
    Vec(1/(1-x)^2/(1-x^9)+O(x^66)) /* Joerg Arndt, Mar 27 2013 */
    
  • Sage
    def A008727_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(1/((1-x)^2*(1-x^9))).list()
    A008727_list(70) # G. C. Greubel, Sep 09 2019
    

Formula

G.f.: 1/((1-x)^2*(1-x^9)).
From Mitch Harris, Sep 08 2008: (Start)
a(n) = Sum_{j=0..n+9} floor(j/9).
a(n-9) = (1/2)*floor(n/9)*(2*n - 7 - 9*floor(n/9)). (End)

A008729 Molien series for 3-dimensional group [2, n] = *22n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 171, 177, 183, 189, 195, 201, 207, 213, 219
Offset: 0

Views

Author

Keywords

Examples

			..1....2....3....4....5....6....7....8....9...10...11
.13...15...17...19...21...23...25...27...29...31...33
.36...39...42...45...48...51...54...57...60...63...66
.70...74...78...82...86...90...94...98..102..106..110
115..120..125..130..135..140..145..150..155..160..165
171..177..183..189..195..201..207..213..219..225..231
238..245..252..259..266..273..280..287..294..301..308
316..324..332..340..348..356..364..372..380..388..396
405..414..423..432..441..450..459..468..477..486..495
505..515..525..535..545..555..565..575..585..595..605
...
The first six columns are A051865, A180223, A022268, A022269, A211013, A152740.
- _Philippe Deléham_, Apr 03 2013
		

Crossrefs

Programs

  • GAP
    a:=[1,2,3,4,5,6,7,8,9,10,11,13,15];; for n in [14..70] do a[n]:=2*a[n-1]-a[n-2]+a[n-11]-2*a[n-12]+a[n-13]; od; a; # G. C. Greubel, Jul 30 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 70); Coefficients(R!( 1/((1-x)^2*(1-x^11)) )); // G. C. Greubel, Jul 30 2019
    
  • Maple
    g:= 1/((1-x)^2*(1-x^11)); gser:= series(g, x=0,72); seq(coeff(gser, x, n), n=0..70); # modified by G. C. Greubel, Jul 30 2019
  • Mathematica
    CoefficientList[Series[1/((1-x)^2*(1-x^11)), {x,0,70}], x] (* Vincenzo Librandi, Jun 11 2013 *)
  • PARI
    my(x='x+O('x^70)); Vec(1/((1-x)^2*(1-x^11))) \\ G. C. Greubel, Jul 30 2019
    
  • Sage
    (1/((1-x)^2*(1-x^11))).series(x, 70).coefficients(x, sparse=False) # G. C. Greubel, Jul 30 2019
    

Formula

From Mitch Harris, Sep 08 2008: (Start)
a(n) = Sum_{j=0..n+11} floor(j/11).
a(n-11) = (1/2)*floor(n/11)*(2*n - 9 - 11*floor(n/11)). (End)
a(n) = A218530(n+11). - Philippe Deléham, Apr 03 2013
From Chai Wah Wu, Jul 08 2016: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-11) - 2*a(n-12) + a(n-13) for n > 12.
G.f.: 1/(1 - 2*x + x^2 - x^11 + 2*x^12 - x^13) = 1/((1-x)^3 *(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10)). (End)

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Mar 14 2010

A214734 Sum_{k=1..n} floor(k*p/q), where (p,q) are either coprime positive integers or q=1 or p=1, n*p>=q, ordered by (n + p + q) ascending, then n ascending, then p ascending.

Original entry on oeis.org

1, 2, 3, 3, 1, 6, 6, 1, 4, 9, 2, 12, 10, 5, 1, 4, 12, 1, 18, 4, 20, 15, 1, 2, 6, 15, 3, 8, 24, 2, 30, 6, 30, 21, 1, 7, 1, 3, 7, 18, 30, 1, 5, 14, 40, 3, 45, 9, 42, 28, 1, 3, 8, 1, 4, 21, 1, 3, 7, 14, 36, 50, 2, 8, 21, 60, 5, 63, 12, 56, 36
Offset: 1

Views

Author

Renzo Benedetti, Jul 27 2012

Keywords

Comments

Since this is a sequence with 3 indexes (n,p,q), then the order proposed is an ordering by planes of 3D-discrete points (similar to a diagonal ordering of 2D-discrete points). It is not possible to order by rows, columns since n, p, q are boundless.
This sequence generalizes other sequences like A130518, A001840, A058937, A130519, A001972 and maybe others (most of those sequences are replica of each other up to an offset), by providing a closed formula (see formulas).

Examples

			a(n, 1, 3) = n*(n+1)/ 6 - floor(n/3) - Sum_{k=1..(n mod 3)} (k mod 3) = n*(n+1)/ 6 - floor(n/3) - (4 mod 3)/3 = A130518(n).
Example of the ordering (n,p,q): (1,1,1), (1,1,2), (1,2,1), (2,1,1), (1,1,3), (1,3,1), (2,1,2), (2,2,1), (3,1,1), (1,1,4), ...
		

Formula

a(n, p, q) = Sum_{k=1..n} floor(k*p/q) defines the sequence.
a(n, p, q) = n*(n+1)*p/q/2 - floor(n/q) * (q-1)/2 - Sum_{k=1...(n mod q)} (k*p mod q)/q (the remaining sum has at most q-1 terms, and can assume at most q values when n varies, i.e., that sum for n is equal to the sum for n+q, so the computation of a(n, p, q) requires adding at most (q+1) terms). [Renzo Benedetti, Jul 27 2012]
Showing 1-10 of 17 results. Next