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

A022998 If n is odd then n, otherwise 2n.

Original entry on oeis.org

0, 1, 4, 3, 8, 5, 12, 7, 16, 9, 20, 11, 24, 13, 28, 15, 32, 17, 36, 19, 40, 21, 44, 23, 48, 25, 52, 27, 56, 29, 60, 31, 64, 33, 68, 35, 72, 37, 76, 39, 80, 41, 84, 43, 88, 45, 92, 47, 96, 49, 100, 51, 104, 53, 108, 55, 112, 57, 116, 59, 120, 61, 124, 63, 128, 65, 132, 67
Offset: 0

Views

Author

Keywords

Comments

Also for n > 0: numerator of Sum_{i=1..n} 2/(i*(i+1)), denominator=A026741. - Reinhard Zumkeller, Jul 25 2002
For n > 2: a(n) = gcd(A143051((n-1)^2), A143051(1+(n-1)^2)) = A050873(A000290(n-1), A002522(n-1)). - Reinhard Zumkeller, Jul 20 2008
Partial sums give the generalized octagonal numbers A001082. - Omar E. Pol, Sep 10 2011
Multiples of 4 and odd numbers interleaved. - Omar E. Pol, Sep 25 2011
The Pisano period lengths modulo m appear to be A066043(m). - R. J. Mathar, Oct 08 2011
The partial sums a(n)/A026741(n+1) given by R. Zumkeller in a comment above are 2*n/(n+1) (telescopic sum), and thus converge to 2. - Wolfdieter Lang, Apr 09 2013
a(n) = numerator(H(n,1)), where H(n,1) = 2*n/(n+1) is the harmonic mean of 1 and n. a(n) = 2*n/gcd(2n, n+1) = 2*n/gcd(n+1,2). a(n) = A227041(n,1), n>=1. - Wolfdieter Lang, Jul 04 2013
a(n) = numerator of the mean (2n/(n+1), after reduction), of the compositions of n; denominator is given by A001792(n-1). - Clark Kimberling, Mar 11 2014
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence of convergents of the 2-periodic continued fraction [0; 1, -4, 1, -4, ...] = 1/(1 - 1/(4 - 1/(1 - 1/(4 - ...)))) begins [0/1, 1/1, 4/3, 3/2, 8/5, 5/3, 12/7, ...]. The present sequence is the sequence of numerators. The sequence of denominators of the continued fraction convergents [1, 1, 3, 2, 5, 3, 7, ...] is A026741, also a strong divisibility sequence. Cf. A203976. - Peter Bala, May 19 2014
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized octagonal numbers. - Omar E. Pol, Jul 27 2018
a(n) is the number of petals of the Rhodonea curve r = a*cos(n*theta) or r = a*sin(n*theta). - Matt Westwood, Nov 19 2019

Crossrefs

Column 4 of A195151. - Omar E. Pol, Sep 25 2011
Cf. A000034, A001082 (partial sums).
Cf. A227041 (first column). - Wolfdieter Lang, Jul 04 2013
Row 2 of A349593. A385555, A385556, A385557, A385558, A385559, and A385560 are respectively rows 3, 4, 5-6, 7, 8, and 9-10.

Programs

  • Haskell
    a022998 n = a000034 (n + 1) * n
    a022998_list = zipWith (*) [0..] $ tail a000034_list
    -- Reinhard Zumkeller, Mar 31 2012
    
  • Magma
    [((-1)^n+3)*n/2: n in [0..70]]; // Vincenzo Librandi, Sep 17 2011
    
  • Maple
    A022998 := proc(n) if type(n,'odd') then n ; else 2*n; end if; end proc: # R. J. Mathar, Mar 10 2011
  • Mathematica
    Table[n (3 + (-1)^n)/2, {n, 0, 100}] (* Wesley Ivan Hurt, Dec 13 2013 *)
    Table[If[OddQ[n],n,2n],{n,0,150}] (* or *) Riffle[ 2*Range[ 0,150,2], Range[ 1,150,2]] (* Harvey P. Dale, Feb 06 2017 *)
  • PARI
    a(n)=if(n%2,n,2*n)
    
  • Python
    def A022998(n): return n if n&1 else n<<1 # Chai Wah Wu, Mar 05 2024
  • SageMath
    [n*(1+((n+1)%2)) for n in (0..80)] # G. C. Greubel, Jul 31 2022
    

