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

A033428 a(n) = 3*n^2.

Original entry on oeis.org

0, 3, 12, 27, 48, 75, 108, 147, 192, 243, 300, 363, 432, 507, 588, 675, 768, 867, 972, 1083, 1200, 1323, 1452, 1587, 1728, 1875, 2028, 2187, 2352, 2523, 2700, 2883, 3072, 3267, 3468, 3675, 3888, 4107, 4332, 4563, 4800, 5043, 5292, 5547, 5808, 6075, 6348
Offset: 0

Views

Author

Keywords

Comments

The number of edges of a complete tripartite graph of order 3n, K_n,n,n. - Roberto E. Martinez II, Oct 18 2001
From Floor van Lamoen, Jul 21 2001: (Start)
Write 1,2,3,4,... in a hexagonal spiral around 0; then a(n) is the sequence found by reading the line from 0 in the direction 0,3,.... The spiral begins:
.
33--32--31--30
/ \
34 16--15--14 29
/ / \ \
35 17 5---4 13 28
/ / / \ \ \
36 18 6 0---3--12--27--48-->
/ / / / / / / /
37 19 7 1---2 11 26 47
\ \ \ / / /
38 20 8---9--10 25 46
\ \ / /
39 21--22--23--24 45
\ /
40--41--42--43--44
(End)
Number of edges of the complete bipartite graph of order 4n, K_n,3n. - Roberto E. Martinez II, Jan 07 2002
Also the number of partitions of 6n + 3 into at most 3 parts. - R. K. Guy, Oct 23 2003
Also the number of partitions of 6n into exactly 3 parts. - Colin Barker, Mar 23 2015
Numbers n such that the imaginary quadratic field Q[sqrt(-n)] has six units. - Marc LeBrun, Apr 12 2006
The denominators of Hoehn's sequence (recalled by G. L. Honaker, Jr.) and the numerators of that sequence reversed. The sequence is 1/3, (1+3)/(5+7), (1+3+5)/(7+9+11), (1+3+5+7)/(9+11+13+15), ...; reduced to 1/3, 4/12, 9/27, 16/48, ... . For the reversal, the reduction is 3/1, 12/4, 27/9, 48/16, ... . - Enoch Haga, Oct 05 2007
Right edge of tables in A200737 and A200741: A200737(n, A000292(n)) = A200741(n, A100440(n)) = a(n). - Reinhard Zumkeller, Nov 21 2011
The Wiener index of the crown graph G(n) (n>=3). The crown graph G(n) is the graph with vertex set {x(1), x(2), ..., x(n), y(1), y(2), ..., y(n)} and edge set {(x(i), y(j)): 1<=i, j<=n, i/=j} (= the complete bipartite graph K(n,n) with horizontal edges removed). Example: a(3)=27 because G(3) is the cycle C(6) and 6*1 + 6*2 + 3*3 = 27. The Hosoya-Wiener polynomial of G(n) is n(n-1)(t+t^2)+nt^3. - Emeric Deutsch, Aug 29 2013
From Michel Lagneau, May 04 2015: (Start)
Integer area A of equilateral triangles whose side lengths are in the commutative ring Z[3^(1/4)] = {a + b*3^(1/4) + c*3^(1/2) + d*3^(3/4), a,b,c and d in Z}.
The area of an equilateral triangle of side length k is given by A = k^2*sqrt(3)/4. In the ring Z[3^(1/4)], if k = q*3^(1/4), then A = 3*q^2/4 is an integer if q is even. Example: 27 is in the sequence because the area of the triangle (6*3^(1/4), 6*3^(1/4), 6*3^(1/4)) is 27. (End)
a(n) is 2*sqrt(3) times the area of a 30-60-90 triangle with short side n. Also, 3 times the area of an n X n square. - Wesley Ivan Hurt, Apr 06 2016
Consider the hexagonal tiling of the plane. Extract any four hexagons adjacent by edge. This can be done in three ways. Fold the four hexagons so that all opposite faces occupy parallel planes. For all parallel projections of the resulting object, at least two correspond to area a(n) for side length of n of the original hexagons. - Torlach Rush, Aug 17 2022
The sequence terms are the exponents in the expansion of Product_{n >= 1} (1 - q^(3*n))/(1 + q^(3*n)) = ( Sum_{n in Z} q^(n*(3*n+1)/2) ) / ( Product_{n >= 1} 1 + q^n ) = 1 - 2*q^3 + 2*q^12 - 2*q^27 + 2*q^48 - 2*q^75 + - .... - Peter Bala, Dec 30 2024

Examples

			From _Ilya Gutkovskiy_, Apr 13 2016: (Start)
