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

A002265 Nonnegative integers repeated 4 times.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

For n>=1 and i=sqrt(-1) let F(n) the n X n matrix of the Discrete Fourier Transform (DFT) whose element (j,k) equals exp(-2*Pi*i*(j-1)*(k-1)/n)/sqrt(n). The multiplicities of the four eigenvalues 1, i, -1, -i of F(n) are a(n+4), a(n-1), a(n+2), a(n+1), hence a(n+4) + a(n-1) + a(n+2) + a(n+1) = n for n>=1. E.g., the multiplicities of the eigenvalues 1, i, -1, -i of the DFT-matrix F(4) are a(8)=2, a(3)=0, a(6)=1, a(5)=1, summing up to 4. - Franz Vrabec, Jan 21 2005
Complement of A010873, since A010873(n)+4*a(n)=n. - Hieronymus Fischer, Jun 01 2007
For even values of n, a(n) gives the number of partitions of n into exactly two parts with both parts even. - Wesley Ivan Hurt, Feb 06 2013
a(n-4) counts number of partitions of (n) into parts 1 and 4. For example a(11) = 3 with partitions (44111), (41111111), (11111111111). - David Neil McGrath, Dec 04 2014
a(n-4) counts walks (closed) on the graph G(1-vertex; 1-loop, 4-loop) where order of loops is unimportant. - David Neil McGrath, Dec 04 2014
Number of partitions of n into 4 parts whose smallest 3 parts are equal. - Wesley Ivan Hurt, Jan 17 2021

References

  • V. Cizek, Discrete Fourier Transforms and their Applications, Adam Hilger, Bristol 1986, p. 61.

Crossrefs

Zero followed by partial sums of A011765.
Partial sums: A130519. Other related sequences: A004526, A010872, A010873, A010874.
Third row of A180969.

Programs

Formula

a(n) = floor(n/4), n>=0;
G.f.: (x^4)/((1-x)*(1-x^4)).
a(n) = (2*n-(3-(-1)^n-2*(-1)^floor(n/2)))/8; also a(n) = (2*n-(3-(-1)^n-2*sin(Pi/4*(2*n+1+(-1)^n))))/8 = (n-A010873(n))/4. - Hieronymus Fischer, May 29 2007
a(n) = (1/4)*(n-(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4))/2). - Hieronymus Fischer, Jul 04 2007
a(n) = floor((n^4-1)/4*n^3) (n>=1); a(n) = floor((n^4-n^3)/(4*n^3-3*n^2)) (n>=1). - Mohammad K. Azarian, Nov 08 2007 and Aug 01 2009
For n>=4, a(n) = floor( log_4( 4^a(n-1) + 4^a(n-2) + 4^a(n-3) + 4^a(n-4) ) ). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 26 2010
a(n) = A173562(n)-A000290(n); a(n+2) = A035608(n)-A173562(n). - Reinhard Zumkeller, Feb 21 2010
a(n+1) = A140201(n) - A057353(n+1). - Reinhard Zumkeller, Feb 26 2011
a(n) = ceiling((n-3)/4), n >= 0. - Wesley Ivan Hurt, Jun 01 2013
a(n) = (2*n + (-1)^n + 2*sin(Pi*n/2) + 2*cos(Pi*n/2) - 3)/8. - Todd Silvestri, Oct 27 2014
E.g.f.: (x/4 - 3/8)*exp(x) + exp(-x)/8 + (sin(x)+cos(x))/4. - Robert Israel, Oct 30 2014
a(n) = a(n-1) + a(n-4) - a(n-5) with initial values a(3)=0, a(4)=1, a(5)=1, a(6)=1, a(7)=1. - David Neil McGrath, Dec 04 2014
a(n) = A004526(A004526(n)). - Bruno Berselli, Jul 01 2016
From Guenther Schrack, May 03 2019: (Start)
a(n) = (2*n - 3 + (-1)^n + 2*(-1)^(n*(n-1)/2))/8.
a(n) = a(n-4) + 1, a(k)=0 for k=0,1,2,3, for n > 3. (End)

A158057 First differences of A051870: 16*n + 1.

Original entry on oeis.org

1, 17, 33, 49, 65, 81, 97, 113, 129, 145, 161, 177, 193, 209, 225, 241, 257, 273, 289, 305, 321, 337, 353, 369, 385, 401, 417, 433, 449, 465, 481, 497, 513, 529, 545, 561, 577, 593, 609, 625, 641, 657, 673, 689, 705, 721, 737, 753, 769, 785, 801, 817, 833, 849
Offset: 0

Views

Author

Vincenzo Librandi, Mar 12 2009

Keywords

Comments

