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-7 of 7 results.

A142150 The nonnegative integers interleaved with 0's.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 15 2008

Keywords

Comments

Number of vertical pairs in a wheel with n equal sections. - Wesley Ivan Hurt, Jan 22 2012
Number of even terms of n-th row in the triangles A162610 and A209297. - Reinhard Zumkeller, Jan 19 2013
Also the result of writing n-1 in base 2 and multiplying the last digit with the number with its last digit removed. See A115273 and A257844-A257850 for generalization to other bases. - M. F. Hasler, May 10 2015
Also follows the rule: a(n+1) is the number of terms that are identical with a(n) for a(0..n-1). - Marc Morgenegg, Jul 08 2019

Crossrefs

Programs

Formula

a(n) = XOR{k AND (n-k): 0<=k<=n}.
a(n) = (n/2)*0^(n mod 2); a(2*n)=n and a(2*n+1)=0.
a(n) = floor(n^2/2) mod n. - Enrique Pérez Herrero, Jul 29 2009
a(n) = A027656(n-2). - Reinhard Zumkeller, Nov 05 2009
a(n) = Sum_{k=0..n} (k mod 2)*((n-k) mod 2). - Reinhard Zumkeller, Nov 05 2009
a(n+1) = A000217(n) mod A000027(n+1) = A000217(n) mod A001477(n+1). - Edgar Almeida Ribeiro (edgar.a.ribeiro(AT)gmail.com), May 19 2010
From Bruno Berselli, Oct 19 2010: (Start)
a(n) = n*(1+(-1)^n)/4.
G.f.: x^2/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4) for n > 3.
Sum_{i=0..n} a(i) = (2*n*(n+1)+(2*n+1)*(-1)^n-1)/16 (see A008805). (End)
a(n) = -a(-n) = A195034(n-1)-A195034(-n-1). - Bruno Berselli, Oct 12 2011
a(n) = A000326(n) - A191967(n). - Reinhard Zumkeller, Jul 07 2012
a(n) = Sum_{i=1..n} floor((2*i-n)/2). - Wesley Ivan Hurt, Aug 21 2014
a(n-1) = floor(n/2)*(n mod 2), where (n mod 2) is the parity of n, or remainder of division by 2. - M. F. Hasler, May 10 2015
a(n) = A158416(n) - 1. - Filip Zaludek, Oct 30 2016
E.g.f.: x*sinh(x)/2. - Ilya Gutkovskiy, Oct 30 2016
a(n) = A000007(a(n-1)) + a(n-2) for n > 1. - Nicolas Bělohoubek, Oct 06 2024

A195020 Vertex number of a square spiral in which the length of the first two edges are the legs of the primitive Pythagorean triple [3, 4, 5]. The edges of the spiral have length A195019.

Original entry on oeis.org

0, 3, 7, 13, 21, 30, 42, 54, 70, 85, 105, 123, 147, 168, 196, 220, 252, 279, 315, 345, 385, 418, 462, 498, 546, 585, 637, 679, 735, 780, 840, 888, 952, 1003, 1071, 1125, 1197, 1254, 1330, 1390, 1470, 1533, 1617, 1683, 1771, 1840, 1932, 2004, 2100
Offset: 0

Views

Author

Omar E. Pol, Sep 07 2011 - Sep 12 2011

Keywords

Comments

Zero together with the partial sums of A195019.
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives A008587. The vertices on the main diagonal are the numbers A024966 = (3+4)*A000217 = 7*A000217, where both 3 and 4 are the first two edges in the spiral. The distance "a" between nearest edges that are perpendicular to the initial edge of the spiral is 3, while the distance "b" between nearest edges that are parallel to the initial edge is 4, so the distance "c" between nearest vertices on the same axis is 5 because from the Pythagorean theorem we can write c = (a^2+b^2)^(1/2) = sqrt(3^2+4^2) = sqrt(9+16) = sqrt(25) = 5.
Let an array have m(0,n)=m(n,0)=n*(n-1)/2 and m(n,n)=n*(n+1)/2. The first n+1 terms in row(n) are the numbers in the closed interval m(0,n) to m(n,n). The terms in column(n) are the same from m(n,0) to m(n,n). The first few antidiagonals are 0; 0,0; 1,1,1; 3,2,2,3; 6,4,3,4,6; 10,7,5,5,7,10. a(n) is the difference between the sum of the terms in the n+1 X n+1 matrices and those in the n X n matrices. - J. M. Bergot, Jul 05 2013 [The first five rows are: 0,0,1,3,6; 0,1,2,4,7; 1,2,3,5,8; 3,4,5,6,9; 6,7,8,9,10]