Formula

Denominator of (n+1)*(n-1)*(2*n+1)/(2*n) (for n > 0).
a(n+1) = lcm(n, n+2)/n + lcm(n, n+2)/(n+2) for all n >= 1. - Asher Auel, Dec 15 2000
Multiplicative with a(2^e) = 2^(e+1), a(p^e) = p^e, p > 2.
G.f. x*(1 + 4*x + x^2)/(1-x^2)^2. - Ralf Stephan, Jun 10 2003
a(n) = 3*n/2 + n*(-1)^n/2 = n*(3 + (-1)^n)/2. - Paul Barry, Sep 04 2003
a(n) = A059029(n-1) + 1 = A043547(n+2) - 2.
a(n)*a(n+3) = -4 + a(n+1)*a(n+2).
a(n) = n*(((n+1) mod 2) + 1) = n^2 + 2*n - 2*n*floor((n+1)/2). - William A. Tedeschi, Feb 29 2008
a(n) = denominator((n+1)/(2*n)) for n >= 1; A026741(n+1) = numerator((n+1)/(2*n)) for n >= 1. - Johannes W. Meijer, Jun 18 2009
a(n) = 2*a(n-2) - a(n-4).
Dirichlet g.f. zeta(s-1)*(1+2^(1-s)). - R. J. Mathar, Mar 10 2011
a(n) = n * (2 - n mod 2) = n * A000034(n+1). - Reinhard Zumkeller, Mar 31 2012
a(n) = floor(2*n/(1 + (n mod 2))). - Wesley Ivan Hurt, Dec 13 2013
From Ilya Gutkovskiy, Mar 16 2017: (Start)
E.g.f.: x*(2*sinh(x) + cosh(x)).
It appears that a(n) is the period of the sequence k*(k + 1)/2 mod n. (End) [This is correct; see A349593. - Jianing Song, Jul 03 2025]
a(n) = Sum_{d | n} A345082(d). - Peter Bala, Jan 13 2024

Extensions

More terms from Michael Somos, Aug 07 2000

A195161 Multiples of 8 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 8, 3, 16, 5, 24, 7, 32, 9, 40, 11, 48, 13, 56, 15, 64, 17, 72, 19, 80, 21, 88, 23, 96, 25, 104, 27, 112, 29, 120, 31, 128, 33, 136, 35, 144, 37, 152, 39, 160, 41, 168, 43, 176, 45, 184, 47, 192, 49, 200, 51, 208, 53, 216, 55, 224, 57, 232, 59
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

A008590 and A005408 interleaved. This is 8*n if n is even, n if n is odd, if n>=0.
Partial sums give the generalized 12-gonal (or dodecagonal) numbers A195162.
The moment generating function of p(x, m=2, n=1, mu=2) = 4*x*E(x, 2, 1), see A163931 and A274181, is given by M(a) = (- 4*log(1-a) - 4 * polylog(2, a))/a^2. The series expansion of M(a) leads to the sequence given above. - Johannes W. Meijer, Jul 03 2016
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 12-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 8 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, this sequence, A195312.
Cf. A144433.

Programs

  • Magma
    &cat[[8*n, 2*n+1]: n in [0..30]]; // Vincenzo Librandi, Sep 27 2011
    
  • Maple
    a := proc(n): (6*(-1)^n+10)*n/4 end: seq(a(n), n=0..59); # Johannes W. Meijer, Jul 03 2016
  • Mathematica
    With[{nn=30},Riffle[8*Range[0,nn],2*Range[0,nn]+1]] (* or *) LinearRecurrence[{0,2,0,-1},{0,1,8,3},60] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    concat(0, Vec(x*(1+8*x+x^2)/((1-x)^2*(1+x)^2) + O(x^99))) \\ Altug Alkan, Jul 04 2016

Formula

a(2n) = 8n, a(2n+1) = 2n+1. [corrected by Omar E. Pol, Jul 26 2018]
a(n) = (6*(-1)^n+10)*n/4. - Vincenzo Librandi, Sep 27 2011
a(n) = 2*a(n-2)-a(n-4). G.f.: x*(1+8*x+x^2)/((1-x)^2*(1+x)^2). - Colin Barker, Aug 11 2012
From Ilya Gutkovskiy, Jul 03 2016: (Start)
a(m*2^k) = m*2^(k+2), k>0.
E.g.f.: x*(4*sinh(x) + cosh(x)).
Dirichlet g.f.: 2^(-s)*(2^s + 6)*zeta(s-1). (End)
Multiplicative with a(2^e) = 4*2^e, a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
a(n) = A144433(n-1) for n > 1. - Georg Fischer, Oct 14 2018

