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

A195830 Triangle read by rows with T(n,k) = n - A074377(k), n>=1, k>=1, if (n - A074377(k))>=0.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Sep 24 2011

Keywords

Comments

Also triangle read by rows in which column k lists the nonnegative integers A001477 starting at the row A074377(k).
This sequence is related to the generalized decagonal numbers A074377, A195840 and A195850 in the same way as A195310 is related to the generalized pentagonal numbers A001318, A175003 and A000041. See comments in A195825.

Examples

			Written as a triangle:
.  0;
.  1;
.  2;
.  3;
.  4;
.  5;
.  6,  0;
.  7,  1;
.  8,  2;
.  9,  3,  0;
. 10,  4,  1;
. 11,  5,  2;
. 12,  6,  3;
. 13,  7,  4;
. 14,  8,  5;
. 15,  9,  6;
. 16, 10,  7;
. 17, 11,  8;
. 18, 12,  9;
. 19, 13, 10;
. 20, 14, 11;
. 21, 15, 12,  0;
. 22, 16, 13,  1;
. 23, 17, 14,  2;
		

Crossrefs

A195840 Triangle read by rows which arises from A195830, in the same way as A175003 arises from A195310. Column k starts at row A074377(k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 4, 1, -1, 4, 1, -1, 4, 1, -1, 4, 1, -1, 4, 2, -1, 5, 3, -1, 7, 4, -1, 10, 4, -2, 12, 4, -3, 13, 4, -4, 13, 4, -4, 13, 5, -4, 14, 7, -4, -1, 16, 10, -4, -1, 21, 12, -5, -1, 27, 13, -7, -1, 32, 13, -10, -1, 34
Offset: 1

Views

Author

Omar E. Pol, Sep 24 2011

Keywords

Comments

The sum of terms of row n is equal to the leftmost term of row n+1. This sequence is related to the generalized decagonal numbers A074377, A195830 and A195850 in the same way as A175003 is related to the generalized pentagonal numbers A001318, A195310 and A000041. See comments in A195825.

Examples

			Written as a triangle:
.  1;
.  1;
.  1;
.  1;
.  1;
.  1;
.  1,  1;
.  2,  1;
.  3,  1;
.  4,  1,  -1;
.  4,  1,  -1;
.  4,  1,  -1;
.  4,  1,  -1;
.  4,  2,  -1;
.  5,  3,  -1;
.  7,  4,  -1;
. 10,  4,  -2;
. 12,  4,  -3;
. 13,  4,  -4;
. 13,  4,  -4;
. 13,  5,  -4;
. 14,  7,  -4,  -1;
. 16, 10,  -4,  -1;
. 21, 12,  -5,  -1;
. 27, 13,  -7,  -1;
. 32, 13, -10,  -1;
. 34, 13, -12,  -1,  1;
		

Crossrefs

A001318 Generalized pentagonal numbers: m*(3*m - 1)/2, m = 0, +-1, +-2, +-3, ....

Original entry on oeis.org

0, 1, 2, 5, 7, 12, 15, 22, 26, 35, 40, 51, 57, 70, 77, 92, 100, 117, 126, 145, 155, 176, 187, 210, 222, 247, 260, 287, 301, 330, 345, 376, 392, 425, 442, 477, 495, 532, 551, 590, 610, 651, 672, 715, 737, 782, 805, 852, 876, 925, 950, 1001, 1027, 1080, 1107, 1162, 1190, 1247, 1276, 1335
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A026741. - Jud McCranie; corrected by Omar E. Pol, Jul 05 2012
From R. K. Guy, Dec 28 2005: (Start)
"Conway's relation twixt the triangular and pentagonal numbers: Divide the triangular numbers by 3 (when you can exactly):
0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 ...
0 - 1 2 .- .5 .7 .- 12 15 .- 22 26 .- .35 .40 .- ..51 ...
.....-.-.....+..+.....-..-.....+..+......-...-.......+....
"and you get the pentagonal numbers in pairs, one of positive rank and the other negative.
"Append signs according as the pair have the same (+) or opposite (-) parity.
"Then Euler's pentagonal number theorem is easy to remember:
"p(n-0) - p(n-1) - p(n-2) + p(n-5) + p(n-7) - p(n-12) - p(n-15) ++-- = 0^n
where p(n) is the partition function, the left side terminates before the argument becomes negative and 0^n = 1 if n = 0 and = 0 if n > 0.
"E.g. p(0) = 1, p(7) = p(7-1) + p(7-2) - p(7-5) - p(7-7) + 0^7 = 11 + 7 - 2 - 1 + 0 = 15."
(End)
The sequence may be used in order to compute sigma(n), as described in Euler's article. - Thomas Baruchel, Nov 19 2003
Number of levels in the partitions of n + 1 with parts in {1,2}.
a(n) is the number of 3 X 3 matrices (symmetrical about each diagonal) M = {{a, b, c}, {b, d, b}, {c, b, a}} such that a + b + c = b + d + b = n + 2, a,b,c,d natural numbers; example: a(3) = 5 because (a,b,c,d) = (2,2,1,1), (1,2,2,1), (1,1,3,3), (3,1,1,3), (2,1,2,3). - Philippe Deléham, Apr 11 2007
Also numbers a(n) such that 24*a(n) + 1 = (6*m - 1)^2 are odd squares: 1, 25, 49, 121, 169, 289, 361, ..., m = 0, +-1, +-2, ... . - Zak Seidov, Mar 08 2008
From Matthew Vandermast, Oct 28 2008: (Start)
Numbers n for which A000326(n) is a member of A000332. Cf. A145920.
This sequence contains all members of A000332 and all nonnegative members of A145919. For values of n such that n*(3*n - 1)/2 belongs to A000332, see A145919. (End)
Starting with offset 1 = row sums of triangle A168258. - Gary W. Adamson, Nov 21 2009
Starting with offset 1 = Triangle A101688 * [1, 2, 3, ...]. - Gary W. Adamson, Nov 27 2009
Starting with offset 1 can be considered the first in an infinite set generated from A026741. Refer to the array in A175005. - Gary W. Adamson, Apr 03 2010
Vertex number of a square spiral whose edges have length A026741. The two axes of the spiral forming an "X" are A000326 and A005449. The four semi-axes forming an "X" are A049452, A049453, A033570 and the numbers >= 2 of A033568. - Omar E. Pol, Sep 08 2011
A general formula for the generalized k-gonal numbers is given by n*((k - 2)*n - k + 4)/2, n=0, +-1, +-2, ..., k >= 5. - Omar E. Pol, Sep 15 2011
a(n) is the number of 3-tuples (w,x,y) having all terms in {0,...,n} and 2*w = 2*x + y. - Clark Kimberling, Jun 04 2012
Generalized k-gonal numbers are second k-gonal numbers and positive terms of k-gonal numbers interleaved, k >= 5. - Omar E. Pol, Aug 04 2012
a(n) is the sum of the largest parts of the partitions of n+1 into exactly 2 parts. - Wesley Ivan Hurt, Jan 26 2013
Conway's relation mentioned by R. K. Guy is a relation between triangular numbers and generalized pentagonal numbers, two sequences from different families, but as triangular numbers are also generalized hexagonal numbers in this case we have a relation between two sequences from the same family. - Omar E. Pol, Feb 01 2013
Start with the sequence of all 0's. Add n to each value of a(n) and the next n - 1 terms. The result is the generalized pentagonal numbers. - Wesley Ivan Hurt, Nov 03 2014
(6k + 1) | a(4k). (3k + 1) | a(4k+1). (3k + 2) | a(4k+2). (6k + 5) | a(4k+3). - Jon Perry, Nov 04 2014
Enge, Hart and Johansson proved: "Every generalised pentagonal number c >= 5 is the sum of a smaller one and twice a smaller one, that is, there are generalised pentagonal numbers a, b < c such that c = 2a + b." (see link theorem 5). - Peter Luschny, Aug 26 2016
The Enge, et al. result for c >= 5 also holds for c >= 2 if 0 is included as a generalized pentagonal number. That is, 2 = 2*1 + 0. - Michael Somos, Jun 02 2018
Suggestion for title, where n actually matches the list and b-file: "Generalized pentagonal numbers: k(n)*(3*k(n) - 1)/2, where k(n) = A001057(n) = [0, 1, -1, 2, -2, 3, -3, ...], n >= 0" - Daniel Forgues, Jun 09 2018 & Jun 12 2018
Generalized k-gonal numbers are the partial sums of the sequence formed by the multiples of (k - 4) and the odd numbers (A005408) interleaved, with k >= 5. - Omar E. Pol, Jul 25 2018
The last digits form a symmetric cycle of length 40 [0, 1, 2, 5, ..., 5, 2, 1, 0], i.e., a(n) == a(n + 40) (mod 10) and a(n) == a(40*k - n - 1) (mod 10), 40*k > n. - Alejandro J. Becerra Jr., Aug 14 2018
Only 2, 5, and 7 are prime. All terms are of the form k*(k+1)/6, where 3 | k or 3 | k+1. For k > 6, the value divisible by 3 must have another factor d > 2, which will remain after the division by 6. - Eric Snyder, Jun 03 2022
8*a(n) is the product of two even numbers one of which is n + n mod 2. - Peter Luschny, Jul 15 2022
a(n) is the dot product of [1, 2, 3, ..., n] and repeat[1, 1/2]. a(5) = 12 = [1, 2, 3, 4, 5] dot [1, 1/2, 1, 1/2, 1] = [1 + 1 + 3 + 2 + 5]. - Gary W. Adamson, Dec 10 2022
Every nonnegative number is the sum of four terms of this sequence [S. Realis]. - N. J. A. Sloane, May 07 2023
From Peter Bala, Jan 06 2025: (Start)
The sequence terms are the exponents in the expansions of the following infinite products:
1) Product_{n >= 1} (1 - s(n)*q^n) = 1 + q + q^2 + q^5 + q^7 + q^12 + q^15 + ..., where s(n) = (-1)^(1 + mod(n+1,3)).
2) Product_{n >= 1} (1 - q^(2*n))*(1 - q^(3*n))^2/((1 - q^n)*(1 - q^(6*n))) = 1 + q + q^2 + q^5 + q^7 + q^12 + q^15 + ....
3) Product_{n >= 1} (1 - q^n)*(1 - q^(4*n))*(1 - q^(6*n))^5/((1 - q^(2*n))*(1 - q^(3*n))*(1 - q^(12*n)))^2 = 1 - q + q^2 - q^5 - q^7 + q^12 - q^15 + q^22 + q^26 - q^35 + ....
4) Product_{n >= 1} (1 - q^(2*n))^13/((1 - (-1)^n*q^n)*(1 - q^(4*n)))^5 = 1 - 5*q + 7*q^2 - 11*q^5 + 13*q^7 - 17*q^12 + 19*q^15 - + .... See Oliver, Theorem 1.1. (End)