Illustration of initial terms:
.                                              o
.                                             o o
.                                            o   o
.                          o                o  o  o
.                         o o              o  o o  o
.                        o   o            o  o   o  o
.           o           o  o  o          o  o  o  o  o
.          o o         o  o o  o        o  o  o o  o  o
.         o   o       o  o   o  o      o  o  o   o  o  o
.  o     o  o  o     o  o  o  o  o    o  o  o  o  o  o  o
. o o   o  o o  o   o  o  o o  o  o  o  o  o  o o  o  o  o
. n=1      n=2            n=3                 n=4
(End)
		

Crossrefs

Programs

  • Haskell
    a033428 = (* 3) . (^ 2)
    a033428_list = 0 : 3 : 12 : zipWith (+) a033428_list
       (map (* 3) $ tail $ zipWith (-) (tail a033428_list) a033428_list)
    -- Reinhard Zumkeller, Jul 11 2013
    
  • Magma
    [3*n^2: n in [0..50]]; // Vincenzo Librandi, May 18 2015
    
  • Maple
    seq(3*n^2, n=0..46); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    3 Range[0, 50]^2
    LinearRecurrence[{3, -3, 1}, {0, 3, 12}, 50] (* Harvey P. Dale, Feb 16 2013 *)
  • Maxima
    makelist(3*n^2,n,0,30); /* Martin Ettl, Nov 12 2012 */
    
  • PARI
    a(n)=3*n^2
    
  • Python
    def a(n): return 3 * (n**2) # Torlach Rush, Aug 25 2022

Formula

a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>2.
G.f.: 3*x*(1+x)/(1-x)^3. - R. J. Mathar, Sep 09 2008
Main diagonal of triangle in A132111: a(n) = A132111(n,n). - Reinhard Zumkeller, Aug 10 2007
A214295(a(n)) = -1. - Reinhard Zumkeller, Jul 12 2012
a(n) = A215631(n,n) for n > 0. - Reinhard Zumkeller, Nov 11 2012
a(n) = A174709(6n+2). - Philippe Deléham, Mar 26 2013
a(n) = a(n-1) + 6*n - 3, with a(0)=0. - Jean-Bernard François, Oct 04 2013
E.g.f.: 3*x*(1 + x)*exp(x). - Ilya Gutkovskiy, Apr 13 2016
a(n) = t(3*n) - 3*t(n), where t(i) = i*(i+k)/2 for any k. Special case (k=1): A000217(3*n) - 3*A000217(n). - Bruno Berselli, Aug 31 2017
a(n) = A000326(n) + A005449(n). - Bruce J. Nicholson, Jan 10 2020
From Amiram Eldar, Jul 03 2020: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/18 (A086463).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/36. (End)
From Amiram Eldar, Feb 03 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = sqrt(3)*sinh(Pi/sqrt(3))/Pi.
Product_{n>=1} (1 - 1/a(n)) = sqrt(3)*sin(Pi/sqrt(3))/Pi. (End)
a(n) = A003215(n) - A016777(n). - Leo Tavares, Apr 29 2023

Extensions

Better description from N. J. A. Sloane, May 15 1998

A092206 Positive integers that are not of the form n^2 or 3n^2.

Original entry on oeis.org

2, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 82, 83, 84
Offset: 1

Views

Author

Eric W. Weisstein, Feb 24 2004

Keywords

Comments

Values of n such that Q(sqrt(-n)) has 2 units.
A214295(a(n)) = 0. - Reinhard Zumkeller, Jul 12 2012

Crossrefs

Programs

  • Haskell
    a092206 n = a092206_list !! (n-1)
    a092206_list = filter ((== 0) . a214295) [1..]
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Mathematica
    Select[ Range[100], Not[ IntegerQ[ Sqrt[#] ] || IntegerQ[ Sqrt[#/3] ] ]&] (* Jean-François Alcover, Oct 30 2012 *)
  • PARI
    is(n)=!issquare(n/3^valuation(n,3)) \\ Charles R Greathouse IV, Oct 30 2012

A214293 a(n) = 1 if n is a square, -1 if n is five times a square.

Original entry on oeis.org

1, 0, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Michael Somos, Jul 10 2012

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = q + q^4 - q^5 + q^9 + q^16 - q^20 + q^25 + q^36 - q^45 + q^49 + q^64 + ...
		

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma1(20), 1/2), 65) [2]; /* Michael Somos, Jul 01 2014 */
  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^5]) / 2,  {q, 0, n}];
    a[ n_] := If[ n < 0, 0, Boole[ OddQ [ Length @ Divisors @ n]] - Boole[ OddQ [ Length @ Divisors [5 n]]]];
  • PARI
    {a(n) = issquare(n) - issquare(5*n)};
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, if( p==5, 1 - X, 1) / (1 - X^2 ))[n])};
    

Formula