Crossrefs

Programs

  • Magma
    [(2*n*(7*n+13)+(2*n-5)*(-1)^n+5)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
  • Mathematica
    With[{r = Range[50]}, Join[{0}, Accumulate[Riffle[3*r, 4*r]]]] (* or *)
    LinearRecurrence[{1, 2, -2, -1, 1}, {0, 3, 7, 13, 21}, 100] (* Paolo Xausa, Feb 09 2024 *)

Formula

From Bruno Berselli, Oct 13 2011: (Start)
G.f.: x*(3+4*x)/((1+x)^2*(1-x)^3).
a(n) = (1/2)*A004526(n+2)*A047335(n+1) = (2*n*(7*n+13) + (2*n-5)*(-1)^n+5)/16.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) - a(n-2) = A047355(n+1). (End)

A195819 Multiples of 29.

Original entry on oeis.org

0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334
Offset: 0

Views

Author

Omar E. Pol, Oct 12 2011

Keywords

Comments

Length of hypotenuses on the main diagonal of the Pythagorean spiral whose edges have length A195033 and whose vertices are the numbers A195034, if n >= 1.

Crossrefs

Programs

Formula

a(n) = 29*n.
From Elmo R. Oliveira, Mar 21 2024: (Start)
G.f.: 29*x/(x-1)^2.
E.g.f.: 29*x*exp(x).
a(n) = 2*a(n-1) - a(n-2) for n >= 2. (End)

A195033 Multiples of 21 and of 20 interleaved: a(2n-1) = 21n, a(2n) = 20n.

Original entry on oeis.org

21, 20, 42, 40, 63, 60, 84, 80, 105, 100, 126, 120, 147, 140, 168, 160, 189, 180, 210, 200, 231, 220, 252, 240, 273, 260, 294, 280, 315, 300, 336, 320, 357, 340, 378, 360, 399, 380, 420, 400, 441, 420, 462, 440, 483, 460, 504, 480, 525, 500, 546, 520, 567, 540
Offset: 1

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

First differences of A195034.
a(n) is also the length of the n-th edge of a square spiral in which the first two edges are the legs of the primitive Pythagorean triple [21, 20, 29]. Zero together with partial sums give A195034, the vertices of the spiral.

Crossrefs

Programs

Formula

From Bruno Berselli, Sep 29 2011: (Start)
G.f.: x*(21+20*x)/((1-x)^2*(1+x)^2).
a(n) = A010693(n)*A010718(n)*A029578(n+1) = (41*n-(n+21)*(-1)^n+21)/4.
a(n) = 2*a(n-2) - a(n-4). (End)

Extensions

More terms from Bruno Berselli, Sep 29 2011

A195032 Vertex number of a square spiral in which the length of the first two edges are the legs of the primitive Pythagorean triple [5, 12, 13]. The edges of the spiral have length A195031.

Original entry on oeis.org

0, 5, 17, 27, 51, 66, 102, 122, 170, 195, 255, 285, 357, 392, 476, 516, 612, 657, 765, 815, 935, 990, 1122, 1182, 1326, 1391, 1547, 1617, 1785, 1860, 2040, 2120, 2312, 2397, 2601, 2691, 2907, 3002, 3230, 3330, 3570, 3675, 3927, 4037, 4301, 4416, 4692
Offset: 0

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

Zero together with partial sums of A195031.
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives multiples of 13 (cf. A008595). The vertices on the main diagonal are the numbers A195037 = (5+12)*A000217 = 17*A000217, where both 5 and 12 are the first two edges in the spiral. The distance "a" between nearest edges that are perpendicular to the initial edge of the spiral is 5, while the distance "b" between nearest edges that are parallel to the initial edge is 12, so the distance "c" between nearest vertices on the same axis is 13 because from the Pythagorean theorem we can write c = (a^2 + b^2)^(1/2) = sqrt(5^2 + 12^2) = sqrt(25 + 144) = sqrt(169) = 13. - Omar E. Pol, Oct 12 2011

Crossrefs