Examples

			G.f. = x + 2*x^2 + 5*x^3 + 7*x^4 + 12*x^5 + 15*x^6 + 22*x^7 + 26*x^8 + 35*x^9 + ...
		

References

  • Enoch Haga, A strange sequence and a brilliant discovery, chapter 5 of Exploring prime numbers on your PC and the Internet, first revised ed., 2007 (and earlier ed.), pp. 53-70.
  • Ross Honsberger, Ingenuity in Mathematics, Random House, 1970, p. 117.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, (to appear), section 7.2.1.4, equation (18).
  • Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, 2nd ed., Wiley, NY, 1966, p. 231.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A080995 (characteristic function), A026741 (first differences), A034828 (partial sums), A165211 (mod 2).
Cf. A000326 (pentagonal numbers), A005449 (second pentagonal numbers), A000217 (triangular numbers).
Indices of nonzero terms of A010815, i.e., the (zero-based) indices of 1-bits of the infinite binary word to which the terms of A068052 converge.
Union of A036498 and A036499.
Sequences of generalized k-gonal numbers: this sequence (k=5), A000217 (k=6), A085787 (k=7), A001082 (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).
Column 1 of A195152.
Squares in APs: A221671, A221672.
Quadrisection: A049453(k), A033570(k), A033568(k+1), A049452(k+1), k >= 0.
Cf. A002620.

