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

A066771 a(n) = 5^n*cos(2*n*arctan(1/2)) or denominator of tan(2*n*arctan(1/2)).

Original entry on oeis.org

1, 3, -7, -117, -527, -237, 11753, 76443, 164833, -922077, -9653287, -34867797, 32125393, 1064447283, 5583548873, 6890111163, -98248054847, -761741108157, -2114245277767, 6358056037323, 91004468168113, 387075408075603, 47340744250793, -9392840736385317
Offset: 0

Views

Author

Barbara Haas Margolius, (b.margolius(AT)csuohio.edu), Jan 17 2002

Keywords

Comments

Let A =
[ -3/5 -(2/5)i, -(2/5)i, -(2/5)i, -(2/5)i ]
[ -(2/5)i, -3/5 +(2/5)i, -(2/5)i, (2/5)i ]
[ -(2/5)i, -(2/5)i, -3/5 +(2/5)i, (2/5)i ]
[ -(2/5)i, (2/5)i, (2/5)i, -3/5 -(2/5)i ]
be the Cayley transform of the matrix iH, where H =
[1, 1, 1, 1]
[1, -1, 1, -1]
[1, 1, -1, -1]
[1, -1, -1, 1]
is a Hadamard matrix of order 4 and i is the imaginary unit. Any diagonal entry of the matrix A^n is one of the four complex numbers (+ or -)(X/5^n)(+ or -)(Y/(5^n)i). Then a(n) is the X in [A^n](j,j), j=1,2,3,4. - _Simone Severini, Apr 28 2004
Related to the (3,4,5) Pythagorean triple. Each unsigned term represents a leg in a Pythagorean triple in which the hypotenuse = 5^n. E.g., (3 + 4i)^3 = (-117 + 44i), considered as two legs of a triangle, hypotenuse = 125 = 5^3. - Gary W. Adamson, Aug 06 2006
a(n) = 5^n*cos(nC-nA), where C is the angle opposite side AB and A is the angle opposite side BC in a triangle ABC having sidelengths |BC|=3, |CA|=4, |AB|=5 - Clark Kimberling, Oct 02 2024
If a prime p divides a term, then the indices n such that p divides a(n) comprise an arithmetic sequence; e.g., 7 divides a(4n+2) for n >= 0; 13 divides a(6n+3) for n>= 0. See the Renault paper in References. - Clark Kimberling, Oct 03 2024

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 430-433.

Crossrefs

Cf. A066770 5^n sin(2n arctan(1/2)), A000351 powers of 5 and also hypotenuse of right triangle with legs given by A066770 and A066771.
Note that A066770, A066771 and A000351 are primitive Pythagorean triples with hypotenuse 5^n. The offset of A000351 is 0, but the offset is 1 for A066770, A066771.
Cf. A093378.
Cf. A139030.

Programs

  • Maple
    a[1] := 4/3; for n from 1 to 40 do a[n+1] := (4/3+a[n])/(1-4/3*a[n]):od: seq(abs(denom(a[n])), n=1..40);# a[n]=tan(2n arctan(1/2))
  • Mathematica
    CoefficientList[Series[(1-3x)/(1-6x+25x^2),{x,0,30}],x] (* or *) LinearRecurrence[{6,-25},{1,3},30] (* Harvey P. Dale, Jul 16 2011 *)
  • PARI
    a(n)=real((2+I)^(2*n))

Formula

G.f.: ( 1-3*x ) / ( 1-6*x+25*x^2 ).
A recursive formula for T(n) = tan(2*n*arctan(1/2)) is T(n+1) = (4/3 + T(n))/(1 - (4/3)*T(n)). Unsigned A(n) is the absolute value of the denominator of T(n).
a(n) is the real part of (2+i)^(2n) = Sum_{k=0..n} 4^(n-k)*(-1)^k*C(2n, 2k). - Benoit Cloitre, Aug 03 2002
a(n) = real part of (3 + 4i)^n. - Gary W. Adamson, Aug 06 2006
a(n) = 6*a(n-1) - 25*a(n-2). - Gary Detlefs, Jun 10 2010
a(n) = 5^n*cos(n*arccos(3/5)). - Gary Detlefs, Dec 11 2010
a(n) = (-1)^n * hypergeom([1,-n,1/2-n],[1/2,1],-4). - Gerry Martens, Jul 28 2023

A188983 Odd numbers y such that x^2 + y^2 = 13^n with x and y coprime.

Original entry on oeis.org

1, 3, 5, 9, 119, 597, 2035, 4449, 239, 56403, 341525, 1315911, 3455641, 3627003, 23161315, 186118929, 815616479, 2474152797, 4241902555, 6712571031, 95420159401, 485257533003, 1671083125805, 3718150825791, 584824319281, 44827014819597, 276564805068235, 1076637637754649, 2864483360640839, 3190610873034597, 18094618450123325
Offset: 0

Views

Author

T. D. Noe, Apr 14 2011

Keywords

Comments

The x values are in A188982.
This is also the absolute value of the real part of (3+2i)^n, where i = sqrt(-1). The signed version is A121622.

Crossrefs

