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.

A000503 a(n) = floor(tan(n)).

Original entry on oeis.org

0, 1, -3, -1, 1, -4, -1, 0, -7, -1, 0, -226, -1, 0, 7, -1, 0, 3, -2, 0, 2, -2, 0, 1, -3, -1, 1, -4, -1, 0, -7, -1, 0, -76, -1, 0, 7, -1, 0, 3, -2, 0, 2, -2, 0, 1, -3, -1, 1, -4, -1, 0, -7, -1, 0, -46, -1, 0, 8, -1, 0, 3, -2, 0, 2, -2, 0, 1, -3, -1, 1, -4, -1, 0, -6, -1, 0, -33, -1, 0, 9, -1, 0, 3, -2, 0, 2, -2, 0, 1, -2, -1, 1, -3, -1, 0, -6, -1, 0, -26
Offset: 0

Views

Author

Keywords

Comments

Every integer appears infinitely often. - Charles R Greathouse IV, Aug 06 2012
Does not satisfy Benford's law [Whyman et al., 2016]. - N. J. A. Sloane, Feb 12 2017

Crossrefs

Programs

Extensions

More terms from Stefan Steinerberger, Apr 09 2006

A057682 a(n) = Sum_{j=0..floor(n/3)} (-1)^j*binomial(n,3*j+1).

Original entry on oeis.org

0, 1, 2, 3, 3, 0, -9, -27, -54, -81, -81, 0, 243, 729, 1458, 2187, 2187, 0, -6561, -19683, -39366, -59049, -59049, 0, 177147, 531441, 1062882, 1594323, 1594323, 0, -4782969, -14348907, -28697814, -43046721, -43046721, 0, 129140163, 387420489, 774840978
Offset: 0

Views

Author

N. J. A. Sloane, Oct 20 2000

Keywords

Comments

Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1-M)^n = A057681(n)-a(n)*M+z(n)*M^2, where z(0)=z(1)=0 and, apparently, z(n+2)=A057083(n). - Stanislav Sykora, Jun 10 2012
From Tom Copeland, Nov 09 2014: (Start)
This array belongs to an interpolated family of arrays associated to the Catalan A000108 (t=1), and Riordan, or Motzkin sums A005043 (t=0), with the interp. (here t=-2) o.g.f. G(x,t) = x(1-x)/[1+(t-1)x(1-x)] and inverse o.g.f. Ginv(x,t) = [1-sqrt(1-4x/(1+(1-t)x))]/2 (Cf. A005773 and A091867 and A030528 for more info on this family). (End)
{A057681, A057682, A*}, where A* is A057083 prefixed by two 0's, is the difference analog of the trigonometric functions {k_1(x), k_2(x), k_3(x)} of order 3. For the definitions of {k_i(x)} and the difference analog {K_i (n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Jul 31 2017

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 3*x^4 - 9*x^6 - 27*x^7 - 54*x^8 - 81*x^9 + ...
If M^3=1 then (1-M)^6 = A057681(6) - a(6)*M + A057083(4)*M^2 = -18 + 9*M + 9*M^2. - _Stanislav Sykora_, Jun 10 2012
		

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.

Crossrefs

Alternating row sums of triangle A030523.