Programs

  • GAP
    a:=[0,1,2,5];; for n in [5..60] do a[n]:=2*a[n-2]-a[n-4]+3; od; a; # Muniru A Asiru, Aug 16 2018
    
  • Haskell
    a001318 n = a001318_list !! n
    a001318_list = scanl1 (+) a026741_list -- Reinhard Zumkeller, Nov 15 2015
    
  • Magma
    [(6*n^2 + 6*n + 1 - (2*n + 1)*(-1)^n)/16 : n in [0..50]]; // Wesley Ivan Hurt, Nov 03 2014
    
  • Magma
    [(3*n^2 + 2*n + (n mod 2) * (2*n + 1)) div 8: n in [0..70]]; // Vincenzo Librandi, Nov 04 2014
    
  • Maple
    A001318 := -(1+z+z**2)/(z+1)**2/(z-1)**3; # Simon Plouffe in his 1992 dissertation; gives sequence without initial zero
    A001318 := proc(n) (6*n^2+6*n+1)/16-(2*n+1)*(-1)^n/16 ; end proc: # R. J. Mathar, Mar 27 2011
  • Mathematica
    Table[n*(n+1)/6, {n, Select[Range[0, 100], Mod[#, 3] != 1 &]}]
    Select[Accumulate[Range[0,200]]/3,IntegerQ] (* Harvey P. Dale, Oct 12 2014 *)
    CoefficientList[Series[x (1 + x + x^2) / ((1 + x)^2 (1 - x)^3), {x, 0, 70}], x] (* Vincenzo Librandi, Nov 04 2014 *)
    LinearRecurrence[{1,2,-2,-1,1},{0,1,2,5,7},70] (* Harvey P. Dale, Jun 05 2017 *)
    a[ n_] := With[{m = Quotient[n + 1, 2]}, m (3 m + (-1)^n) / 2]; (* Michael Somos, Jun 02 2018 *)
  • PARI
    {a(n) = (3*n^2 + 2*n + (n%2) * (2*n + 1)) / 8}; /* Michael Somos, Mar 24 2011 */
    
  • PARI
    {a(n) = if( n<0, n = -1-n); polcoeff( x * (1 - x^3) / ((1 - x) * (1-x^2))^2 + x * O(x^n), n)}; /* Michael Somos, Mar 24 2011 */
    
  • PARI
    {a(n) = my(m = (n+1) \ 2); m * (3*m + (-1)^n) / 2}; /* Michael Somos, Jun 02 2018 */
    
  • Python
    def a(n):
        p = n % 2
        return (n + p)*(3*n + 2 - p) >> 3
    print([a(n) for n in range(60)])  # Peter Luschny, Jul 15 2022
    
  • Python
    def A001318(n): return n*(n+1)-(m:=n>>1)*(m+1)>>1 # Chai Wah Wu, Nov 23 2024
  • Sage
    @CachedFunction
    def A001318(n):
        if n == 0 : return 0
        inc = n//2 if is_even(n) else n
        return inc + A001318(n-1)
    [A001318(n) for n in (0..59)] # Peter Luschny, Oct 13 2012
    

Formula

Euler: Product_{n>=1} (1 - x^n) = Sum_{n=-oo..oo} (-1)^n*x^(n*(3*n - 1)/2).
A080995(a(n)) = 1: complement of A090864; A000009(a(n)) = A051044(n). - Reinhard Zumkeller, Apr 22 2006
Euler transform of length-3 sequence [2, 2, -1]. - Michael Somos, Mar 24 2011
a(-1 - n) = a(n) for all n in Z. a(2*n) = A005449(n). a(2*n - 1) = A000326(n). - Michael Somos, Mar 24 2011. [The extension of the recurrence to negative indices satisfies the signature (1,2,-2,-1,1), but not the definition of the sequence m*(3*m -1)/2, because there is no m such that a(-1) = 0. - Klaus Purath, Jul 07 2021]
a(n) = 3 + 2*a(n-2) - a(n-4). - Ant King, Aug 23 2011
Product_{k>0} (1 - x^k) = Sum_{k>=0} (-1)^k * x^a(k). - Michael Somos, Mar 24 2011
G.f.: x*(1 + x + x^2)/((1 + x)^2*(1 - x)^3).
a(n) = n*(n + 1)/6 when n runs through numbers == 0 or 2 mod 3. - Barry E. Williams
a(n) = A008805(n-1) + A008805(n-2) + A008805(n-3), n > 2. - Ralf Stephan, Apr 26 2003
Sequence consists of the pentagonal numbers (A000326), followed by A000326(n) + n and then the next pentagonal number. - Jon Perry, Sep 11 2003
a(n) = (6*n^2 + 6*n + 1)/16 - (2*n + 1)*(-1)^n/16; a(n) = A034828(n+1) - A034828(n). - Paul Barry, May 13 2005
a(n) = Sum_{k=1..floor((n+1)/2)} (n - k + 1). - Paul Barry, Sep 07 2005
a(n) = A000217(n) - A000217(floor(n/2)). - Pierre CAMI, Dec 09 2007
If n even a(n) = a(n-1) + n/2 and if n odd a(n) = a(n-1) + n, n >= 2. - Pierre CAMI, Dec 09 2007
a(n)-a(n-1) = A026741(n) and it follows that the difference between consecutive terms is equal to n if n is odd and to n/2 if n is even. Hence this is a self-generating sequence that can be simply constructed from knowledge of the first term alone. - Ant King, Sep 26 2011
a(n) = (1/2)*ceiling(n/2)*ceiling((3*n + 1)/2). - Mircea Merca, Jul 13 2012
a(n) = (A008794(n+1) + A000217(n))/2 = A002378(n) - A085787(n). - Omar E. Pol, Jan 12 2013
a(n) = floor((n + 1)/2)*((n + 1) - (1/2)*floor((n + 1)/2) - 1/2). - Wesley Ivan Hurt, Jan 26 2013
From Oskar Wieland, Apr 10 2013: (Start)
a(n) = a(n+1) - A026741(n),
a(n) = a(n+2) - A001651(n),
a(n) = a(n+3) - A184418(n),
a(n) = a(n+4) - A007310(n),
a(n) = a(n+6) - A001651(n)*3 = a(n+6) - A016051(n),
a(n) = a(n+8) - A007310(n)*2 = a(n+8) - A091999(n),
a(n) = a(n+10)- A001651(n)*5 = a(n+10)- A072703(n),
a(n) = a(n+12)- A007310(n)*3,
a(n) = a(n+14)- A001651(n)*7. (End)
a(n) = (A007310(n+1)^2 - 1)/24. - Richard R. Forberg, May 27 2013; corrected by Zak Seidov, Mar 14 2015; further corrected by Jianing Song, Oct 24 2018
a(n) = Sum_{i = ceiling((n+1)/2)..n} i. - Wesley Ivan Hurt, Jun 08 2013
G.f.: x*G(0), where G(k) = 1 + x*(3*k + 4)/(3*k + 2 - x*(3*k + 2)*(3*k^2 + 11*k + 10)/(x*(3*k^2 + 11*k + 10) + (k + 1)*(3*k + 4)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 16 2013
Sum_{n>=1} 1/a(n) = 6 - 2*Pi/sqrt(3). - Vaclav Kotesovec, Oct 05 2016
a(n) = Sum_{i=1..n} numerator(i/2) = Sum_{i=1..n} denominator(2/i). - Wesley Ivan Hurt, Feb 26 2017
a(n) = A000292(A001651(n))/A001651(n), for n>0. - Ivan N. Ianakiev, May 08 2018
a(n) = ((-5 + (-1)^n - 6n)*(-1 + (-1)^n - 6n))/96. - José de Jesús Camacho Medina, Jun 12 2018
a(n) = Sum_{k=1..n} k/gcd(k,2). - Pedro Caceres, Apr 23 2019
Quadrisection. For r = 0,1,2,3: a(r + 4*k) = 6*k^2 + sqrt(24*a(r) + 1)*k + a(r), for k >= 1, with inputs (k = 0) {0,1,2,5}. These are the sequences A049453(k), A033570(k), A033568(k+1), A049452(k+1), for k >= 0, respectively. - Wolfdieter Lang, Feb 12 2021
a(n) = a(n-4) + sqrt(24*a(n-2) + 1), n >= 4. - Klaus Purath, Jul 07 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = 6*(log(3)-1). - Amiram Eldar, Feb 28 2022
a(n) = A002620(n) + A008805(n-1). Gary W. Adamson, Dec 10 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 5*x + 3*x^2)*sinh(x))/8. - Stefano Spezia, Aug 01 2024

A001107 10-gonal (or decagonal) numbers: a(n) = n*(4*n-3).

Original entry on oeis.org

0, 1, 10, 27, 52, 85, 126, 175, 232, 297, 370, 451, 540, 637, 742, 855, 976, 1105, 1242, 1387, 1540, 1701, 1870, 2047, 2232, 2425, 2626, 2835, 3052, 3277, 3510, 3751, 4000, 4257, 4522, 4795, 5076, 5365, 5662, 5967, 6280, 6601, 6930, 7267, 7612, 7965, 8326
Offset: 0

Views

Author

Keywords

Comments

Write 0, 1, 2, ... in a square spiral, with 0 at the origin and 1 immediately below it; sequence gives numbers on the negative y-axis (see Example section).
Number of divisors of 48^(n-1) for n > 0. - J. Lowell, Aug 30 2008
a(n) is the Wiener index of the graph obtained by connecting two copies of the complete graph K_n by an edge (for n = 3, approximately: |>-<|). The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph. - Emeric Deutsch, Sep 20 2010
This sequence does not contain any squares other than 0 and 1. See A188896. - T. D. Noe, Apr 13 2011
For n > 0: right edge of the triangle A033293. - Reinhard Zumkeller, Jan 18 2012
Sequence found by reading the line from 0, in the direction 0, 10, ... and the parallel line from 1, in the direction 1, 27, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Jul 18 2012
Partial sums give A007585. - Omar E. Pol, Jan 15 2013
This is also a star pentagonal number: a(n) = A000326(n) + 5*A000217(n-1). - Luciano Ancora, Mar 28 2015
Also the number of undirected paths in the n-sunlet graph. - Eric W. Weisstein, Sep 07 2017
After 0, a(n) is the sum of 2*n consecutive integers starting from n-1. - Bruno Berselli, Jan 16 2018
Number of corona of an H0 hexagon with a T(n) triangle. - Craig Knecht, Dec 13 2024

Examples

			On a square lattice, place the nonnegative integers at lattice points forming a spiral as follows: place "0" at the origin; then move one step downward (i.e., in the negative y direction) and place "1" at the lattice point reached; then turn 90 degrees in either direction and place a "2" at the next lattice point; then make another 90-degree turn in the same direction and place a "3" at the lattice point; etc. The terms of the sequence will lie along the negative y-axis, as seen in the example below:
  99  64--65--66--67--68--69--70--71--72
   |   |                               |
  98  63  36--37--38--39--40--41--42  73
   |   |   |                       |   |
  97  62  35  16--17--18--19--20  43  74
   |   |   |   |               |   |   |
  96  61  34  15   4---5---6  21  44  75
   |   |   |   |   |       |   |   |   |
  95  60  33  14   3  *0*  7  22  45  76
   |   |   |   |   |   |   |   |   |   |
  94  59  32  13   2--*1*  8  23  46  77
   |   |   |   |           |   |   |   |
  93  58  31  12--11-*10*--9  24  47  78
   |   |   |                   |   |   |
  92  57  30--29--28-*27*-26--25  48  79
   |   |                           |   |
  91  56--55--54--53-*52*-51--50--49  80
   |                                   |
  90--89--88--87--86-*85*-84--83--82--81
[Edited by _Jon E. Schoenfield_, Jan 02 2017]
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 189.
  • Bruce C. Berndt, Ramanujan's Notebooks, Part II, Springer; see p. 23.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 6.
  • S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A093565 ((8, 1) Pascal, column m = 2). Partial sums of A017077.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Cf. A003215.

Programs

  • Magma
    [4*n^2-3*n : n in [0..50] ]; // Wesley Ivan Hurt, Jun 05 2014
    
  • Maple
    A001107:=-(1+7*z)/(z-1)**3; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {0, 1, 10}, 60] (* Harvey P. Dale, May 08 2012 *)
    Table[PolygonalNumber[RegularPolygon[10], n], {n, 0, 46}] (* Arkadiusz Wesolowski, Aug 27 2016 *)
    Table[4 n^2 - 3 n, {n, 0, 49}] (* Alonso del Arte, Jan 24 2017 *)
    PolygonalNumber[10, Range[0, 20]] (* Eric W. Weisstein, Sep 07 2017 *)
    LinearRecurrence[{3, -3, 1}, {1, 10, 27}, {0, 20}] (* Eric W. Weisstein, Sep 07 2017 *)
  • PARI
    a(n)=4*n^2-3*n
    
  • Python
    a=lambda n: 4*n**2-3*n # Indranil Ghosh, Jan 01 2017
    def aList(): # Intended to compute the initial segment of the sequence, not isolated terms.
         x, y = 1, 1
         yield 0
         while True:
             yield x
             x, y = x + y + 8, y + 8
    A001107 = aList()
    print([next(A001107) for i in range(49)]) # Peter Luschny, Aug 04 2019

Formula

a(n) = A033954(-n) = A074377(2*n-1).
a(n) = n + 8*A000217(n-1). - Floor van Lamoen, Oct 14 2005
G.f.: x*(1 + 7*x)/(1 - x)^3.
Partial sums of odd numbers 1 mod 8, i.e., 1, 1 + 9, 1 + 9 + 17, ... . - Jon Perry, Dec 18 2004
1^3 + 3^3*(n-1)/(n+1) + 5^3*((n-1)*(n-2))/((n+1)*(n+2)) + 7^3*((n-1)*(n-2)*(n-3))/((n+1)*(n+2)*(n+3)) + ... = n*(4*n-3) [Ramanujan]. - Neven Juric, Apr 15 2008
Starting (1, 10, 27, 52, ...), this is the binomial transform of [1, 9, 8, 0, 0, 0, ...]. - Gary W. Adamson, Apr 30 2008
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2, a(0)=0, a(1)=1, a(2)=10. - Jaume Oliver Lafont, Dec 02 2008
a(n) = 8*n + a(n-1) - 7 for n>0, a(0)=0. - Vincenzo Librandi, Jul 10 2010
a(n) = 8 + 2*a(n-1) - a(n-2). - Ant King, Sep 04 2011
a(n) = A118729(8*n). - Philippe Deléham, Mar 26 2013
a(8*a(n) + 29*n+1) = a(8*a(n) + 29*n) + a(8*n + 1). - Vladimir Shevelev, Jan 24 2014
Sum_{n >= 1} 1/a(n) = Pi/6 + log(2) = 1.216745956158244182494339352... = A244647. - Vaclav Kotesovec, Apr 27 2016
From Ilya Gutkovskiy, Aug 28 2016: (Start)
E.g.f.: x*(1 + 4*x)*exp(x).
Sum_{n >= 1} (-1)^(n+1)/a(n) = (sqrt(2)*Pi - 2*log(2) + 2*sqrt(2)*log(1 + sqrt(2)))/6 = 0.92491492293323294695... (End)
a(n) = A000217(3*n-2) - A000217(n-2). In general, if P(k,n) be the n-th k-gonal number and T(n) be the n-th triangular number, A000217(n), then P(T(k),n) = T((k-1)*n - (k-2)) - T(k-3)*T(n-2). - Charlie Marion, Sep 01 2020
Product_{n>=2} (1 - 1/a(n)) = 4/5. - Amiram Eldar, Jan 21 2021
a(n) = A003215(n-1) + A000290(n) - 1. - Leo Tavares, Jul 23 2022

A001082 Generalized octagonal numbers: k*(3*k-2), k=0, +- 1, +- 2, +-3, ...

Original entry on oeis.org

0, 1, 5, 8, 16, 21, 33, 40, 56, 65, 85, 96, 120, 133, 161, 176, 208, 225, 261, 280, 320, 341, 385, 408, 456, 481, 533, 560, 616, 645, 705, 736, 800, 833, 901, 936, 1008, 1045, 1121, 1160, 1240, 1281, 1365, 1408, 1496, 1541, 1633, 1680, 1776, 1825, 1925, 1976
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form 3*m^2+2*m, m an integer.
3*a(n) + 1 is a perfect square.
a(n) mod 10 belongs to a periodic sequence: 0, 1, 5, 8, 6, 1, 3, 0, 6, 5, 5, 6, 0, 3, 1, 6, 8, 5, 1, 0. - Mohamed Bouhamida, Sep 04 2009
A089801 is the characteristic function. - R. J. Mathar, Oct 07 2011
Exponents of powers of q in one form of the quintuple product identity. (-x^-2 + 1) * q^0 + (x^-3 - x) * q^1 + (-x^-5 + x^3) * q^5 + (x^-6 - x^4) * q^8 + ... = Sum_{n>=0} q^(3*n^2 + 2*n) * (x^(3*n) - x^(-3*n - 2)) = Product_{k>0} (1 - x * q^(2*k - 1)) * (1 - x^-1 * q^(2*k - 1)) * (1 - q^(2*k)) * (1 - x^2 * q^(4*k)) * (1 - x^-2 * q^(4*k - 4)). - Michael Somos, Dec 21 2011
The offset 0 would also be valid here, all other entries of generalized k-gonal numbers have offset 0 (see cross references). - Omar E. Pol, Jan 12 2013
Also, x values of the Diophantine equation x(x+3)+(x+1)(x+2) = (x+y)^2+(x-y)^2. - Bruno Berselli, Mar 29 2013
Numbers n such that Sum_{i=1..n} 2*i*(n-i)/n is an integer (the addend is the harmonic mean of i and n-i). - Wesley Ivan Hurt, Sep 14 2014
Equivalently, integers of the form m*(m+2)/3 (nonnegative values of m are listed in A032766). - Bruno Berselli, Jul 18 2016
Exponents of q in the expansion of Sum_{n >= 0} ( q^n * Product_{k = 1..n} (1 - q^(2*k-1)) ) = 1 + q - q^5 - q^8 + q^16 + q^21 - - + + .... - Peter Bala, Dec 03 2020
Exponents of q in the expansion of Product_{n >= 1} (1 - q^(6*n))*(1 + q^(6*n-1))*(1 + q^(6*n-5)) = 1 + q + q^5 + q^8 + q^16 + q^21 + .... - Peter Bala, Dec 09 2020
Exponents of q in the expansion of Product_{n >= 1} (1 - q^n)^2*(1 - q^(4*n))^2 /(1 - q^(2*n)) = 1 - 2*q + 4*q^5 - 5*q^8 + 7*q^16 - + ... (a consequence of the quintuple product identity). The series coefficients are a signed version of A001651. - Peter Bala, Feb 16 2021
From Peter Bala, Nov 26 2024: (Start)
Apart from the first two terms, the exponents of q in the expansion of Sum_{n >= 1} q^(3*n+2) * (Product_{k = 2..n} 1 - q^(2*k-1)) = q^5 + q^8 - q^16 - q^21 + + - - ... (in Andrews, equation 8, replace q with q^2 and set x = q).
Exponents of q^2 in the expansion of Sum_{n >= 0} q^n / (Product_{k = 1..n+1 } 1 + q^(2*k-1)) = 1 + (q^2)^1 - (q^2)^5 - (q^2)^8 + (q^2)^16 + (q^2)^21 - - + + ... (Chen, equation 22). (End)

Examples

			For the ninth comment: 65 is in the sequence because 65 = 13*(13+2)/3 or also 65 = -15*(-15+2)/3. - _Bruno Berselli_, Jul 18 2016
		

Crossrefs

Partial sums of A022998.
Column 4 of A195152. A045944.
Sequences of generalized k-gonal numbers: A001318 (k=5), A000217 (k=6), A085787 (k=7), this sequence (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).
Cf. sequences of the form m*(m+k)/(k+1) listed in A274978. [Bruno Berselli, Jul 25 2016]

Programs

  • Haskell
    a001082 n = a001082_list !! n
    a001082_list = scanl (+) 0 $ tail a022998_list
    -- Reinhard Zumkeller, Mar 31 2012
    
  • Magma
    [n^2 - n - Floor(n/2)^2 : n in [1..50]]; // Wesley Ivan Hurt, Sep 14 2014
  • Maple
    seq(n*(n-1)-floor(n/2)^2, n=1..51); # Gary Detlefs, Feb 23 2010
  • Mathematica
    Table[If[EvenQ[n], n*(3*n-4)/4, (n-1) (3*n+1)/4], {n, 100}]
    LinearRecurrence[{1,2,-2,-1,1},{0,1,5,8,16},60] (* Harvey P. Dale, Feb 03 2024 *)
  • PARI
    {a(n) = if( n%2, (n-1) * (3*n + 1) / 4, n * (3*n - 4) / 4)};
    

Formula

a(n) = n*(3*n-4)/4 if n even, (n-1)*(3*n+1)/4 if n odd.
a(n) = n^2 - n - floor(n/2)^2.
G.f.: Sum_{n>=0} (-1)^n*[x^(a(2n+1)) + x^(a(2n+2))] = 1/1 - (x-x^2)/1 - (x^2-x^4)/1 - (x^3-x^6)/1 - ... - (x^k - x^(2k))/1 - ... (continued fraction where k=1..inf). - Paul D. Hanna, Aug 16 2002
a(n+1) = ceiling(n/2)^2 + A046092(floor(n/2)).
a(2n) = n(3n-2) = A000567(n), a(2n+1) = n(3n+2) = A045944(n). - Mohamed Bouhamida, Nov 06 2007
O.g.f.: -x^2*(x^2+4*x+1)/((x-1)^3*(1+x)^2). - R. J. Mathar, Apr 15 2008
a(n) = n^2+n-ceiling(n/2)^2 with offset 0 and a(0)=0. - Gary Detlefs, Feb 23 2010
a(n) = (6*n^2-6*n-1-(2*n-1)*(-1)^n)/8. - Luce ETIENNE, Dec 11 2014
E.g.f.: (3*x^2*exp(x) + x*exp(-x) - sinh(x))/4. - Ilya Gutkovskiy, Jul 15 2016
Sum_{n>=2} 1/a(n) = (9 + 2*sqrt(3)*Pi)/12. - Vaclav Kotesovec, Oct 05 2016
Sum_{n>=2} (-1)^n/a(n) = 3*log(3)/2 - 3/4. - Amiram Eldar, Feb 28 2022

Extensions

New sequence name from Matthew Vandermast, Apr 10 2003
Editorial changes by N. J. A. Sloane, Feb 03 2012
Edited by Omar E. Pol, Jun 09 2012

A085787 Generalized heptagonal numbers: m*(5*m - 3)/2, m = 0, +-1, +-2 +-3, ...

Original entry on oeis.org

0, 1, 4, 7, 13, 18, 27, 34, 46, 55, 70, 81, 99, 112, 133, 148, 172, 189, 216, 235, 265, 286, 319, 342, 378, 403, 442, 469, 511, 540, 585, 616, 664, 697, 748, 783, 837, 874, 931, 970, 1030, 1071, 1134, 1177, 1243, 1288, 1357, 1404, 1476, 1525, 1600, 1651, 1729
Offset: 0

Views

Author

Jon Perry, Jul 23 2003

Keywords

Comments

Zero together with the partial sums of A080512. - Omar E. Pol, Sep 10 2011
Second heptagonal numbers (A147875) and positive terms of A000566 interleaved. - Omar E. Pol, Aug 04 2012
These numbers appear in a theta function identity. See the Hardy-Wright reference, Theorem 355 on p. 284. See the g.f. of A113429. - Wolfdieter Lang, Oct 28 2016
Characteristic function is A133100. - Michael Somos, Jan 30 2017
40*a(n) + 9 is a square. - Bruno Berselli, Apr 18 2018
Numbers k such that the concatenation k225 is a square. - Bruno Berselli, Nov 07 2018
The sequence terms occur as exponents in the expansion of Sum_{n >= 0} q^(n*(n+1)) * Product_{k >= n+1} 1 - q^k = 1 - q - q^4 + q^7 + q^13 - q^18 - q^27 + + - - ... (see Hardy and Wright, Theorem 363, p. 290). - Peter Bala, Dec 15 2024

Examples

			From the first formula: a(5) = A000217(5) + A000217(2) = 15 + 3 = 18.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, p. 284.

Crossrefs

Column 3 of A195152.
Sequences of generalized k-gonal numbers: A001318 (k=5), A000217 (k=6), this sequence (k=7), A001082 (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).

Programs

  • Haskell
    a085787 n = a085787_list !! n
    a085787_list = scanl (+) 0 a080512_list
    -- Reinhard Zumkeller, Apr 06 2015
  • Magma
    [5*n*(n+1)/8-1/16+(-1)^n*(2*n+1)/16: n in [0..60]]; // Vincenzo Librandi, Sep 11 2011
    
  • Mathematica
    Select[Table[(n*(n+1)/2-1)/5,{n,500}],IntegerQ] (* Vladimir Joseph Stephan Orlovsky, Feb 06 2012 *)
  • PARI
    t(n)=n*(n+1)/2
    for(i=0,40,print1(t(i)+t(floor(i/2)), ", "))
    
  • PARI
    {a(n) = (5*(-n\2)^2 - (-n\2)*3*(-1)^n) / 2}; /* Michael Somos, Oct 17 2006 */
    

Formula

a(n) = A000217(n) + A000217(floor(n/2)).
a(2*n-1) = A000566(n).
a(2*n) = A147875(n). - Bruno Berselli, Apr 18 2018
G.f.: x * (1 + 3*x + x^2) / ((1 - x) * (1 - x^2)^2). a(n) = a(-1-n) for all n in Z. - Michael Somos, Oct 17 2006
a(n) = 5*n*(n + 1)/8 - 1/16 + (-1)^n*(2*n + 1)/16. - R. J. Mathar, Jun 29 2009
a(n) = (A000217(n) + A001082(n))/2 = (A001318(n) + A118277(n))/2. - Omar E. Pol, Jan 11 2013
a(n) = A002378(n) - A001318(n). - Omar E. Pol, Oct 23 2013
Sum_{n>=1} 1/a(n) = 10/9 + (2*sqrt(1 - 2/sqrt(5))*Pi)/3. - Vaclav Kotesovec, Oct 05 2016
E.g.f.: (x*(9 + 5*x)*exp(x) - (1 - 2*x)*sinh(x))/8. - Franck Maminirina Ramaharo, Nov 07 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = 5*log(5)/3 - 10/9 - 2*sqrt(5)*log(phi)/3, where phi is the golden ratio (A001622). - Amiram Eldar, Feb 28 2022

Extensions

New name from T. D. Noe, Apr 21 2006
Formula in sequence name added by Omar E. Pol, May 28 2012

A033996 8 times triangular numbers: a(n) = 4*n*(n+1).

Original entry on oeis.org

0, 8, 24, 48, 80, 120, 168, 224, 288, 360, 440, 528, 624, 728, 840, 960, 1088, 1224, 1368, 1520, 1680, 1848, 2024, 2208, 2400, 2600, 2808, 3024, 3248, 3480, 3720, 3968, 4224, 4488, 4760, 5040, 5328, 5624, 5928, 6240, 6560, 6888, 7224, 7568, 7920, 8280
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Write 0, 1, 2, ... in a clockwise spiral; sequence gives numbers on one of 4 diagonals.
Also, least m > n such that T(m)*T(n) is a square and more precisely that of A055112(n). {T(n) = A000217(n)}. - Lekraj Beedassy, May 14 2004
Also sequence found by reading the line from 0, in the direction 0, 8, ... and the same line from 0, in the direction 0, 24, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. Axis perpendicular to A195146 in the same spiral. - Omar E. Pol, Sep 18 2011
Number of diagonals with length sqrt(5) in an (n+1) X (n+1) square grid. Every 1 X 2 rectangle has two such diagonals. - Wesley Ivan Hurt, Mar 25 2015
Imagine a board made of squares (like a chessboard), one of whose squares is completely surrounded by square-shaped layers made of adjacent squares. a(n) is the total number of squares in the first to n-th layer. a(1) = 8 because there are 8 neighbors to the unit square; adding them gives a 3 X 3 square. a(2) = 24 = 8 + 16 because we need 16 more squares in the next layer to get a 5 X 5 square: a(n) = (2*n+1)^2 - 1 counting the (2n+1) X (2n+1) square minus the central square. - R. J. Cano, Sep 26 2015
The three platonic solids (the simplex, hypercube, and cross-polytope) with unit side length in n dimensions all have rational volume if and only if n appears in this sequence, after 0. - Brian T Kuhns, Feb 26 2016
The number of active (ON, black) cells in the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 645", based on the 5-celled von Neumann neighborhood. - Robert Price, May 19 2016
The square root of a(n), n>0, has continued fraction [2n; {1,4n}] with whole number part 2n and periodic part {1,4n}. - Ron Knott, May 11 2017
Numbers k such that k+1 is a square and k is a multiple of 4. - Bruno Berselli, Sep 28 2017
a(n) is the number of vertices of the octagonal network O(n,n); O(m,n) is defined by Fig. 1 of the Siddiqui et al. reference. - Emeric Deutsch, May 13 2018
a(n) is the number of vertices in conjoined n X n octagons which are arranged into a square array, a.k.a. truncated square tiling. - Donghwi Park, Dec 20 2020
a(n-2) is the number of ways to place 3 adjacent marks in a diagonal, horizontal, or vertical row on an n X n tic-tac-toe grid. - Matej Veselovac, May 28 2021

Examples

			Spiral with 0, 8, 24, 48, ... along lower right diagonal:
.
  36--37--38--39--40--41--42
   |                       |
  35  16--17--18--19--20  43
   |   |               |   |
  34  15   4---5---6  21  44
   |   |   |       |   |   |
  33  14   3   0   7  22  45
   |   |   |   | \ |   |   |
  32  13   2---1   8  23  46
   |   |           | \ |   |
  31  12--11--10---9  24  47
   |                   | \ |
  30--29--28--27--26--25  48
                            \
[Reformatted by _Jon E. Schoenfield_, Dec 25 2016]
		

References

  • Stuart M. Ellerstein, J. Recreational Math. 29 (3) 188, 1998.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
  • Stephen Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Cf. A000217, A016754, A002378, A024966, A027468, A028895, A028896, A045943, A046092, A049598, A088538, A124080, A008590 (first differences), A130809 (partial sums).
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

Programs

  • Magma
    [ 4*n*(n+1) : n in [0..50] ]; // Wesley Ivan Hurt, Jun 09 2014
  • Maple
    seq(8*binomial(n+1, 2), n=0..46); # Zerinvary Lajos, Nov 24 2006
    [seq((2*n+1)^2-1, n=0..46)];
  • Mathematica
    Table[(2n - 1)^2 - 1, {n, 50}] (* Alonso del Arte, Mar 31 2013 *)
  • PARI
    nsqm1(n) = { forstep(x=1,n,2, y = x*x-1; print1(y, ", ") ) }
    

Formula

a(n) = 4*n^2 + 4*n = (2*n+1)^2 - 1.
G.f.: 8*x/(1-x)^3.
a(n) = A016754(n) - 1 = 2*A046092(n) = 4*A002378(n). - Lekraj Beedassy, May 25 2004
a(n) = A049598(n) - A046092(n); a(n) = A124080(n) - A002378(n). - Zerinvary Lajos, Mar 06 2007
a(n) = 8*A000217(n). - Omar E. Pol, Dec 12 2008
a(n) = A005843(n) * A163300(n). - Juri-Stepan Gerasimov, Jul 26 2009
a(n) = a(n-1) + 8*n (with a(0)=0). - Vincenzo Librandi, Nov 17 2010
For n > 0, a(n) = A058031(n+1) - A062938(n-1). - Charlie Marion, Apr 11 2013
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Wesley Ivan Hurt, Mar 25 2015
a(n) = A000578(n+1) - A152618(n). - Bui Quang Tuan, Apr 01 2015
a(n) - a(n-1) = A008590(n), n > 0. - Altug Alkan, Sep 26 2015
From Ilya Gutkovskiy, May 19 2016: (Start)
E.g.f.: 4*x*(2 + x)*exp(x).
Sum_{n>=1} 1/a(n) = 1/4. (End)
Product_{n>=1} a(n)/A016754(n) = Pi/4. - Daniel Suteu, Dec 25 2016
a(n) = A056220(n) + A056220(n+1). - Bruce J. Nicholson, May 29 2017
sqrt(a(n)+1) - sqrt(a(n)) = (sqrt(n+1) - sqrt(n))^2. - Seiichi Manyama, Dec 23 2018
a(n)*a(n+k) + 4*k^2 = m^2 where m = (a(n) + a(n+k))/2 - 2*k^2; for k=1, m = 4*n^2 + 8*n + 2 = A060626(n). - Ezhilarasu Velayutham, May 22 2019
Sum_{n>=1} (-1)^n/a(n) = 1/4 - log(2)/2. - Vaclav Kotesovec, Dec 21 2020
From Amiram Eldar, Feb 21 2023: (Start)
Product_{n>=1} (1 - 1/a(n)) = -(4/Pi)*cos(Pi/sqrt(2)).
Product_{n>=1} (1 + 1/a(n)) = 4/Pi (A088538). (End)

A058695 Number of ways to partition 2n+1 into positive integers.

Original entry on oeis.org

1, 3, 7, 15, 30, 56, 101, 176, 297, 490, 792, 1255, 1958, 3010, 4565, 6842, 10143, 14883, 21637, 31185, 44583, 63261, 89134, 124754, 173525, 239943, 329931, 451276, 614154, 831820, 1121505, 1505499, 2012558, 2679689, 3554345, 4697205, 6185689, 8118264, 10619863
Offset: 0

Views

Author

N. J. A. Sloane, Dec 31 2000

Keywords

Comments

A bisection of A000041, the other one is A058696.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). - Michael Somos, Feb 16 2014
a(n) is the number of partitions of 3n-1 having n as a part, for n >=1. Also, a(n+1) is the number of partitions of 3n having n as a part, for n >= 1. - Clark Kimberling, Mar 02 2014

Examples

			G.f. = 1 + 3*x + 7*x^2 + 15*x^3 + 30*x^4 + 56*x^5 + 101*x^6 + 176*x^7 + 297*x^8 + ...
G.f. = q^23 + 3*q^71 + 7*q^119 + 15*q^167 + 30*q^215 + 56*q^263 + 101*q^311 + ...
		

Crossrefs

Programs

  • Maple
    a:= n-> combinat[numbpart](2*n+1):
    seq(a(n), n=0..42);  # Alois P. Heinz, Jan 29 2020
  • Mathematica
    nn=100;Table[CoefficientList[Series[Product[1/(1-x^i),{i,1,nn}],{x,0,nn}],x][[2i]],{i,1,nn/2}] (* Geoffrey Critzer, Sep 28 2013 *)
    (* also *)
    Table[PartitionsP[2 n + 1], {n, 0, 40}] (* Clark Kimberling, Mar 02 2014 *)
    (* also *)
    Table[Count[IntegerPartitions[3 n - 1], p_ /; MemberQ[p, n]], {n, 20}]   (* Clark Kimberling, Mar 02 2014 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / eta(x + O(x^(2*n + 2))), 2*n + 1))}; /* Michael Somos, Apr 25 2003 */
    
  • PARI
    a(n) = numbpart(2*n+1); \\ Michel Marcus, Sep 28 2013