Programs

  • Magma
    [(2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
    
  • Mathematica
    a[n_] := (2 n (17 n + 27) + (14 n - 3)*(-1)^n + 3)/16; Array[a, 50, 0] (* Amiram Eldar, Nov 23 2018 *)
  • PARI
    vector(50, n, n--; (2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16) \\ G. C. Greubel, Nov 23 2018
    
  • Sage
    [(2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16 for n in range(50)] # G. C. Greubel, Nov 23 2018

Formula

From Bruno Berselli, Oct 13 2011: (Start)
G.f.: x*(5 + 12*x)/((1 + x)^2*(1 - x)^3).
a(n) = (1/2)*((2*n + (-1)^n + 3)/4)*((34*n - 3*(-1)^n+3)/4) = (2*n*(17*n + 27) + (14*n - 3)*(-1)^n + 3)/16.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End)
E.g.f.: (1/16)*((3 + 88*x + 34*x^2)*exp(x) - (3 + 14*x)*exp(-x)). - Franck Maminirina Ramaharo, Nov 23 2018

A195036 Vertex number of a square spiral in which the length of the first two edges are the legs of the primitive Pythagorean triple [15, 8, 17]. The edges of the spiral have length A195035.

Original entry on oeis.org

0, 15, 23, 53, 69, 114, 138, 198, 230, 305, 345, 435, 483, 588, 644, 764, 828, 963, 1035, 1185, 1265, 1430, 1518, 1698, 1794, 1989, 2093, 2303, 2415, 2640, 2760, 3000, 3128, 3383, 3519, 3789, 3933, 4218, 4370, 4670, 4830, 5145, 5313, 5643, 5819, 6164, 6348
Offset: 0

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

Zero together with partial sums of A195035.
The only primes in the sequence are 23 and 53 since a(n) = (1/2)*((2*n+(-1)^n+3)/4)*((46*n-37*(-1)^n+37)/4). - Bruno Berselli, Sep 30 2011
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives multiples of 17 (Cf. A008599). The vertices on the main diagonal are the numbers A195039 = (15+8)*A000217 = 23*A000217, where both 15 and 8 are the first two edges in the spiral. The distance "a" between nearest edges that are perpendicular to the initial edge of the spiral is 15, while the distance "b" between nearest edges that are parallel to the initial edge is 8, so the distance "c" between nearest vertices on the same axis is 17 because from the Pythagorean theorem we can write c = (a^2+b^2)^(1/2) = sqrt(15^2+8^2) = sqrt(225+64) = sqrt(289) = 17. - Omar E. Pol, Oct 12 2011

Crossrefs

Programs

Formula

From Bruno Berselli, Sep 30 2011: (Start)
G.f.: x*(15+8*x)/((1+x)^2*(1-x)^3).
a(n) = (2*n*(23*n+53) - (14*n+37)*(-1)^n + 37)/16.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End)

Extensions

More terms from Bruno Berselli, Sep 30 2011

A195038 41 times triangular numbers.

Original entry on oeis.org

0, 41, 123, 246, 410, 615, 861, 1148, 1476, 1845, 2255, 2706, 3198, 3731, 4305, 4920, 5576, 6273, 7011, 7790, 8610, 9471, 10373, 11316, 12300, 13325, 14391, 15498, 16646, 17835, 19065, 20336, 21648, 23001, 24395, 25830, 27306, 28823, 30381, 31980
Offset: 0

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

Related to the primitive Pythagorean triple [21, 20, 29].
Sequence found by reading the line from 0, in the direction 0, 41, ..., and the same line from 0, in the direction 0, 123, ..., in the Pythagorean spiral whose edges have length A195033 and whose vertices are the numbers A195034. This is the main diagonal of the square spiral.

Crossrefs

Bisection of A195034.

Programs

  • Mathematica
    41*Accumulate[Range[0,40]] (* or *) LinearRecurrence[{3,-3,1},{0,41,123},40] (* Harvey P. Dale, Nov 20 2015 *)
  • PARI
    a(n)=41*n*(n+1)/2 \\ Charles R Greathouse IV, Jun 17 2017

Formula

a(n) = (41*n^2 + 41*n)/2 = 41*n*(n+1)/2 = 41*A000217(n).
G.f.: -41*x/(x-1)^3. - R. J. Mathar, Oct 04 2014
From Elmo R. Oliveira, Dec 27 2024: (Start)
E.g.f.: 41*exp(x)*x*(2 + x)/2.
a(n) = A195034(2*n).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
Showing 1-7 of 7 results.