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

A045873 a(n) = A006496(n)/2.

Original entry on oeis.org

0, 1, 2, -1, -12, -19, 22, 139, 168, -359, -1558, -1321, 5148, 16901, 8062, -68381, -177072, -12239, 860882, 1782959, -738492, -10391779, -17091098, 17776699, 121008888, 153134281, -298775878, -1363223161, -1232566932
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A006495. - Paul Barry, Mar 16 2006
This is the Lucas U(P=2,Q=5) sequence. - R. J. Mathar, Oct 24 2012
With different signs, 0, 1, -2, -1, 12, -19, -22, 139, -168, -359, 1558, ... we obtain the Lucas U(-2,5) sequence. - R. J. Mathar, Jan 08 2013

Crossrefs

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=2*a[n-1]-5*a[n-2]; od; a; # Muniru A Asiru, Oct 23 2018
    
  • Magma
    I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1) - 5*Self(n-2): n in [1..50]]; // G. C. Greubel, Oct 22 2018
    
  • Maple
    seq(coeff(series(x/(1-2*x+5*x^2),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Oct 23 2018
  • Mathematica
    LinearRecurrence[{2,-5}, {0,1}, 40] (* G. C. Greubel, Jan 11 2024 *)
  • PARI
    concat(0,Vec(1/(1-2*x+5*x^2)+O(x^99))) \\ Charles R Greathouse IV, Dec 22 2011
    
  • Sage
    [lucas_number1(n,2,5) for n in range(0, 29)] # Zerinvary Lajos, Apr 23 2009
    
  • SageMath
    A045873=BinaryRecurrenceSequence(2,-5,0,1)
    [A045873(n) for n in range(41)] # G. C. Greubel, Jan 11 2024

Formula

a(n)^2 = A094423(n).
From Paul Barry, Sep 20 2003: (Start)
O.g.f.: x/(1 - 2*x + 5*x^2).
E.g.f.: exp(x)*sin(2*x)/2.
a(n) = 2*a(n-1) - 5*a(n-2), a(0)=0, a(1)=1.
a(n) = ((1 + 2*i)^n - (1 - 2*i)^n)/(4*i), where i=sqrt(-1).
a(n) = Im{(1 + 2*i)^n/2}.
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k+1)*(-4)^k. (End)
a(n+1) = Sum_{k=0..n} binomial(k,n-k)*2^k*(-5/2)^(n-k). - Paul Barry, Mar 16 2006
G.f.: 1/(4*x - 1/G(0)) where G(k) = 1 - (k+1)/(1 - x/(x - (k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 - 5*x)/( x*(4*k+4 - 5*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 30 2013
a(n) = 5^((n-1)/2)*ChebyshevU(n-1, 1/sqrt(5)). - G. C. Greubel, Jan 11 2024

Extensions

More terms from Paul Barry, Sep 20 2003

A000351 Powers of 5: a(n) = 5^n.

Original entry on oeis.org

1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625, 11920928955078125
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 5), L(1, 5), P(1, 5), T(1, 5). Essentially same as Pisot sequences E(5, 25), L(5, 25), P(5, 25), T(5, 25). See A008776 for definitions of Pisot sequences.
a(n) has leading digit 1 if and only if n = A067497 - 1. - Lekraj Beedassy, Jul 09 2002
With interpolated zeros 0, 1, 0, 5, 0, 25, ... (g.f.: x/(1 - 5*x^2)) second inverse binomial transform of Fibonacci(3n)/Fibonacci(3) (A001076). Binomial transform is A085449. - Paul Barry, Mar 14 2004
Sums of rows of the triangles in A013620 and A038220. - Reinhard Zumkeller, May 14 2006
Sum of coefficients of expansion of (1 + x + x^2 + x^3 + x^4)^n. a(n) is number of compositions of natural numbers into n parts less than 5. a(2) = 25 there are 25 compositions of natural numbers into 2 parts less than 5. - Adi Dani, Jun 22 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 5-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Numbers n such that sigma(5n) = 5n + sigma(n). In fact we have this theorem: p is a prime if and only if all solutions of the equation sigma(p*x) = p*x + sigma(x) are powers of p. - Jahangeer Kholdi, Nov 23 2013
From Doug Bell, Jun 22 2015: (Start)
Empirical observation: Where n is an odd multiple of 3, let x = (a(n) + 1)/9 and let y be the decimal expansion of x/a(n); then y*(x+1)/x + 1 = y rotated to the left.
Example:
a(3) = 125;
x = (125 + 1)/9 = 14;
y = 112, which is the decimal expansion of 14/125 = 0.112;
112*(14 + 1)/14 + 1 = 121 = 112 rotated to the left.
(End)
a(n) is the number of n-digit integers that contain only odd digits (A014261). - Bernard Schott, Nov 12 2022
Number of pyramids in the Sierpinski fractal square-based pyramid at the n-th step, while A279511 gives the corresponding number of vertices (see IREM link with drawings). - Bernard Schott, Nov 29 2022

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A009969 (even bisection), A013710 (odd bisection), A005054 (first differences), A003463 (partial sums).
Sierpinski fractal square-based pyramid: A020858 (Hausdorff dimension), A279511 (number of vertices), this sequence (number of pyramids).

Programs

Formula

a(n) = 5^n.
a(0) = 1; a(n) = 5*a(n-1) for n > 0.
G.f.: 1/(1 - 5*x).
E.g.f.: exp(5*x).
a(n) = A006495(n)^2 + A006496(n)^2.
a(n) = A159991(n) / A001021(n). - Reinhard Zumkeller, May 02 2009
From Bernard Schott, Nov 12 2022: (Start)
Sum_{n>=0} 1/a(n) = 5/4.
Sum_{n>=0} (-1)^n/a(n) = 5/6. (End)
a(n) = Sum_{k=0..n} C(2*n+1,n-k)*A000045(2*k+1). - Vladimir Kruchinin, Jan 14 2025

A006495 Real part of (1 + 2*i)^n, where i is sqrt(-1).

Original entry on oeis.org

1, 1, -3, -11, -7, 41, 117, 29, -527, -1199, 237, 6469, 11753, -8839, -76443, -108691, 164833, 873121, 922077, -2521451, -9653287, -6699319, 34867797, 103232189, 32125393, -451910159, -1064447283, 130656229, 5583548873
Offset: 0

Views

Author

Keywords

Comments

Row sums of the Euler related triangle A117411. Partial sums are A006495. - Paul Barry, Mar 16 2006
Binomial transform of [1, 0, -4, 0, 16, 0, -64, 0, 256, 0, ...], i.e. powers of -4 with interpolated zeros. - Philippe Deléham, Dec 02 2008
The absolute values of these numbers are the odd numbers y such that x^2 + y^2 = 5^n with x and y coprime. See A098122. - T. D. Noe, Apr 14 2011
Pisano period lengths: 1, 1, 8, 1, 4, 8, 48, 4, 24, 4, 60, 8, 12, 48, 8, 8, 16, 24, 90, 4, ... - R. J. Mathar, Aug 10 2012
Multiplied by a signed sequence of 2's we obtain 2, -2, -6, 22, -14, -82, 234, -58, -1054, 2398, 474, -12938, ..., the Lucas V(-2,5) sequence. - R. J. Mathar, Jan 08 2013

Examples

			1 + x - 3*x^2 - 11*x^3 - 7*x^4 + 41*x^5 + 117*x^6 + 29*x^7 - 527*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006496, A045873 (partial sums).

Programs

  • Magma
    A006495:=func< n | Integers()!Real((1+2*Sqrt(-1))^n) >; [ A006495(n): n in [0..30] ]; // Klaus Brockhaus, Feb 04 2011
    
  • Maple
    a := n -> hypergeom([1/2 - n/2, -n/2], [1/2], -4):
    seq(simplify(a(n)), n=0..28); # Peter Luschny, Jul 26 2020
  • Mathematica
    Table[Re[(1+2I)^n],{n,0,29}] (* Giovanni Resta, Mar 28 2006 *)
  • PARI
    {a(n) = local(A); n++; if( n<1, 0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (4*k + 1) * A[k-1] - 8 * sum( j=1, k-1, A[j] * A[k-j])); A[n])} /* Michael Somos, Jul 23 2011 */
    
  • PARI
    a(n) = real( (1 + 2*I)^n ) \\ Charles R Greathouse IV, Nov 21 2014
    
  • PARI
    {a(n) = my(A=1);
    A = sum(m=0, n+1, (1 + (-1)^m*I)^m * x^m / (1 - (-1)^m*I*x +x*O(x^n))^(m+1) ); polcoeff(A, n)} \\ Paul D. Hanna, Mar 09 2019
  • Sage
    [lucas_number2(n,2,5)/2 for n in range(0,30)] # Zerinvary Lajos, Jul 08 2008
    

Formula

a(n) = (1/2)*((1+2*i)^n + (1-2*i)^n). - Benoit Cloitre, Oct 28 2002
From Paul Barry, Mar 16 2006: (Start)
G.f.: (1-x)/(1 - 2*x + 5*x^2);
a(n) = 2*a(n-1) - 5*a(n-2);
a(n) = 5^(n/2)*cos(n*atan(1/3) + Pi*n/4);
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(n,k-j)*C(j,n-k)*(-4)^(n-k). (End)
A000351(n) = a(n)^2 + A006496(n)^2. - Fabrice Baubet (intih(AT)free.fr), May 28 2007
a(n) = upper left and lower right terms of the 2 X 2 matrix [1,-2; 2,1]^n. - Gary W. Adamson, Mar 28 2008
a(n) = Sum_{k=0..n} A124182(n,k)*(-5)^(n-k). - Philippe Deléham, Nov 01 2008
a(n) = Sum_{k=0..n} A098158(n,k)*(-4)^(n-k). - Philippe Deléham, Nov 14 2008
a(n) = (4*n+5)*a(n-1) - 8*Sum_{k=1..n} a(k-1)*a(n-k) if n > 0. - Michael Somos, Jul 23 2011
E.g.f.: exp(x)*cos(2*x). - Sergei N. Gladkovskii, Jul 22 2012
a(n) = 5^(n/2) * cos(n*arctan(2)). - Sergei N. Gladkovskii, Aug 13 2012
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(4*k+1)/(x*(4*k+5) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
From Paul D. Hanna, Mar 09 2019: (Start)
G.f.: Sum_{n>=0} (1 + (-1)^n*i)^n * x^n / (1 - (-1)^n*i*x)^(n+1).
G.f.: Sum_{n>=0} (1 - (-1)^n*i)^n * x^n / (1 + (-1)^n*i*x)^(n+1).
(End)
a(n) = hypergeom([1/2 - n/2, -n/2], [1/2], -4). - Peter Luschny, Jul 26 2020

Extensions

Signs from Christian G. Bower, Nov 15 1998
Corrected by Giovanni Resta, Mar 28 2006

A139011 Real part of (2 + i)^n, where i = sqrt(-1).

Original entry on oeis.org

1, 2, 3, 2, -7, -38, -117, -278, -527, -718, -237, 2642, 11753, 33802, 76443, 136762, 164833, -24478, -922077, -3565918, -9653287, -20783558, -34867797, -35553398, 32125393, 306268562, 1064447283, 2726446322, 5583548873, 8701963882
Offset: 0

Views

Author

Gary W. Adamson, Apr 05 2008

Keywords

Comments

Imaginary part of (2 + i)^n gives A099456.
Irrespective of signs, odd-indexed terms of A006496 interleaved with even-indexed signs of A006495.
Binomial transform of A146559, second binomial transform of A056594. - Philippe Deléham, Dec 02 2008

Examples

			1 + 2*x + 3*x^2 + 2*x^3 - 7*x^4 - 38*x^5 - 117*x^6 - 278*x^7 - 527*x^8 + ...
a(5) = -38 since (2 + i)^5 = (-38 + 41*i).
a(5) = -38 since [2,-1; 1,2]^5 = [ -38,-41; 41,-38], where 41 = A099456(5).
a(5) = -38 = A006496(5).
		

Crossrefs

Cf. A099456, A006495, A006496, A056594, A146559 (inv bin. transf.).

Programs

  • Magma
    [ Integers()!Real((2+Sqrt(-1))^n): n in [0..29] ];  // Bruno Berselli, Apr 26 2011
  • Maple
    restart: G(x):=exp(x)^2*cos(x): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=1..29 ); # Zerinvary Lajos, Apr 06 2009
  • Mathematica
    Re[(2+I)^Range[0,30]] (* or *) LinearRecurrence[{4,-5},{1,2},30] (* Harvey P. Dale, Nov 02 2022 *)
  • PARI
    a(n) = real((2 + I)^n) /* Michael Somos, Dec 26 2009 */
    
  • PARI
    Vec((1 - 2*x) / (1 - 4*x + 5*x^2) + O(x^30)) \\ Colin Barker, Sep 22 2017
    
  • Sage
    [lucas_number2(n,4,5)/2 for n in range(0,31)] # Zerinvary Lajos, Jul 08 2008
    

Formula

Real part of (2 + i)^n, i^2 = -1.
Term (1,1) of matrix [2,-1; 1,2]^n.
(a(n))^2 + (A099456(n))^2 = 5^n.
From R. J. Mathar, Apr 06 2008: (Start)
O.g.f.: (1-2x) /(1-4x+5x^2).
a(n) = 4*a(n-1) - 5*a(n-2) = 2*A099456(n-1) - 5*A099456(n-2). (End)
E.g.f.: exp(x)^2*cos(x). - Zerinvary Lajos, Apr 06 2009
a(-n) = a(n) / 5^n. - Michael Somos, Dec 26 2010
a(n) = Sum_{k=0..n} A098158(n,k)*2^(2k-n)*(-1)^(n-k). - Philippe Deléham, Dec 02 2008
2*a(n) - a(n+1) = A099456(n-1) for n>0. First differences are (up to sign) A118444. - Paul Curtz, Apr 25 2011
a(n) = Sum_{k=0..n} A201730(n,k)*(-2)^k. - Philippe Deléham, Dec 06 2011
a(n) = Sum_{k=0..floor(n/2)} (-1)^k*2^(n-2*k)*binomial(n,2*k). - Gerry Martens, Sep 18 2022

Extensions

Cross-reference corrected by Franklin T. Adams-Watters, Jan 06 2009
Added a(0)=1 by Michael Somos, Dec 26 2010
Edited by Franklin T. Adams-Watters, Apr 10 2011

A098122 Let (A,B)=(a(2*n),a(2*n+1)), then (A,B) is (even,odd), gcd(A,B)=1 and A^2 + B^2 = 5^n. Note: a(0)=0.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 2, 11, 24, 7, 38, 41, 44, 117, 278, 29, 336, 527, 718, 1199, 3116, 237, 2642, 6469, 10296, 11753, 33802, 8839, 16124, 76443, 136762, 108691, 354144, 164833, 24478, 873121, 1721764, 922077, 3565918, 2521451, 1476984, 9653287
Offset: 0

Views

Author

James R. Buddenhagen, Sep 24 2004

Keywords

Comments

(a(4*n),a(4*n+1)) are legs of the unique Pythagorean right triangle with hypotenuse 5^n and relatively prime legs.

Examples

			(a(2*3),a(2*3+1)) = (2,11) because (2,11) are (even,odd), relatively prime and 2^2 + 11^2 = 5^3. There is just one such pair.
		

References

  • Jacobi, C. G. J. (1829) Fundamenta Nova Theoriae Functionum Ellipticarum, Regiomonti, Sumptibus fratrum Borntraeger; reprinted in Jacobi, C. G. J. (1881-1891) Gesammelte Werke (Reimer, Berlin), Vol. 1, pp. 49-239 [reprinted (1969) by Chelsea, New York; now distributed by Am. Mathematical Soc., Providence, RI].

Crossrefs

Cf. A006495, A006496 (the odd and even numbers separately).

A292495 Triangle read by rows: T(n,k) = (-2)*T(n-1,k-1) + T(n,k-1) with T(2*m,0) = 0 and T(2*m+1,0) = (-1)^m.

Original entry on oeis.org

0, 1, 1, 0, -2, -4, -1, -1, 3, 11, 0, 2, 4, -2, -24, 1, 1, -3, -11, -7, 41, 0, -2, -4, 2, 24, 38, -44, -1, -1, 3, 11, 7, -41, -117, -29, 0, 2, 4, -2, -24, -38, 44, 278, 336, 1, 1, -3, -11, -7, 41, 117, 29, -527, -1199, 0, -2, -4, 2, 24, 38, -44, -278, -336, 718
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2017

Keywords

Examples

			First few rows are:
   0;
   1,  1;
   0, -2, -4;
  -1, -1,  3,  11;
   0,  2,  4,  -2, -24;
   1,  1, -3, -11,  -7,  41;
   0, -2, -4,   2,  24,  38,  -44;
  -1, -1,  3,  11,   7, -41, -117, -29;
   0,  2,  4,  -2, -24, -38,   44, 278, 336.
		

Crossrefs

The diagonal of the triangle is related to A099456.
The next diagonal of the triangle is related to A139011.
T(n,k) = b*T(n-1,k-1) + T(n,k-1): A292789 (b=-3), this sequence (b=-2), A117918 and A228405 (b=1), A227418 (b=2), A292466 (b=4).

Formula

T(n+1,n)^2 + T(n,n)^2 = 5^n.

A349196 a(n) is the Y-coordinate of the n-th point of the R5 dragon curve; A349195 gives X-coordinates.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 10 2021

Keywords

Comments

The R5 dragon curve can be represented using an L-system.

Examples

			The R5 dragon curve starts as follows:
         +-----+
       24|   25
         |
         |
         +-----+     +-----+     +-----+
       23    22|   11|   10|    7|    6|
               |     |     |     |     |
             21|   12|    9|    8|     |
         +-----+-----+-----+-----+-----+
       20|   17|   16|   13|    4|    5
         |     |     |     |     |
         |     |     |     |     |
         +-----+     +-----+     +-----+
       19    18    15    14     3     2|
                                       |
                                       |
                                 +-----+
                                0     1
- so a(0) = a(1) = 0,
     a(2) = a(3) = a(14) = a(15) = a(18) = a(19) = 1.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(5^k) = A006496(k) for any k >= 0.

A121705 Triangle read by rows: 5^n expressed as the sum of two squares.

Original entry on oeis.org

0, 1, 1, 2, 0, 5, 3, 4, 2, 11, 5, 10, 0, 25, 7, 24, 15, 20, 10, 55, 25, 50, 38, 41, 0, 125, 35, 120, 44, 117, 75, 100, 29, 278, 50, 275, 125, 250, 190, 205, 0, 625, 175, 600, 220, 585, 336, 527, 375, 500, 145, 1390, 250, 1375, 625, 1250, 718, 1199, 950, 1025, 0, 3125
Offset: 0

Views

Author

Zak Seidov, Sep 10 2006

Keywords

Examples

			5^n expressed as the sum of two squares: 5^n = x^2 + y^2, 0 <= x < y.
Number of solutions for n=0,1,...: a(n)=1,1,2,2,3,3,4,4,5,5,6,6,...
Triangle of solutions for n=0,1,...:
  {x,y}
  {{0,1}},
  {{1,2}},
  {{0,5},{3,4}},
  {{2,11},{5,10}},
  {{0,25},{7,24},{15,20}},
  {{10,55},{25,50},{38,41}},
  {{0,125},{35,120},{44,117},{75,100}},
  {{29,278},{50,275},{125,250},{190,205}},
  {{0,625},{175,600},{220,585},{336,527},{375,500}},
  {{145,1390},{250,1375},{625,1250},{718,1199},{950,1025}},
  {{0,3125},{237,3116},{875,3000},{1100,2925},{1680,2635},{1875,2500}},
  {{725,6950},{1250,6875},{2642,6469},{3125,6250},{3590,5995},{4750,5125}},
  {{0,15625},{1185,15580},{4375,15000},{5500,14625},{8400,13175},{9375,12500},{10296,11753}}
		

Crossrefs

Showing 1-8 of 8 results.