A195140 Multiples of 5 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 5, 3, 10, 5, 15, 7, 20, 9, 25, 11, 30, 13, 35, 15, 40, 17, 45, 19, 50, 21, 55, 23, 60, 25, 65, 27, 70, 29, 75, 31, 80, 33, 85, 35, 90, 37, 95, 39, 100, 41, 105, 43, 110, 45, 115, 47, 120, 49, 125, 51, 130, 53, 135, 55, 140, 57, 145, 59, 150, 61, 155, 63
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

This is 5*n/2 if n is even, n if n is odd.
Partial sums give the generalized enneagonal numbers A118277.
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized enneagonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

A008587 and A005408 interleaved.
Column 5 of A195151.
Cf. Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, this sequence, zero together with A165998, A195159, A195161, A195312.

Programs

  • Magma
    &cat[[5*n,2*n+1]: n in [0..31]]; // Bruno Berselli, Sep 27 2011
    
  • Mathematica
    With[{nn=40},Riffle[5*Range[0,nn],Range[1,2nn+1,2]]] (* or *) LinearRecurrence[ {0,2,0,-1},{0,1,5,3},80] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    a(n)=(7+3*(-1)^n)*n/4 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(2n) = 5n, a(2n+1) = 2n+1.
G.f.: x*(1+5*x+x^2) / ((x-1)^2*(x+1)^2). - Alois P. Heinz, Sep 26 2011
From Bruno Berselli, Sep 27 2011: (Start)
a(n) = (7+3*(-1)^n)*n/4.
a(n) = -a(-n) = a(n-2)*n/(n-2) = 2*a(n-2)-a(n-4).
a(n) + a(n-1) = A047336(n). (End)
Multiplicative with a(2^e) = 5*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 3/2^s). - Amiram Eldar, Oct 25 2023

Extensions

Corrected and edited by Alois P. Heinz, Sep 25 2011

A195159 Multiples of 7 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 7, 3, 14, 5, 21, 7, 28, 9, 35, 11, 42, 13, 49, 15, 56, 17, 63, 19, 70, 21, 77, 23, 84, 25, 91, 27, 98, 29, 105, 31, 112, 33, 119, 35, 126, 37, 133, 39, 140, 41, 147, 43, 154, 45, 161, 47, 168, 49, 175, 51, 182, 53, 189, 55, 196, 57, 203, 59, 210, 61
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

This is 7*n if n is even, n if n is odd, if n>=0.
Partial sums give the generalized 11-gonal (or hendecagonal) numbers A195160.
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 11-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Cf. A008589 and A005408 interleaved.
Column k=7 of A195151.
Cf. Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, this sequence, A195161.

Programs

Formula

a(2n) = 7n, a(2n+1) = 2n+1. [corrected by Omar E. Pol, Jul 26 2018]
From Bruno Berselli, Sep 14 2011: (Start)
G.f.: x*(1+7*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (5*(-1)^n+9)*n/4.
a(n) + a(n-1) = A056020(n). (End)
Multiplicative with a(2^e) = 7*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 5/2^s). - Amiram Eldar, Oct 25 2023

A195312 Multiples of 9 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 9, 3, 18, 5, 27, 7, 36, 9, 45, 11, 54, 13, 63, 15, 72, 17, 81, 19, 90, 21, 99, 23, 108, 25, 117, 27, 126, 29, 135, 31, 144, 33, 153, 35, 162, 37, 171, 39, 180, 41, 189, 43, 198, 45, 207, 47, 216, 49, 225, 51, 234, 53, 243, 55, 252, 57, 261, 59, 270, 61
Offset: 0

Views

Author

Omar E. Pol, Sep 14 2011

Keywords

Comments

Partial sums give the generalized 13-gonal (or tridecagonal) numbers A195313.
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized 13-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 9 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, A195161, this sequence.