Formula

a(n) = A000041(2*n + 1).
Euler transform of period 16 sequence [ 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 1, 3, 1, ...]. - Michael Somos, Apr 25 2003
G.f.: (Sum_{k>=0} x^A074377(k)) / (Product_{k>0} (1 - x^k))^2. - Michael Somos, Apr 25 2003
Expansion of f(x^1, x^7) / f(-x)^2 in powers of x where f() is a Ramanujan theta function. - Michael Somos, Feb 16 2014
Convolution of A000041 and A078408. - Michael Somos, Feb 16 2014

A033954 Second 10-gonal (or decagonal) numbers: n*(4*n+3).

Original entry on oeis.org

0, 7, 22, 45, 76, 115, 162, 217, 280, 351, 430, 517, 612, 715, 826, 945, 1072, 1207, 1350, 1501, 1660, 1827, 2002, 2185, 2376, 2575, 2782, 2997, 3220, 3451, 3690, 3937, 4192, 4455, 4726, 5005, 5292, 5587, 5890, 6201, 6520, 6847, 7182, 7525, 7876, 8235
Offset: 0

Views

Author

Keywords

Comments

Same as A033951 except start at 0. See example section.
Bisection of A074377. Also sequence found by reading the line from 0, in the direction 0, 22, ... and the line from 7, in the direction 7, 45, ..., in the square spiral whose vertices are the generalized 10-gonal numbers A074377. - Omar E. Pol, Jul 24 2012