Expansion of (phi(q) - phi(q^5)) / 2 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Sep 24 2013
Expansion of q * f(q^3, q^7) * f(-q^4, -q^16) / f(-q^8, -q^12) in powers of q where f() is Ramanujan's two-variable theta function.
Expansion of q * f(x, x^9) * f(-q, -q^4) / f(-q^2, -q^3) in powers of q where f() is Ramanujan's two-variable theta function. - Michael Somos, Sep 24 2013
Euler transform of period 20 sequence [ 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, 1, 1, -1, 0, -1, 1, 0, 0, -1, ...].
Multiplicative with a(5^e) = (-1)^e, a(p^e) = 1 if e even, 0 otherwise.
G.f.: (theta_3(q) - theta_3(q^5)) / 2 = Sum_{k>0} x^(k^2) - x^(5*k^2).
Dirichlet g.f.: zeta(2*s) * (1 - 5^-s).
a(4*n + 2) = a(4*n + 3) = 0. a(4*n) = a(n). a(5*n) = -a(n).
a(4*n) = A214293(n). a(4*n+1) = A214960(n). - Michael Somos, Sep 24 2013
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(5) = 0.5527864... (A322159). - Amiram Eldar, Oct 24 2023

A244612 a(n) = 1 if n is a square, -1 if n is six times a square, 0 if n < 1.

Original entry on oeis.org

1, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Michael Somos, Jul 01 2014

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = q + q^4 - q^6 + q^9 + q^16 - q^24 + q^25 + q^36 + q^49 - q^54 + ...
		

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma1(24), 1/2), 64) [2];
  • Mathematica
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^6]) / 2,  {q, 0, n}];
    a[ n_] := If[ n < 0, 0, Boole[ OddQ [ Length @ Divisors @ n]] - Boole[ OddQ [ Length @ Divisors [6 n]]]];
  • PARI
    {a(n) = issquare(n) - issquare(6*n)};
    

Formula

Expansion of (phi(q) - phi(q^6)) / 2 in powers of q where phi() is a Ramanujan theta function.
G.f.: (theta_3(q) - theta_3(q^6)) / 2 = Sum_{k>0} x^(k^2) - x^(6*k^2).
a(3*n) = A089801(n). a(3*n + 2) = 0.
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(6) = 0.5917517... . - Amiram Eldar, Oct 24 2023

Extensions

More terms from Antti Karttunen, Dec 15 2017

A245485 a(n) = 1 if n is a square, -1 if n is seven times a square, 0 otherwise.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1
Offset: 1

Views

Author

Michael Somos, Jul 23 2014

Keywords

Examples

			G.f. = q + q^4 - q^7 + q^9 + q^16 + q^25 - q^28 + q^36 + q^49 - q^63 + ...
		

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma1(28), 1/2), 86) [2] ;
  • Mathematica
    a[ n_] := Boole[ IntegerQ[ Sqrt[ n]]] - Boole[ IntegerQ[ Sqrt[ 7 n]]];
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^7]) / 2, {q, 0, n}];
    Table[Which[IntegerQ[Sqrt[n]],1,IntegerQ[Sqrt[n/7]],-1,True,0],{n,120}] (* Harvey P. Dale, May 19 2019 *)
  • PARI
    {a(n) = issquare(n) - issquare(7*n)};
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, if( p==7, 1 - X, 1) / (1 - X^2 ))[n])};
    

Formula

a(n) is multiplicative with a(p^e) = (-1)^e if p = 7, a(p^e) = (1 + (-1)^e) / 2 otherwise.
G.f.: (theta_3(q) - theta_3(q^7)) / 2 = Sum_{k>0} x^(k^2) - x^(7*k^2).
Dirichlet g.f.: zeta(2*s) * (1 - 7^(-*s)). [corrected by Amiram Eldar, Oct 24 2023]
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(7) = 0.6220355... . - Amiram Eldar, Oct 24 2023

Extensions

Data section extended up to a(112) by Antti Karttunen, Jul 02 2024

A214505 a(n) = 1 if n is four times a triangular number, -1 if one more than twelve times a triangular number else 0.

Original entry on oeis.org

1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Michael Somos, Jul 19 2012

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 - x + x^4 + x^12 - x^13 + x^24 - x^37 + x^40 + x^60 - x^73 + x^84 + ...
G.f. = q - q^3 + q^9 + q^25 - q^27 + q^49 - q^75 + q^81 + q^121 - q^147 + q^169 + ...
		

Crossrefs

Programs

  • PARI
    {a(n) = n = 2*n + 1; issquare(n) - issquare(3*n)};

Formula

Expansion of psi(x^4) - x * psi(x^12) in powers of x where psi() is a Ramanujan theta function.
Expansion of f(-x, x^5) * f(-x^4, -x^8) / f(x, -x) in powers of x where f(,) is the Ramanujan two-variable theta function.
Euler transform of period 24 sequence [ -1, 0, 0, 1, 1, 1, 1, 0, 0, -1, -1, -1, -1, -1, 0, 0, 1, 1, 1, 1, 0, 0, -1, -1, ...].
G.f.: (Sum_{k} x^(2*k*(k + 1)) - x^(6*k*(k + 1) + 1)) / 2.
a(n) = A214295(2*n + 1).
Showing 1-6 of 6 results.