Programs

  • Magma
    /* By definition */ &cat[[9*n,2*n+1]: n in [0..33]]; // Bruno Berselli, Sep 16 2011
    
  • Mathematica
    With[{nn=30},Riffle[9Range[0,nn],Range[1,2nn+1,2]]] (* Harvey P. Dale, Sep 24 2011 *)
  • PARI
    a(n)=(7*(-1)^n+11)*n/4 \\ Charles R Greathouse IV, Oct 07 2015

Formula

From Bruno Berselli, Sep 15 2011: (Start)
G.f.: x*(1+9*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (7*(-1)^n+11)*n/4.
a(n) + a(n-1) = A175885(n).
Sum_{i=0..n} a(i) = A195313(n). (End)
Multiplicative with a(2^e) = 9*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 7/2^s). - Amiram Eldar, Oct 25 2023
E.g.f.: x*(cosh(x) + 9*sinh(x)/2). - Stefano Spezia, Jun 12 2025

A195152 Square array read by antidiagonals with T(n,k) = n*((k+2)*n-k)/2, n=0, +- 1, +- 2,..., k>=0.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 4, 2, 1, 0, 4, 5, 3, 1, 0, 9, 7, 6, 4, 1, 0, 9, 12, 10, 7, 5, 1, 0, 16, 15, 15, 13, 8, 6, 1, 0, 16, 22, 21, 18, 16, 9, 7, 1, 0, 25, 26, 28, 27, 21, 19, 10, 8, 1, 0, 25, 35, 36, 34, 33, 24, 22, 11, 9, 1, 0, 36, 40, 45, 46, 40, 39, 27, 25, 12, 10, 1, 0
Offset: 0

Views

Author

Omar E. Pol, Sep 14 2011

Keywords

Comments

Also, column k lists the partial sums of the column k of A195151. The first differences in row n are always the n-th term of the triangular numbers repeated 0,0,1,1,3,3,6,6,... ([0,0] together with A008805).
Also, for k >= 1, this is a table of generalized polygonal numbers since column k lists the generalized m-gonal numbers, where m = k+4, for example: if k = 1 then m = 5, so the column 1 lists the generalized pentagonal numbers A001318 (see example).

Examples

			Array begins:
.  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,...
.  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,...
.  1,   2,   3,   4,   5,   6,   7,   8,   9,  10,...
.  4,   5,   6,   7,   8,   9,  10,  11,  12,  13,...
.  4,   7,  10,  13,  16,  19,  22,  25,  28,  31,...
.  9,  12,  15,  18,  21,  24,  27,  30,  33,  36,...
.  9,  15,  21,  27,  33,  39,  45,  51,  57,  63,...
. 16,  22,  28,  34,  40,  46,  52,  58,  64,  70,...
. 16,  26,  36,  46,  56,  66,  76,  86,  96, 106,...
. 25,  35,  45,  55,  65,  75,  85,  95, 105, 115,...
. 25,  40,  55,  70,  85, 100, 115, 130, 145, 160,...
...
		

Crossrefs

Column 0 gives A008794, except its first term.

Formula

T(n,k) = (k+2)*n*(n+1)/8+(k-2)*((2*n+1)*(-1)^n-1)/16, n >= 0 and k >= 0. - Omar E. Pol, Oct 01 2011

A195817 Multiples of 10 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 11, 60, 13, 70, 15, 80, 17, 90, 19, 100, 21, 110, 23, 120, 25, 130, 27, 140, 29, 150, 31, 160, 33, 170, 35, 180, 37, 190, 39, 200, 41, 210, 43, 220, 45, 230, 47, 240, 49, 250, 51, 260, 53, 270, 55, 280, 57, 290, 59, 300
Offset: 0

Views

Author

Omar E. Pol, Sep 29 2011

Keywords

Comments

A008592 and A005408 interleaved.
Partial sums give the generalized 14-gonal (or tetradecagonal) numbers A195818.
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized 14-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 10 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, A195161, A195312, this sequence.

Programs

  • Magma
    [(2*(-1)^n+3)*n: n in [0..60]]; // Vincenzo Librandi, Sep 30 2011
    
  • Mathematica
    With[{nn=30},Riffle[10*Range[0,nn],Range[1,2*nn+1,2]]] (* or *) LinearRecurrence[{0,2,0,-1},{0,1,10,3},70] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    a(n) = (2*(-1)^n+3)*n; \\ Andrew Howroyd, Jul 23 2018