Programs

  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2): n in [1..45]]; // Vincenzo Librandi, Nov 10 2014
    
  • Maple
    A057682:=n->add((-1)^j*binomial(n,3*j+1), j=0..floor(n/3)):
    seq(A057682(n), n=0..50); # Wesley Ivan Hurt, Nov 11 2014
  • Mathematica
    A[n_] := Array[KroneckerDelta[#1, #2 + 1] - KroneckerDelta[#1, #2] + Sum[KroneckerDelta[#1, #2 -q], {q, n}] &, {n, n}];
    Join[{0,1}, Table[(-1)^(n-1)*Total[CoefficientList[ CharacteristicPolynomial[A[(n-1)], x], x]], {n,2,30}]] (* John M. Campbell, Mar 16 2012 *)
    Join[{0}, LinearRecurrence[{3,-3}, {1,2}, 40]] (* Jean-François Alcover, Jan 08 2019 *)
  • PARI
    {a(n) = sum( j=0, n\3, (-1)^j * binomial(n, 3*j + 1))} /* Michael Somos, May 26 2004 */
    
  • PARI
    {a(n) = if( n<2, n>0, n-=2; polsym(x^2 - 3*x + 3, n)[n + 1])} /* Michael Somos, May 26 2004 */
    
  • SageMath
    b=BinaryRecurrenceSequence(3,-3,1,2)
    def A057682(n): return 0 if n==0 else b(n-1)
    [A057682(n) for n in range(41)] # G. C. Greubel, Jul 14 2023

Formula

G.f.: (x - x^2) / (1 - 3*x + 3*x^2).
a(n) = 3*a(n-1) - 3*a(n-2), if n>1.
Starting at 1, the binomial transform of A000484. - Paul Barry, Jul 21 2003
It appears that abs(a(n)) = floor(abs(A000748(n))/3). - John W. Layman, Sep 05 2003
a(n) = ((3+i*sqrt(3))/2)^(n-2) + ((3-i*sqrt(3))/2)^(n-2). - Benoit Cloitre, Oct 27 2003
a(n) = n*3F2(1/3-n/3,2/3-n/3,1-n/3 ; 2/3,4/3 ; 1) for n>=1. - John M. Campbell, Jun 01 2011
Let A(n) be the n X n matrix with -1's along the main diagonal, 1's everywhere above the main diagonal, and 1's along the subdiagonal. Then a(n) equals (-1)^(n-1) times the sum of the coefficients of the characteristic polynomial of A(n-1), for all n>1 (see Mathematica code below). - John M. Campbell, Mar 16 2012
Start with x(0)=1, y(0)=0, z(0)=0 and set x(n+1) = x(n) - z(n), y(n+1) = y(n) - x(n), z(n+1) = z(n) - y(n). Then a(n) = -y(n). But this recurrence falls into a repetitive cycle of length 6 and multiplicative factor -27, so that a(n) = -27*a(n-6) for any n>6. - Stanislav Sykora, Jun 10 2012
a(n) = A057083(n-1) - A057083(n-2). - R. J. Mathar, Oct 25 2012
G.f.: 3*x - 1/3 + 3*x/(G(0) - 1) where G(k)= 1 + 3*(2*k+3)*x/(2*k+1 - 3*x*(k+2)*(2*k+1)/(3*x*(k+2) + (k+1)/G(k+1)));(continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Nov 23 2012
G.f.: Q(0,u) -1, where u=x/(1-x), Q(k,u) = 1 - u^2 + (k+2)*u - u*(k+1 - u)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
From Vladimir Shevelev, Jul 31 2017: (Start)
For n>=1, a(n) = 2*3^((n-2)/2)*cos(Pi*(n-2)/6);
For n>=2, a(n) = K_1(n) + K_3(n-2);
For m,n>=2, a(n+m) = a(n)*K_1(m) + K_1(n)*a(m) - K_3(n-2)*K_3(m-2), where
K_1 = A057681, K_3 = A057083. (End)

A037448 a(n) = floor(cot(n)).

Original entry on oeis.org

0, -1, -8, 0, -1, -4, 1, -1, -3, 1, -1, -2, 2, 0, -2, 3, 0, -1, 6, 0, -1, 112, 0, -1, -8, 0, -1, -4, 1, -1, -3, 1, -1, -2, 2, 0, -2, 3, 0, -1, 6, 0, -1, 56, 0, -1, -9, 0, -1, -4, 1, -1, -3, 1, -1, -2, 2, 0, -2, 3, 0, -1, 5, 0, -1, 37, 0, -1, -9, 0, -1, -4, 1, -1, -3, 1, -1, -2, 2, 0, -2, 3, 0, -1, 5, 0, -1, 28, 0, -1, -10, 0, -1, -4, 1, -1, -3
Offset: 1

Views

Author

Jason Earls, Jun 30 2001

Keywords

Comments

Contains all integers infinitely often. - Charles R Greathouse IV, Aug 06 2012

Crossrefs

Programs

  • Magma
    [Floor(Cot(n)): n in [1..100]]; // Vincenzo Librandi, Jun 15 2015
  • Mathematica
    Floor[Cot[Range[100]]] (* Harvey P. Dale, Dec 26 2024 *)
  • PARI
    v=[]; for(n=1,260,v=concat(v,floor(cotan(n)))); v
    

Extensions

a(44) corrected by T. D. Noe, Jan 21 2008

A195911 a(n) = ceiling(cot(n)).

Original entry on oeis.org

1, 0, -7, 1, 0, -3, 2, 0, -2, 2, 0, -1, 3, 1, -1, 4, 1, 0, 7, 1, 0, 113, 1, 0, -7, 1, 0, -3, 2, 0, -2, 2, 0, -1, 3, 1, -1, 4, 1, 0, 7, 1, 0, 57, 1, 0, -8, 1, 0, -3, 2, 0, -2, 2, 0, -1, 3, 1, -1, 4, 1, 0, 6, 1, 0, 38, 1, 0, -8, 1, 0, -3, 2, 0, -2, 2, 0, -1, 3
Offset: 1

Views

Author

Mohammad K. Azarian, Mar 15 2012

Keywords

Crossrefs

Programs

A099494 A Chebyshev transform of Fibonacci(n)+(-1)^n.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 19 2004

Keywords

Comments

A Chebyshev transform of A008346, which has g.f. 1/(1-2x^2-x^3). The image of G(x) under the Chebyshev transform is (1/(1+x^2))*G(x/(1+x^2)).
Periodic with period length 30. - Ray Chandler, Sep 08 2015

Crossrefs

Formula

G.f.: (1+x^2)^2/(1+x^2-x^3+x^4+x^6).
a(n) = -a(n-2)+a(n-3)-a(n-4)-a(n-6).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*(F(n-2*k)+(-1)^(n-2*k)).
a(n) = A014019(n-1) + A000484(n).

A249988 Integer part of sine of n degrees multiplied by 1000.

Original entry on oeis.org

0, 17, 34, 52, 69, 87, 104, 121, 139, 156, 173, 190, 207, 224, 241, 258, 275, 292, 309, 325, 342, 358, 374, 390, 406, 422, 438, 453, 469, 484, 500, 515, 529, 544, 559, 573, 587, 601, 615, 629, 642, 656, 669, 681, 694, 707, 719, 731, 743, 754, 766, 777, 788, 798, 809, 819, 829, 838, 848, 857, 866
Offset: 0

Views

Author

Alex Ratushnyak, Nov 11 2014

Keywords

Comments

Due to multiplication by 1000 almost all a(n) are different for n<90, the only exception is a(89)=a(88)=999.

Examples

			sin(Pi/2) = sin(90 deg.) = 1, so a(90)=1000.
		

Crossrefs

Programs

  • Mathematica
    Table[IntegerPart[1000*Sin[n Degree]],{n,0,60}] (* Harvey P. Dale, May 22 2015 *)
  • Python
    import math
    for n in range(381): print(int(1000*math.sin(math.pi*n/180)), end=', ')

Formula

a(n) = round(1000*sin(Pi*n/180)), where round() is the rounding towards zero function.
a(360+n) = a(n).
a(180+n) = -a(n).

Extensions

Corrected and extended by Harvey P. Dale, May 22 2015
Showing 1-6 of 6 results.