Examples

			  36--37--38--39--40--41--42
   |                       |
  35  16--17--18--19--20  43
   |   |               |   |
  34  15   4---5---6  21  44
   |   |   |       |   |   |
  33  14   3   0===7==22==45==76=>
   |   |   |   |   |   |
  32  13   2---1   8  23
   |   |           |   |
  31  12--11--10---9  24
   |                   |
  30--29--28--27--26--25
		

References

  • S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.

Crossrefs

Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Second n-gonal numbers: A005449, A014105, A147875, A045944, A179986, this sequence, A062728, A135705.
Cf. A060544.

Programs

  • GAP
    List([0..50], n-> n*(4*n+3)) # G. C. Greubel, May 24 2019
  • Magma
    [n*(4*n+3): n in [0..50]]; // G. C. Greubel, May 24 2019
    
  • Mathematica
    Table[n(4n+3),{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{0,7,22},50] (* Harvey P. Dale, May 06 2018 *)
  • PARI
    a(n)=4*n^2+3*n
    
  • Sage
    [n*(4*n+3) for n in (0..50)] # G. C. Greubel, May 24 2019
    

Formula

a(n) = A001107(-n) = A074377(2*n).
G.f.: x*(7+x)/(1-x)^3. - Michael Somos, Mar 03 2003
a(n) = a(n-1) + 8*n - 1 with a(0)=0. - Vincenzo Librandi, Jul 20 2010
For n>0, Sum_{j=0..n} (a(n) + j)^4 + (4*A000217(n))^3 = Sum_{j=n+1..2n} (a(n) + j)^4; see also A045944. - Charlie Marion, Dec 08 2007, edited by Michel Marcus, Mar 14 2014
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) with a(0) = 0, a(1) = 7, a(2) = 22. - Philippe Deléham, Mar 26 2013
a(n) = A118729(8n+6). - Philippe Deléham, Mar 26 2013
a(n) = A002943(n) + n = A007742(n) + 2n = A016742(n) + 3n = A033991(n) + 4n = A002939(n) + 5n = A001107(n) + 6n = A033996(n) - n. - Philippe Deléham, Mar 26 2013
Sum_{n>=1} 1/a(n) = 4/9 + Pi/6 - log(2) = 0.2748960394827980081... . - Vaclav Kotesovec, Apr 27 2016
E.g.f.: exp(x)*x*(7 + 4*x). - Stefano Spezia, Jun 08 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(2)) + log(2)/3 - 4/9 - sqrt(2)*arcsinh(1)/3. - Amiram Eldar, Nov 28 2021
For n>0, (a(n)^2 + n)/(a(n) + n) = (4*n + 1)^2/4, a ratio of two squares. - Rick L. Shepherd, Feb 23 2022
a(n) = A060544(n+1) - A000217(n+1). - Leo Tavares, Mar 31 2022