Programs

  • Magma
    [Integers()!Abs(Real((3+2*Sqrt(-1))^n)): n in [0..30]]; // Bruno Berselli, May 26 2011
  • Mathematica
    Table[s = Select[PowersRepresentations[13^n, 2, 2], CoprimeQ @@ # &, 1][[1]]; Select[s, OddQ][[1]], {n, 0, 30}]

A193410 Expansion of (1-3*x)/(1-6*x+18*x^2).

Original entry on oeis.org

1, 3, 0, -54, -324, -972, 0, 17496, 104976, 314928, 0, -5668704, -34012224, -102036672, 0, 1836660096, 11019960576, 33059881728, 0, -595077871104, -3570467226624, -10711401679872, 0, 192805230237696, 1156831381426176, 3470494144278528
Offset: 0

Views

Author

Bruno Berselli, Aug 04 2011

Keywords

Comments

Also real parts of 3^n*(1+i)^n, where i=sqrt(-1).
If |a(n)| > 0 then it is in A130505.

Crossrefs

Programs

  • Magma
    m:=26; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-3*x)/(1-6*x+18*x^2))); /* or */ &cat[[r,3*r,0,-54*r] where r is (-324)^n: n in [0..6]];
    
  • Magma
    I:=[1, 3]; [n le 2 select I[n] else 6*Self(n-1)-18*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 26 2013
  • Mathematica
    CoefficientList[Series[(1 - 3 x)/(1 - 6 x + 18 x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Mar 26 2013 *)
    LinearRecurrence[{6,-18},{1,3},40] (* Harvey P. Dale, Jul 27 2021 *)
  • Maxima
    makelist(coeff(taylor((1-3*x)/(1-6*x+18*x^2), x, 0, n), x, n), n, 0, 25);
    
  • PARI
    Vec((1-3*x)/(1-6*x+18*x^2) +O(x^26))
    

Formula

G.f.: (1-3*x)/(1-6*x+18*x^2).
a(n) = 3^n*A146559(n) = (1/2)*((3+3*i)^n+(3-3*i)^n), where i=sqrt(-1).
a(n) = 6*a(n-1)-18*a(n-2) for n>1.
a(n) = (3*sqrt(2))^n*cos(pi*n/4).
a(4k+2) = 0, a(4k+1) = 3*a(4k) = 18*a(4k-1) = 3*(-324)^k.
G.f.: W(0)/2, where W(k) = 1 + 1/(1 - x*(3*k+3)/(x*(3*k+6) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013

A348652 For any nonnegative number n with base-13 expansion Sum_{k >= 0} d_k*13^k, a(n) is the real part of Sum_{k >= 0} g(d_k)*(3+2*i)^k where g(0) = 0, and g(1+u+3*v) = (1+u*i)*i^v for any u = 0..2 and v = 0..3 (where i denotes the imaginary unit); see A348653 for the imaginary part.

Original entry on oeis.org

0, 1, 1, 1, 0, -1, -2, -1, -1, -1, 0, 1, 2, 3, 4, 4, 4, 3, 2, 1, 2, 2, 2, 3, 4, 5, 1, 2, 2, 2, 1, 0, -1, 0, 0, 0, 1, 2, 3, -1, 0, 0, 0, -1, -2, -3, -2, -2, -2, -1, 0, 1, -2, -1, -1, -1, -2, -3, -4, -3, -3, -3, -2, -1, 0, -5, -4, -4, -4, -5, -6, -7, -6, -6, -6
Offset: 0

Views

Author

Rémy Sigrist, Oct 27 2021

Keywords

Comments

The function f defines a bijection from the nonnegative integers to the Gaussian integers.
The following diagram depicts g(d) for d = 0..12:
|
| +
| 3
|
+ + + +
6 5 |4 2
|
--------+----+----+-------
7 |0 1
|
+ + + +
8 |10 11 12
|
+ |
9 |

Crossrefs

See A316657 for a similar sequence.

Programs

  • PARI
    g(d) = { if (d==0, 0, (1+I*((d-1)%3))*I^((d-1)\3)) }
    a(n) = real(subst(Pol([g(d)|d<-digits(n, 13)]), 'x, 3+2*I))

Formula

a(13^k) = A121622(k).

A121621 Real part of (2 + 3i)^n.

Original entry on oeis.org

1, 2, -5, -46, -119, 122, 2035, 6554, -239, -86158, -341525, -246046, 3455641, 17021162, 23161315, -128629846, -815616479, -1590277918, 4241902555, 37641223154, 95420159401, -107655263398, -1671083125805, -5284814079046, 584824319281
Offset: 0

Views

Author

Gary W. Adamson and Nick Williams, Aug 10 2006

Keywords

Comments

A121622 is the companion sequence generated from (3 + 2i).

Examples

			a(5) = 122 since (2 + 3i)^5 = (122 - 597i).
a(5) = 122 = 4*(-119) - 13*(-46) = 4*a(4) - 13*a(3).
		

Crossrefs

Cf. A121622.

Programs

  • Maple
    A121621:=proc(n)global a:if(n=0)then a[0]:=1:elif(n=1)then a[1]:=2:else a[n]:=4*a[n-1]-13*a[n-2]:fi:return a[n]:end:
    seq(A121621(n),n=0..20); # Nathaniel Johnston, Apr 15 2011
  • Mathematica
    f[n_] := Re[(2 + 3I)^n]; Table[f[n], {n, 0, 24}] (* Robert G. Wilson v *)

Formula

Re(2 + 3i)^n = a(n) = 4*a(n-1) - 13*a(n-2).
G.f.: ( 1-2*x ) / ( 1 - 4*x + 13*x^2 ). - R. J. Mathar, Mar 03 2013

Extensions

More terms from Robert G. Wilson v, Aug 17 2006
Showing 1-5 of 5 results.