Formula

a(n) = (2*(-1)^n+3)*n. - Vincenzo Librandi, Sep 30 2011
From Bruno Berselli, Sep 30 2011: (Start)
G.f.: x*(1+10*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = -a(-n) = a(n-2)*n/(n-2) = 2*a(n-2)-a(n-4).
a(n) * a(n+1) = a(n(n+1)).
a(n) + a(n+1) = A091998(n+1). (End)
a(0)=0, a(1)=1, a(2)=10, a(3)=3, a(n)=2*a(n-2)-a(n-4). - Harvey P. Dale, Nov 24 2013
Multiplicative with a(2^e) = 5*2^e, a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 2^(3-s)). - Amiram Eldar, Oct 25 2023

A317311 Multiples of 11 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 11, 3, 22, 5, 33, 7, 44, 9, 55, 11, 66, 13, 77, 15, 88, 17, 99, 19, 110, 21, 121, 23, 132, 25, 143, 27, 154, 29, 165, 31, 176, 33, 187, 35, 198, 37, 209, 39, 220, 41, 231, 43, 242, 45, 253, 47, 264, 49, 275, 51, 286, 53, 297, 55, 308, 57, 319, 59, 330, 61, 341, 63, 352, 65, 363, 67, 374, 69
Offset: 0

Views

Author

Omar E. Pol, Jul 25 2018

Keywords

Comments

Partial sums give the generalized 15-gonal numbers (A277082).
a(n) is also the length of the n-th line segment of the rectangular spiral wh0se vertices are the generalized 15-gonal numbers.

Crossrefs

Cf. A008593 and A005408 interleaved.
Column 11 of A195151.
Sequences whose partial sums give the generalized k-gonal numbers: A026741 (k=5), A001477 (k=6), zero together with A080512 (k=7), A022998 (k=8), A195140 (k=9), zero together with A165998 (k=10), A195159 (k=11), A195161 (k=12), A195312 (k=13), A195817 (k=14).
Cf. A277082.