A118277 Generalized 9-gonal (or enneagonal) numbers: m*(7*m - 5)/2 with m = 0, 1, -1, 2, -2, 3, -3, ...

Original entry on oeis.org

0, 1, 6, 9, 19, 24, 39, 46, 66, 75, 100, 111, 141, 154, 189, 204, 244, 261, 306, 325, 375, 396, 451, 474, 534, 559, 624, 651, 721, 750, 825, 856, 936, 969, 1054, 1089, 1179, 1216, 1311, 1350, 1450, 1491, 1596, 1639, 1749, 1794, 1909, 1956, 2076, 2125, 2250
Offset: 0

Views

Author

T. D. Noe, Apr 21 2006

Keywords

Comments

Partial sums of A195140. - Omar E. Pol, Sep 13 2011
The characteristic function starts 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0 , ... and has the generating function f(x,x^6) in terms of Ramanujan's two-variable theta function. See A080995, A010054, A133100 etc. - Omar E. Pol, Jul 13 2012
Also A179986 and positive terms of A001106 interleaved. - Omar E. Pol, Aug 04 2012
Sequence provides all integers m such that 56*m + 25 is a square. - Bruno Berselli, Oct 07 2015

Crossrefs

Cf. A001106 (9-gonal numbers).
Column 5 of A195152.
Cf. A195140.
Sequences of generalized k-gonal numbers: A001318 (k=5), A000217 (k=6), A085787 (k=7), A001082 (k=8), this sequence (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).