The identity (16*n+1)^2 - (16*n^2+2*n)*(4)^2 = 1 can be written as a(n+1)^2 - A158056(n)*(4)^2 = 1. - Vincenzo Librandi, Feb 09 2012
This sequence gives the 18-gonal (or octadecagonal) gnomonic numbers. Name suggested by Todd Silvestri, Nov 22 2014
All elements are odd and contains subsequence A249356. - Todd Silvestri, Nov 22 2014

Crossrefs

Programs

Formula

a(n) = 16*n + 1.
a(n) = 2*a(n-1) - a(n-2), a(0) = 1, a(1) = 17.
G.f.: (1+15*x)/(1-x)^2. - Vincenzo Librandi, Nov 23 2014
E.g.f.: (1 + 16*x)*exp(x). - G. C. Greubel, Sep 18 2019 [corrected by Elmo R. Oliveira, Apr 12 2025]
a(n) = A017077(2*n) = A016813(4*n). - Elmo R. Oliveira, Apr 12 2025

Extensions

Name clarified and offset changed by Todd Silvestri, Nov 22 2014
Edited by Vincenzo Librandi Nov 23 2014
Edited: Offset changed to 0 according to the
Todd Silvestri proposal. Name changed. - Wolfdieter Lang, Nov 29 2014

A200975 Numbers on the diagonals in Ulam's spiral.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 17, 21, 25, 31, 37, 43, 49, 57, 65, 73, 81, 91, 101, 111, 121, 133, 145, 157, 169, 183, 197, 211, 225, 241, 257, 273, 289, 307, 325, 343, 361, 381, 401, 421, 441, 463, 485, 507, 529, 553, 577, 601, 625, 651, 677, 703, 729, 757, 785, 813, 841, 871, 901
Offset: 1

Views

Author

Ismael Bouya, Nov 25 2011

Keywords

Comments

All entries are odd.
From Bob Selcoe, Oct 22 2014: (Start)
The following hold:
1. a(n) = (2k + 1)^2 when n = 4k + 1, k >= 0
2. a(n) = 4*k^2 + 1 when n = 4k - 1, k > 0
3 a(n) = k^2 + k + 1 when n = 2k, k > 0.
Conjecture 1: there must be at least one prime in [a(n), a(n+1)] inclusive.
Conjecture 2: generally, when j is in [(2m-1)^2+1, (2m+1)^2] inclusive, there must be at least one prime in [j-2m-1, j] inclusive. If true, then Conjecture 1 is true; also suggests A248623, A248835 and Oppermann's conjecture (see A002620) likely are true. (End)

Examples

			The numbers between ** are in this sequence.
.
  *21*--22---23---24--*25*
    |
    |
   20   *7*---8---*9*--10
    |    |              |
    |    |              |
   19    6   *1*---2   11
    |    |         |    |
    |    |         |    |
   18   *5*---4---*3*  12
    |                   |
    |                   |
  *17*--16---15---14--*13*
		

Crossrefs

Cf. A016754, A054554, A053755, and A054569 interleaved, A002620,
Cf. A121658 (complementary)

Programs

  • Mathematica
    Sort@ Flatten@ Table[4n^2 + (2j - 4)n + 1, {j, 0, 3}, {n, 16}] (* Robert G. Wilson v, Jul 10 2014 *)
    a[n_Integer/;n>0]:=Quotient[2 n (n+2)+(-1)^n-4 Mod[n^2 (3 n+2),4,-1]+7,8] (* Todd Silvestri, Oct 25 2014 *)
  • PARI
    al(n)=local(r=vector(n),j);r[1]=1;for(k=2,n,r[k]=r[k-1]+(k+2)\4*2);r /* Franklin T. Adams-Watters, Nov 26 2011 */
  • Python
    # prints all numbers on the diagonals of a sq*sq spiral
    sq = 5
    d = 1
    while 2*d - 1 < sq:
        print(4*d*d - 4*d +1)
        print(4*d*d - 4*d +1 + 1* 2* d)
        print(4*d*d - 4*d +1 + 2* 2* d)
        print(4*d*d - 4*d +1 + 3* 2* d)
        d += 1
    print(sq*sq)
    

Formula

a(4n) = 4n^2 + 2n + 1; a(4n+1) = 4n^2 + 4n + 1; a(4n+2) = 4n^2 + 6n + 3; a(4n+3) = 4n^2 + 8n + 5. [corrected by James Mitchell, Dec 31 2017]
G.f.: -x*(1+x+x^5-x^4) / ( (1+x)*(x^2+1)*(x-1)^3 ). - R. J. Mathar, Nov 28 2011
a(n) = (2*n*(n+2)+(-1)^n-4*sin((Pi*n)/2)+7)/8 = (A249356(n)+7)/8. - Todd Silvestri, Oct 25 2014
a(n) = floor_(n*(n+2)/4) + floor_(n(mod 4)/3) + 1. - Bob Selcoe, Oct 27 2014

Extensions

Edited with more terms by Franklin T. Adams-Watters, Nov 26 2011
Showing 1-3 of 3 results.