Programs

  • Mathematica
    {0}~Join~Riffle[2 Range@ # - 1, 11 Range@ #] &@ 35 (* or *)
    CoefficientList[Series[x (1 + 11 x + x^2)/((1 - x)^2*(1 + x)^2), {x, 0, 69}], x] (* Michael De Vlieger, Jul 26 2018 *)
    LinearRecurrence[{0,2,0,-1},{0,1,11,3},90] (* Harvey P. Dale, Aug 28 2022 *)
  • PARI
    concat(0, Vec(x*(1 + 11*x + x^2) / ((1 - x)^2*(1 + x)^2) + O(x^40))) \\ Colin Barker, Jul 26 2018

Formula

a(2n) = 11*n, a(2n+1) = 2*n + 1.
From Colin Barker, Jul 26 2018: (Start)
G.f.: x*(1 + 11*x + x^2) / ((1 - x)^2*(1 + x)^2).
a(n) = 2*a(n-2) - a(n-4) for n>3. (End)
Multiplicative with a(2^e) = 11*2^(e-1), and a(p^e) = p^e for an odd prime p. - Amiram Eldar, Oct 14 2023
Dirichlet g.f.: zeta(s-1) * (1 + 9/2^s). - Amiram Eldar, Oct 25 2023
a(n) = (13 + 9*(-1)^n)*n/4. - Aaron J Grech, Aug 20 2024

A317312 Multiples of 12 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 12, 3, 24, 5, 36, 7, 48, 9, 60, 11, 72, 13, 84, 15, 96, 17, 108, 19, 120, 21, 132, 23, 144, 25, 156, 27, 168, 29, 180, 31, 192, 33, 204, 35, 216, 37, 228, 39, 240, 41, 252, 43, 264, 45, 276, 47, 288, 49, 300, 51, 312, 53, 324, 55, 336, 57, 348, 59, 360, 61, 372, 63, 384, 65, 396, 67, 408, 69
Offset: 0

Views

Author

Omar E. Pol, Jul 25 2018

Keywords

Comments

Partial sums give the generalized 16-gonal numbers (A274978).
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 16-gonal numbers.

Crossrefs

Cf. A008594 and A005408 interleaved.
Column 12 of A195151.
Sequences whose partial sums give the generalized k-gonal numbers: A026741 (k=5), A001477 (k=6), zero together with A080512 (k=7), A022998 (k=8), A195140 (k=9), zero together with A165998 (k=10), A195159 (k=11), A195161 (k=12), A195312 (k=13), A195817 (k=14), A317311 (k=15).
Cf. A274978.

Programs

  • Mathematica
    {0}~Join~Riffle[2 Range@ # - 1, 12 Range@ #] &@ 35 (* or *)
    CoefficientList[Series[x (1 + 12 x + x^2)/((1 - x)^2*(1 + x)^2), {x, 0, 69}], x] (* or *)
    LinearRecurrence[{0, 2, 0, -1}, {0, 1, 12, 3}, 70] (* Michael De Vlieger, Jul 26 2018 *)

Formula

a(2n) = 12*n, a(2n+1) = 2*n + 1.
From Michael De Vlieger, Jul 26 2018: (Start)
G.f.: x*(1 + 12*x + x^2) / ((1 - x)^2*(1 + x)^2).
a(n) = 2*a(n-2) - a(n-4) for n>3. (End)
Multiplicative with a(2^e) = 3*2^(e+1), and a(p^e) = p^e for an odd prime p. - Amiram Eldar, Oct 14 2023
Dirichlet g.f.: zeta(s-1) * (1 + 5*2^(1-s)). - Amiram Eldar, Oct 25 2023
a(n) = (7 + 5*(-1)^n)*n/2. - Aaron J Grech, Aug 20 2024

A317313 Multiples of 13 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 13, 3, 26, 5, 39, 7, 52, 9, 65, 11, 78, 13, 91, 15, 104, 17, 117, 19, 130, 21, 143, 23, 156, 25, 169, 27, 182, 29, 195, 31, 208, 33, 221, 35, 234, 37, 247, 39, 260, 41, 273, 43, 286, 45, 299, 47, 312, 49, 325, 51, 338, 53, 351, 55, 364, 57, 377, 59, 390, 61, 403, 63, 416, 65, 429, 67, 442, 69
Offset: 0

Views

Author

Omar E. Pol, Jul 25 2018

Keywords

Comments

Partial sums give the generalized 17-gonal numbers (A303305).
More generally, the partial sums of the sequence formed by the multiples of m and the odd numbers interleaved, give the generalized k-gonal numbers, with m >= 1 and k = m + 4.
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 17-gonal numbers.

Crossrefs

Cf. A008595 and A005408 interleaved.
Column 13 of A195151.
Sequences whose partial sums give the generalized k-gonal numbers: A026741 (k=5), A001477 (k=6), zero together with A080512 (k=7), A022998 (k=8), A195140 (k=9), zero together with A165998 (k=10), A195159 (k=11), A195161 (k=12), A195312 (k=13), A195817 (k=14), A317311 (k=15), A317312 (k=16).
Cf. A303305.

Programs

  • Mathematica
    Table[{13n, 2n + 1}, {n, 0, 35}] // Flatten (* or *)
    CoefficientList[Series[(x^3 + 13 x^2 + x)/(x^2 - 1)^2, {x, 0, 69}], x] (* or *)
    LinearRecurrence[{0, 2, 0, -1}, {0, 1, 13, 3}, 70] (* Robert G. Wilson v, Jul 26 2018 *)
  • PARI
    a(n) = if(n%2==0, return((n/2)*13), return(n)) \\ Felix Fröhlich, Jul 26 2018
    
  • PARI
    concat(0, Vec(x*(1 + 13*x + x^2) / ((1 - x)^2*(1 + x)^2) + O(x^60))) \\ Colin Barker, Jul 29 2018

Formula

a(2n) = 13*n, a(2n+1) = 2*n + 1.
From Colin Barker, Jul 29 2018: (Start)
G.f.: x*(1 + 13*x + x^2) / ((1 - x)^2*(1 + x)^2).
a(n) = 2*a(n-2) - a(n-4) for n>3. (End)
Multiplicative with a(2^e) = 13*2^(e-1), and a(p^e) = p^e for an odd prime p. - Amiram Eldar, Oct 14 2023
Dirichlet g.f.: zeta(s-1) * (1 + 11/2^s). - Amiram Eldar, Oct 25 2023
a(n) = (15 + 11*(-1)^n)*n/4. - Aaron J Grech, Aug 20 2024
Showing 1-10 of 23 results. Next