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

A114752 a(2n)=2n, a(2n+1)=4n+1.

Original entry on oeis.org

1, 2, 5, 4, 9, 6, 13, 8, 17, 10, 21, 12, 25, 14, 29, 16, 33, 18, 37, 20, 41, 22, 45, 24, 49, 26, 53, 28, 57, 30, 61, 32, 65, 34, 69, 36, 73, 38, 77, 40, 81, 42, 85, 44, 89, 46, 93, 48, 97, 50, 101, 52, 105, 54, 109, 56, 113, 58, 117, 60, 121, 62, 125, 64, 129, 66, 133, 68, 137
Offset: 1

Views

Author

Amarnath Murthy, Nov 15 2005

Keywords

Comments

Original definition (typos corrected): The following triangle contains n consecutive numbers beginning from n in ascending order if n is odd else in descending order. 1 3 2 3 4 5 7 6 5 4 5 6 7 8 9 11 10 9 8 7 6 ... Sequence contains the leading diagonal.
Equals A133566 * [1,2,3,...]. - Gary W. Adamson, Sep 16 2007
The sequence satisfies a divisibility property described by E. Angelini on the SeqFan list, cf. link. - M. F. Hasler, Mar 22 2013
First difference of A014255 (shown easily from the Nurikabe property of that sequence, or by manipulating the linear recurrence representations). - Allan C. Wechsler, Oct 20 2022

Examples

			Contribution by _M. F. Hasler_, Mar 22 2013: (Start)
The triangle described in the original definition starts
   1
   3  2
   3  4  5
   7  6  5  4
   5  6  7  8  9
  11 10  9  8  7  6. (End)
		

Crossrefs

Programs

Formula

a(2n) = 2n, a(2n+1) = 4n+1. - Joshua Zucker, May 05 2006
G.f.: x*(1+2*x+3*x^2)/(1-x^2)^2. - Philippe Deléham, Mar 02 2012
a(n) = (3n-(n-1)*(-1)^n-1)/2. - Bruno Berselli, Mar 02 2012

Extensions

More terms from Joshua Zucker, May 05 2006
Simpler definition from M. F. Hasler, Mar 22 2013

A032438 a(n) = n^2 - floor((n+1)/2)^2.

Original entry on oeis.org

0, 0, 3, 5, 12, 16, 27, 33, 48, 56, 75, 85, 108, 120, 147, 161, 192, 208, 243, 261, 300, 320, 363, 385, 432, 456, 507, 533, 588, 616, 675, 705, 768, 800, 867, 901, 972, 1008, 1083, 1121, 1200, 1240, 1323, 1365, 1452, 1496, 1587, 1633, 1728, 1776, 1875, 1925
Offset: 0

Views

Author

Keywords

Comments

The answer to a question from Mike and Laurie Crain (2crains(AT)concentric.net): how many even numbers are there in an n X n multiplication table starting at 1 X 1?
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x and y of the same parity, and x+y >= n. - Clark Kimberling, Jul 02 2012
From J. M. Bergot, Aug 08 2013: (Start)
Define a triangle to have T(1,1)=0 and T(n,c) = n^2 - c^2. The difference of the sum of the terms in antidiagonal(n+1) and those in antidiagonal(n)=a(n).
Column 0 is vertical and T(n,n)=0. The first few rows are 0; 3,0; 8,5,0; 15,12,7,0; 24,21,16,9,0; 35,32,27,20,11,0; the first few antidiagonals are 0; 3; 8,0; 15,5; 24,12,0; 35,21,7; 48,32,16,0; the first few sum of terms in the antidiagonals are 0, 3, 8, 20, 36, 63, 96, 144, 200, 275, 360, 468, 588, 735, 896, 1088, 1296, 1539. (End)
Sum of the largest parts in the partitions of 2n into two distinct odd parts. For example, a(5) = 16; the partitions of 2(5) = 10 into two distinct odd parts are (9,1) and (7,3). The sum of the largest parts is then 9+7 = 16. - Wesley Ivan Hurt, Nov 27 2017

Crossrefs

First differences are in A059029, partial sums in A143785.