Programs

  • Magma
    [7*n^2/8+7*n/8-3/16+3*(-1)^n*(1/16+n/8): n in [0..50]]; // Vincenzo Librandi, Oct 10 2011
    
  • Mathematica
    n=9; Union[Table[i((n-2)i-(n-4))/2, {i,-30,30}]]
    LinearRecurrence[{1,2,-2,-1,1},{0,1,6,9,19},60] (* Harvey P. Dale, Jun 08 2016 *)
  • PARI
    a(n)=7*n*(n+1)/8-3/16+3*(-1)^n*(1+2*n)/16 \\ Charles R Greathouse IV, Jan 18 2012

Formula

a(n) = n*(7*n-5)/2 for positive and negative n.
a(n) = (1/16)*(14*n^2 + 14*n - 3 + 3*(-1)^n*(2*n + 1)). - R. J. Mathar, Oct 08 2011
G.f.: x*(1+5*x+x^2) / ( (1+x)^2*(1-x)^3 ). - R. J. Mathar, Oct 08 2011
Sum_{n>=1} 1/a(n) = 2*(7 + 5*Pi*tan(3*Pi/14))/25. - Vaclav Kotesovec, Oct 05 2016
E.g.f.: (1/16)*(3*(1 - 2*x)*exp(-x) + (-3 + 28*x + 14*x^2)*exp(x)). - G. C. Greubel, Aug 19 2017

Extensions

Extended Name by Omar E. Pol, Jul 28 2018
Showing 1-10 of 80 results. Next