Programs

  • Magma
    [n^2-Floor( (n+1)/2 )^2 : n in [0..60]]; // Vincenzo Librandi, Sep 27 2011
    
  • Maple
    A032438:=n->n^2-floor((n+1)/2)^2; seq(A032438(n), n=0..100) # Wesley Ivan Hurt, Nov 25 2013
  • Mathematica
    Table[n^2-Floor[((n+1)/2)]^2,{n,0,50}] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{0,0,3,5,12},51]
  • PARI
    a(n)=n^2 - ((n+1)\2)^2 \\ Charles R Greathouse IV, Feb 19 2017

Formula

a(n) = n^2 - A008794(n+1).
G.f.: x^2*(x^2 + 2*x + 3)/(1-x^2)^2/(1-x). - Ralf Stephan, Jun 10 2003
a(n) = (1/8)*(2*n*(3*n-1)+(2*n+1)*(-1)^n-1). a(-n-1) = A014255(n). - Bruno Berselli, Sep 27 2011
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Nov 24 2011
E.g.f.: (x*(1 + 3*x)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/4. - Stefano Spezia, Aug 01 2022

A130266 A051340 * A128174.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, May 18 2007

Keywords

Comments

Row sums = A014255: (1, 3, 8, 12, 21, 27, 40, ...).
Left border = A123684: (1, 1, 4, 2, 7, 3, 10, 4, ...).

Examples

			First few rows of the triangle:
   1;
   1, 2;
   4, 1, 3;
   2, 5, 1, 4;
   7, 2, 6, 1, 5;
   3, 8, 2, 7, 1, 6;
  10, 3, 9, 2, 8, 1, 7;
  ...
		

Crossrefs

Programs

  • Maple
    A128174 := proc(n,k)
        if k > n or k < 1 then
            0;
        else
            modp(k+n+1,2) ;
        end if;
    end proc:
    A051340 := proc(n,k)
        if k = n then
            n ;
        elif k <= n then
            1;
        else
            0;
        end if;
    end proc:
    A130266 := proc(n,k)
        add( A051340(n,j)*A128174(j,k),j=k..n) ;
    end proc:
    seq(seq(A130266(n,k),k=1..n),n=1..15) ; # R. J. Mathar, Aug 06 2016

Formula

A051340 * A128174 as infinite lower triangular matrices.

A264798 Irregular triangle read by rows: odd-valued terms of A094728(n+1).

Original entry on oeis.org

1, 3, 9, 5, 15, 7, 25, 21, 9, 35, 27, 11, 49, 45, 33, 13, 63, 55, 39, 15, 81, 77, 65, 45, 17, 99, 91, 75, 51, 19, 121, 117, 105, 85, 57, 21, 143, 135, 119, 95, 63, 23, 169, 165, 153, 133, 105, 69, 25, 195, 187, 171, 147, 115, 75, 27, 225, 221, 209, 189, 161, 125, 81, 29, 255, 247
Offset: 0

Views

Author

Paul Curtz, Nov 25 2015

Keywords

Comments

A094728(n+1) comes from A120070(n+2). a(n) approximates frequencies of the spectral lines of the hydrogen atom.
Row sums: 1, 3, 14, 22, ... = A024598(n+1).
First column: A085046(n+1).
Row sums of A261046(n) = 1, 3, 8, 12, ... = A014255(n). See the formula.

Examples

			Irregular triangle begins:
1,
3,
9,  5,
15, 7,
25, 21,  9,
35, 27, 11,
49, 45, 33, 13,
63, 55, 39, 15,
...
		

Crossrefs

Programs

  • Mathematica
    Table[n^2 - k^2, {n, 14}, {k, 0, n - 1}] /. n_ /; EvenQ@ n -> Nothing // Flatten (* Michael De Vlieger, Nov 25 2015 *)
  • PARI
    for(n=1,20,for(k=0,n-1,s=n^2-k^2;if(s%2,print1(s,", ")))) \\ Derek Orr, Dec 24 2015

Formula

a(n) = A261046(n)*A167268(n+1)/2, where A167268 is Janet's sequence.
Showing 1-4 of 4 results.