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

A251732 a(n) = 3^n*A123335(n). Rational parts of the integers in Q(sqrt(2)) giving the length of a Lévy C-curve variant at iteration step n.

Original entry on oeis.org

1, -3, 27, -189, 1377, -9963, 72171, -522693, 3785697, -27418419, 198581787, -1438256493, 10416775041, -75444958683, 546420727467, -3957528992949, 28662960504897, -207595523965923, 1503539788339611, -10889598445730973, 78869448769442337, -571223078628232779
Offset: 0

Views

Author

Kival Ngaokrajang, Dec 07 2014

Keywords

Comments

The irrational part is given in A251733.
Inspired by the Lévy C-curve, and generated using different construction rules as shown in the links.
The length of this variant Lévy C-curve is an integer in the real quadratic number field Q(sqrt(2)), namely L(n) = A(n) + B(n)*sqrt(2) with A(n) = a(n) = 3^n*A123335(n) and B(n) = A251733(n) = 3^n*A077985(n-1), with A077985(-1) = 0. See the construction rule and the illustration in the links.
The total length of the Lévy C-curve after n iterations is sqrt(2)^n, also an integer in Q(sqrt(2)) (see a comment on A077957). The fractal dimension of the Lévy C-curve is 2, but for this modified case it is log(3)/log(1+sqrt(2)) = 1.2464774357... .

Examples

			The first lengths a(n) + A251733(n)*sqrt(2) are:
1, -3 + 3*sqrt(2), 27 - 18*sqrt(2), -189 + 135*sqrt(2), 1377 - 972*sqrt(2), -9963 + 7047*sqrt(2), 72171 - 51030*sqrt(2), -522693 + 369603*sqrt(2), 3785697 - 2676888*sqrt(2), -27418419 + 19387755*sqrt(2), 198581787 - 140418522*sqrt(2), ... - _Wolfdieter Lang_, Dec 08 2014
		

Crossrefs

Programs

  • Magma
    [Round(((3*(-1+Sqrt(2)))^n + (-3*(1+Sqrt(2)))^n)/2): n in [0..30]]; // G. C. Greubel, Nov 18 2017
  • Mathematica
    LinearRecurrence[{-6,9}, {1,-3}, 30] (* G. C. Greubel, Nov 18 2017 *)
  • PARI
    Vec(-(3*x+1) / (9*x^2-6*x-1) + O(x^100)) \\ Colin Barker, Dec 07 2014
    

Formula

a(n) = 3^n*A123335(n).
a(n) = -6*a(n-1) + 9*a(n-2). - Colin Barker, Dec 07 2014
G.f.: -(3*x+1)/(9*x^2-6*x-1). - Colin Barker, Dec 07 2014
a(n) = ((3*(-1+sqrt(2)))^n + (-3*(1+sqrt(2)))^n) / 2. - Colin Barker, Jan 21 2017
E.g.f.: exp(-3*x)*cosh(3*sqrt(2)*x). - Stefano Spezia, Feb 01 2023

Extensions

More terms from Colin Barker, Dec 07 2014
Edited: Name specified, Q(sqrt(2))remarks given earlier in a comment to a first version, MathImages link added. - Wolfdieter Lang, Dec 07 2014

A077985 Expansion of 1/(1 + 2*x - x^2).

Original entry on oeis.org

1, -2, 5, -12, 29, -70, 169, -408, 985, -2378, 5741, -13860, 33461, -80782, 195025, -470832, 1136689, -2744210, 6625109, -15994428, 38613965, -93222358, 225058681, -543339720, 1311738121, -3166815962, 7645370045, -18457556052, 44560482149, -107578520350, 259717522849
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?) - R. J. Mathar, Aug 10 2012
The sequence 0, 1, -2, 5, -12, 29, -70, 169, -408, 985, ... with a leading 0 is the Lucas U(-2,-1)-sequence. - R. J. Mathar, Jan 08 2013
From Wolfdieter Lang, Dec 07 2014: (Start)
a(n) is the irrational part of the Q(sqrt(2)) integer (sqrt(2) - 1)^n = A123335(n) + a(n-1)*sqrt(2), with a(-1) = 0.
3^n*a(n-1) = A251733(n), with a(-1) = 0, is the irrational part of the Q(sqrt(2)) integer giving the length of a variant of Lévy's C-curve at iteration step n. (End)

Examples

			G.f. = 1 - 2*x + 5*x^2 - 12*x^3 + 29*x^4 - 70*x^5 + 169*x^6 - 408*x^7 + ...
		

Crossrefs

Essentially the same as A000129, which is the main entry for these numbers.

Programs

  • Magma
    I:=[1,-2]; [n le 2 select I[n] else -2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Jan 21 2017
  • Mathematica
    PSE[a_,b_,n_]:=Join[{1,x=a,y=b},Table[z=Floor[y^2/x+1/2];x=y;y=z,{n}]];A077985=PSE[-2,5,50] (* Vladimir Joseph Stephan Orlovsky, Mar 26 2011 *)
    LinearRecurrence[{-2,1},{1,-2},40] (* Harvey P. Dale, Jun 04 2012 *)
    CoefficientList[Series[1/(1 + 2 x/(1 + x/(2 - x))), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 21 2017 *)
  • PARI
    Vec(1/(1+2*x-x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • PARI
    {a(n) = if( n<-1, (-1)^n*a(-2-n), polcoeff( 1 / (1 + 2*x - x^2) + x * O(x^n), n))}; /* Michael Somos, Jan 20 2017 */
    
  • PARI
    {a(n) = - imag((-1 - quadgen(8))^(n+1))}; /* Michael Somos, Jan 20 2017 */
    
  • Sage
    taylor( x/(1 + 2*x - x^2) ,x,0,31) # Zerinvary Lajos, May 29 2009
    

Formula

a(n) = (-1)^n * A000129(n+1). - M. F. Hasler, Oct 05 2008
a(0)=1, a(1)=-2, a(n) = -2*a(n-1) + a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
G.f.: 1/(2+Q(0)), where Q(k)= 3*x - 1 + x*k + x*(1-x)*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 05 2013
G.f.: Q(0)/(2+2*x), where Q(k)= 1 + 1/(1 - x*(2*k-1)/( x*(2*k+1) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 - x )/( x*(4*k+4 - x) - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
G.f.: 1 / (1 + 2*x / (1 + x / (2 - x))). - Michael Somos, Jan 20 2017
a(n) = (-1)^n * a(-2-n) for all n in Z. - Michael Somos, Jan 20 2017
a(n) = (-(-1-sqrt(2))^(1+n) + (-1+sqrt(2))^(1+n)) / (2*sqrt(2)). - Colin Barker, Jan 21 2017
E.g.f.: exp(-x)*(2*cosh(sqrt(2)*x) - sqrt(2)*sinh(sqrt(2)*x))/2. - Stefano Spezia, Feb 01 2023

A143608 A005319 and A002315 interleaved.

Original entry on oeis.org

0, 1, 4, 7, 24, 41, 140, 239, 816, 1393, 4756, 8119, 27720, 47321, 161564, 275807, 941664, 1607521, 5488420, 9369319, 31988856, 54608393, 186444716, 318281039, 1086679440, 1855077841, 6333631924, 10812186007, 36915112104, 63018038201, 215157040700
Offset: 0

Views

Author

Originally submitted by Clark Kimberling, Aug 27 2008. Merged with an essentially identical sequence submitted by Kenneth J Ramsey, Jun 01 2012, by N. J. A. Sloane, Aug 02 2012

Keywords

Comments

Also, numerators of the lower principal and intermediate convergents to 2^(1/2). The lower principal and intermediate convergents to 2^(1/2), beginning with 1/1, 4/3, 7/5, 24/17, 41/29, form a strictly increasing sequence; essentially, numerators=A143608 and denominators=A079496.
Sequence a(n) such that a(2*n) = sqrt(2*A001108(2*n)) and a(2*n+1) = sqrt(A001108(2*n+1)).
For n > 0, a(n) divides A******(k+1,n+1)-A******(k,n+1) where A****** is any one of A182431, A182439, A182440, A182441 and k is any nonnegative integer.
If p is a prime of the form 8*r +/- 3 then a(p+1) == 0 (mod p); if p is a prime of the form 8*r +/- 1 then a(p-1) == 0 (mod p).
Numbers n such that sqrt(floor(n^2/2 + 1)) is an integer. The integer square roots are given by A079496. - Richard R. Forberg, Aug 01 2013
From Peter Bala, Mar 23 2018: (Start)
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. Then we have
a(2*n + 1) = 1 o 1 o ... o 1 (2*n + 1 terms) and
a(2*n) = sqrt(2)*(1 o 1 o ... o 1) (2*n terms). Cf. A084068.
This is a fourth-order divisibility sequence. Indeed, a(2*n) = sqrt(2)*U(2*n) and a(2*n+1) = U(2*n+1), where U(n) is the Lehmer sequence [Lehmer, 1930] defined by the recurrence U(n) = 2*sqrt(2)*U(n-1) - U(n-2) with U(0) = 0 and U(1) = 1. The solution to the recurrence is U(n) = (1/2)*( (sqrt(2) + 1)^n - (sqrt(2) - 1)^n ). (End)

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Magma
    I:=[0,1,4,7]; [n le 4 select I[n] else 6*Self(n-2) - Self(n-4): n in [1..30]]; // G. C. Greubel, Mar 27 2018
  • Maple
    A143608 := proc(n)
        option remember;
        if n <= 3 then
            op(n+1,[0,1,4,7]) ;
        else
            6*procname(n-2)-procname(n-4) ;
        end if;
    end proc: # R. J. Mathar, Jul 22 2012
  • Mathematica
    a = -4; b = -1; Reap[While[b<2000000000, t = 4*b-a; Sow[t]; a=b; b=t; t = 2*b-a; Sow[t]; a=b; b=t]][[2,1]]
    CoefficientList[Series[x*(1 + 4*x + x^2)/(1 - 6*x^2 + x^4), {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 24 2014 *)
    LinearRecurrence[{0, 6, 0, -1}, {0, 1, 4, 7}, 31] (* Jean-François Alcover, Sep 21 2017 *)
  • PARI
    a(n)=([0,1,0,0;0,0,1,0;0,0,0,1;-1,0,6,0]^n*[0;1;4;7])[1,1] \\ Charles R Greathouse IV, Jun 11 2015
    
  • PARI
    concat(0, Vec(x*(1+4*x+x^2)/((1+2*x-x^2)*(1-2*x-x^2)) + O(x^50))) \\ Colin Barker, Mar 27 2016
    

Formula

a(2*n) = (a(2*n - 1) + a(2*n + 1))/2.
a(2*n + 1) = (a(2*n) + a(2*n + 2))/4.
a(2*n) = 4*A001109(n).
a(2*n + 1) = 4*A001109(n) + A001541(n).
From Colin Barker, Jun 29 2012: (Start)
a(n) = 6*a(n-2) - a(n-4).
G.f.: x*(1 + 4*x + x^2)/((1 + 2*x - x^2)*(1 - 2*x - x^2)) = x*(1 + 4*x + x^2)/(1 - 6*x^2 + x^4). (End)
2*a(n) = A078057(n) - A123335(n-1). - R. J. Mathar, Jul 04 2012
a(2n) = A005319(n); a(2n+1) = A002315(n). - R. J. Mathar, Jul 17 2009
a(n)*a(n+1) + 1 = A001653(n+1). - Charlie Marion, Dec 11 2012
a(n) = (((-2 - sqrt(2) + (-1)^n * (-2+sqrt(2))) * ((-1+sqrt(2))^n - (1+sqrt(2))^n)))/(4*sqrt(2)). - Colin Barker, Mar 27 2016
a(n) = A084068(n) - A079496(n). - César Aguilera, Feb 14 2023

A157751 Triangle of coefficients of polynomials F(n,x) in descending powers of x generated by F(n,x)=(x+1)*F(n-1,x)+F(n-1,-x), with initial F(0,x)=1.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 4, 4, 8, 1, 4, 12, 8, 16, 1, 6, 12, 32, 16, 32, 1, 6, 24, 32, 80, 32, 64, 1, 8, 24, 80, 80, 192, 64, 128, 1, 8, 40, 80, 240, 192, 448, 128, 256, 1, 10, 40, 160, 240, 672, 448, 1024, 256, 512, 1, 10, 60, 160, 560, 672, 1792, 1024, 2304, 512, 1024, 1, 12, 60, 280, 560, 1792, 1792, 4608, 2304, 5120, 1024, 2048
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2009

Keywords

Comments

Conjecture 1. If n>1 is even then F(n,x) has no real roots.
Conjecture 2. If n>0 is odd then F(n,x) has exactly one real root, r,
and if n>4 then 0 < -r < n.
Conjectures 1 and 2 are true. [From Alain Thiery (Alain.Thiery(AT)math.u-bordeaux1.fr), May 14 2010]
Cayley (1876) states "We, in fact, find 1 + sin u = 1 + x, 1 - sin 3u = (1 + x)(1 - 2x)^2, 1 + sin 5u = (1 + x)(1 + 2x - 4x^2)^2, 1 - sin 7u = (1 + x)(1 - 4x - 4x^2 + 8x^3)^2, &c.". - Michael Somos, Jun 19 2012
Appears to be the unsigned row reverse of A180870 and A228565. - Peter Bala, Feb 17 2014
From Wolfdieter Lang, Jul 29 2014: (Start)
This triangle is the Riordan triangle ((1+z)/(1-z^2), 2*z/(1-z^2)). For Riordan triangles see the W. Lang link 'Sheffer a-and z-sequences' under A006232, also for references. The o.g.f. given by Peter Bala in the formula section refers to the row reversed triangle. The usual information on this triangle, like o.g.f. for the columns, the row sums, the alternating row sums, the recurrences using A- and Z-sequences, etc. follows from this Riordan property. The Riordan proof follows from the given o.g.f. by Peter Bala, call it Grev(x,z), by row reversion: G(x,z) = Grev(1/x,x*z) = (1+z)/(1- 2*x*z - z^2) = G(z)*(1/(1 - x*F(z))) with G(z) = (1+z)/(1-z^2) and F(z) = z*2/(1-z^2). See A244419 for the discussion for a signed version of this triangle.
(End)

Examples

			Rows 0 to 8:
1
1 2
1 2 4
1 4 4 8
1 4 12 8 16
1 6 12 32 16 32
1 6 24 32 80 32 64
1 8 24 80 80 192 64 128
1 8 40 80 240 192 448 128 256
(Row 8) = (1, 4*2, 10*4, 10*8, 15*16, 6*32, 7*64, 1*128, 1*256).
First few polynomials:
F(0,x)=1, F(1,x)=x+2, F(2,x)=x^2+2*x+4, F(3,x)=x^3+4*x^2+4*x+8.
The row polynomials R(n,x) start: 1, 1 + 2*x = x*F(1,1/x), 1 + 2*x + 4^x^2 = x^2*F(2,1/x), ...  - _Wolfdieter Lang_, Jul 29 2014
		

References

  • A. Cayley, On an Expression for 1 +- sin(2p+1)u in Terms of sin u, Messenger of Mathematics, 5 (1876), pp. 7-8 = Mathematical Papers Vol. 10, n. 630, pp. 1-2.

Crossrefs

Programs

  • Mathematica
    T[n_, 0]:= 1; T[n_, n_]:= 2^n; T[n_, k_]:= T[n, k] = T[n-1, k] + (1 + (-1)^(n-k))*T[n-1, k-1]; Table[T[n, k], {n, 0, 15}, {k, 0, n}] (* G. C. Greubel, Sep 24 2018 *)
  • PARI
    t(n,k) = if(k==0, 1, if(k==n, 2^n, t(n-1,k) + (1+(-1)^(n-k))*t(n-1,k-1)));
    for(n=0,15, for(k=0,n, print1(t(n,k), ", "))) \\ G. C. Greubel, Sep 24 2018

Formula

Count the top row as row 0 and let C(n,k) denote the usual binomial
coefficient. For row 2n, define p(0)=C(n,0), p(1)=C(n,1), p(2)=C(n+1,2),
p(3)=C(n+1,3), p(4)=C(n+2,4), p(5)=c(n+2,5),..., until reaching two final
1's: p(2n-1)=C(2n-1,2n-1) and p(2n)=C(2n,2n). Then the k-th number in row
2n is p(k)*2^k. For row 2n+1, define q(0)=C(n,0), q(1)=C(n+1,1),
q(2)=C(n+1,2), q(3)=C(n+2,3),..., until reaching q(2n+1)=C(2n+1,2n+1).
Then the k-th number in row 2n+1 is q(k)*2^k.
From Peter Bala, Jan 17 2014: (Start)
Working with an offset of 0, the o.g.f. is (1 + x*z)/(1 - 2*z - x^2*z^2) = 1 + (x + 2)*z + (x^2 + 2*x + 4)*z^2 + ....
Recurrence equation: T(n,k) = 2*T(n-1,k-1) + T(n-2,k-2) with T(n,0) = 1.
The polynomials G(n,x) defined by G(0,x) = 1 and G(n,x) = x*F(n-1,x) for n >= 1 satisfy G(n,x) = (x + 1)*G(n-1,x) - G(n-1,-x). Cf. A140070 and A140071. (End)
From Wolfdieter Lang, Jul 29 2014: (Start)
O.g.f. for the row polynomials (rising powers of x) R(n,x) = x^n*F(n,1/x): (1+z)/(1 - 2*x*z - z^2). Riordan triangle ((1+z)/(1-z^2), 2*z/(1-z^2)). See a comment above.
Recurrence for the row polynomials R(n,x) = (1+x)*R(n-1,x) - (-1)^n*x*R(n-1,-x), n >= 1, R(0,x) = 1.
R(n,x) = Ftilde(n,2*x) + Ftilde(n-1,2*x) with the monic Fibonacci polynomials Ftilde(n,x) given in A168561.
Recurrence for the triangle: R(n,m) = R(n-1,m) + (1 + (-1)^(n-m))*R(n-1,m-1), n >= m >= 1, R(n,m) = 0 if n < m, R(n,0) = 1.
O.g.f. column sequences ((1+x)/(1-x^2))*(2*x/(1-x^2))^m, m >= 0. See A000012, 2*A004526, 4*A008805, 8*A058187, 16*A189976, 32*A189980, ...
Row sums A078057. Alternating row sums A123335.
(End)

Extensions

Offset corrected to 0. Cf.s added, keyword easy added by Wolfdieter Lang, Jul 29 2014

A077446 Numbers k such that 2*k^2 + 14 is a square.

Original entry on oeis.org

1, 5, 11, 31, 65, 181, 379, 1055, 2209, 6149, 12875, 35839, 75041, 208885, 437371, 1217471, 2549185, 7095941, 14857739, 41358175, 86597249, 241053109, 504725755, 1404960479, 2941757281, 8188709765, 17145817931, 47727298111
Offset: 1

Views

Author

Gregory V. Richardson, Nov 09 2002

Keywords

Comments

The equation "2*n^2 + 14 is a square" is a version of the generalized Pell Equation x^2 - D*y^2 = C where x^2 - 2*y^2 = 14.
Numbers n such that (ceiling(sqrt(n*n/2)))^2 = (7+n^2)/2. - Ctibor O. Zizka, Nov 09 2009
From Wolfdieter Lang, Feb 26 2015: (Start)
This sequence gives all positive solutions x = a(n+1), n >= 0, of the Pell equation x^2 - 2*y^2 = -7. For the corresponding y-solutions see y(n) = 2*A006452(n+2) = A077447(n+1)/2. This implies that X^2 - 2*Y^2 = 14 has the general solutions (X(n),Y(n)) = (2*y(n), x(n)). See the first comment above.
For the positive first class solutions see (A054490(n), 2*A038723(n)) and for the second class solutions (A255236(n), 2*A038725(n+1)). (End)
For n > 0, a(n) is the n-th almost Lucas-balancing number of second type (see Tekcan and Erdem). - Stefano Spezia, Nov 26 2022

Examples

			n = 3: (A077447(3))^2 - 2*a(3)^2 = 16^2 - 2*11^2  = 14;
a(3)^2 - 2*(2*A006452(3+1))^2 = 11^2 - 2*(2*4)^2 = -7. - _Wolfdieter Lang_, Feb 26 2015
		

References

  • A. H. Beiler, "The Pellian." Ch. 22 in Recreations in the Theory of Numbers: The Queen of Mathematics Entertains. Dover, New York, New York, pp. 248-268, 1966.
  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Diophantine Analysis. AMS Chelsea Publishing, Providence, Rhode Island, 1999, pp. 341-400.
  • Peter G. L. Dirichlet, Lectures on Number Theory (History of Mathematics Source Series, V. 16); American Mathematical Society, Providence, Rhode Island, 1999, pp. 139-147.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,6,0,-1},{1,5,11,31},50] (* Sture Sjöstedt, Oct 08 2012 *)

Formula

2*(a(n))^2 + 14 = (A077447(n))^2.
Lim. n-> Inf. a(n)/a(n-2) = 5.8284271247461... = 3 + 2*sqrt(2) = A156035 = RG (Great Ratio).
Lim. k-> Inf. a(2*k+1)/a(2*k) = 2.09383632135605... = (9 + 4*sqrt(2))/7 = A156649 = R1 (Ratio 1).
Lim. k -> Inf. a(2*k)/a(2*k-1) = 2.78361162489122432754 = (11 + 6*sqrt(2))/7 = R2 (Ratio 2); RG = R1*R2.
a(2*k-1) = [ 2*[(3+2*Sqrt(2))^n - (3-2*Sqrt(2))^n] - [(3+2*Sqrt(2))^(n-1) - (3-2*Sqrt(2))^(n-1)] + [(3+2*Sqrt(2))^(n-2) - (3-2*Sqrt(2))^(n-2)] ] / (4*Sqrt(2)) a(2*k) = [ 5*[(3+2*Sqrt(2))^n - (3-2*Sqrt(2))^n] + [(3+2*Sqrt(2))^(n-1) - (3-2*Sqrt(2))^(n-1)] ] / (4*Sqrt(2)).
a(n) = 6*a(n-2) - a(n-4).
G.f.: x*(1+x)*(x^2+4*x+1) / ( (x^2+2*x-1)*(x^2-2*x-1) ). - R. J. Mathar, Jul 03 2011
a(n) = 6*a(n-2) - a(n-4) with a(1)=1, a(2)=5, a(3)=11, a(4)=31. - Sture Sjöstedt, Oct 08 2012
Bisection: a(2*k+1) = S(k, 6) + 5*S(k-1, 6), a(2*k) = 5*S(k-1, 6) + S(k-2, 6), with the Chebyshev polynomials S(n, x) (A049310) with S(-2, x) = -1, S(-1, x) = 0, evaluated at x = 6. S(n, 6) = A001109(n+1). See A054490 and A255236, and the given g.f.s. - Wolfdieter Lang, Feb 26 2015
E.g.f.: 1 - cosh(sqrt(2)*x)*(cosh(x) - 3*sinh(x)) - sqrt(2)*(cosh(x) - 2*sinh(x))*sinh(sqrt(2)*x). - Stefano Spezia, Nov 26 2022
a(n) = a(n-1) + 2*A217975(n-1) + A123335(n-2) - A123335(n-3) for n > 1 and with A123335(-1) = 1. - Vladimir Pletser, Aug 30 2025

A251733 a(n) = 3^n*A077985(n-1), A077985(-1) = 0. Irrational parts of the integers in Q(sqrt(2)) giving the length of a Lévy C-curve variant at iteration step n.

Original entry on oeis.org

0, 3, -18, 135, -972, 7047, -51030, 369603, -2676888, 19387755, -140418522, 1017000927, -7365772260, 53347641903, -386377801758, 2798395587675, -20267773741872, 146792202740307, -1063163180118690, 7700108905374903, -55769122053317628, 403915712468279895
Offset: 0

Views

Author

Kival Ngaokrajang, Dec 07 2014

Keywords

Comments

The rational parts are given in A251732.
Inspired by the Lévy C-curve, and generated using different construction rules as shown in the links.
The length of this variant Lévy C-curve is an integer in the real quadratic number field Q(sqrt(2)), namely L(n) = A(n) + B(n)*sqrt(2) with A(n) = A251732(n) = 3^n*A123335(n) and B(n) = a(n) = 3^n*A077985(n-1), with A077985(-1) = 0. See the construction rule and the illustration in the links.
The total length of the Lévy C-curve after n iterations is sqrt(2^n), also an integer in Q(sqrt(2)). The fractal dimension of the Lévy C-curve is 2, but for this modified case it is log(3)/log(1+sqrt(2)) = 1.2464774357... .

Crossrefs

Programs

  • Magma
    [Round(((3*(-1+Sqrt(2)))^n - (-3*(1+Sqrt(2)))^n)/(2*Sqrt(2))): n in [0..30]]; // G. C. Greubel, Nov 18 2017
  • Mathematica
    LinearRecurrence[{-6,9}, {0,3}, 30] (* G. C. Greubel, Nov 18 2017 *)
  • PARI
    concat(0, Vec(-3*x / (9*x^2-6*x-1) + O(x^100))) \\ Colin Barker, Dec 07 2014
    

Formula

a(n) = 3^n*A077985(n-1), A077985(-1) = 0.
G.f.: 3*x /(1 + 6*x - 9*x^2). See the Colin Barker, Dec 07 2014 program.
a(n) = ((3*(-1+sqrt(2)))^n - (-3*(1+sqrt(2)))^n)/(2*sqrt(2)). - Colin Barker, Jan 21 2017
E.g.f.: exp(-3*x)*sinh(3*sqrt(2)*x)/sqrt(2). - Stefano Spezia, Feb 01 2023

Extensions

More terms from Colin Barker, Dec 07 2014
Edited: see A251732. - Wolfdieter Lang, Dec 07 2014

A165241 Triangle T(n,k), 0 <= k <= n, read by rows, given by [1,1,0,0,0,0,0,0,0,...] DELTA [1,0,1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 4, 9, 6, 1, 8, 24, 25, 10, 1, 16, 60, 85, 55, 15, 1, 32, 144, 258, 231, 105, 21, 1, 64, 336, 728, 833, 532, 182, 28, 1, 128, 768, 1952, 2720, 2241, 1092, 294, 36, 1, 256, 1728, 5040, 8280, 8361, 5301, 2058, 450, 45, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 09 2009

Keywords

Comments

Rows sums: A006012; Diagonal sums: A052960.
The sums of each column of A117317 with its subsequent column, treated as a lower triangular matrix with an initial null column attached, or, equivalently, the products of the row polynomials p(n,y) of A117317 with (1+y) with the initial first row below added to the final result. The reversal of A117317 is A056242 with several combinatorial interpretations. - Tom Copeland, Jan 08 2017

Examples

			Triangle begins:
  1;
  1,  1;
  2,  3,  1;
  4,  9,  6,  1;
  8, 24, 25, 10,  1; ...
		

Crossrefs

Formula

Sum_{k=0..n} T(n,k)*x^k = A009116(n), A000007(n), A011782(n), A006012(n), A083881(n), A081335(n), A090139(n), A145301(n), A145302(n), A145303(n), A143079(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, respectively. Sum_{k=0..n} T(n,k)*x^(n-k) = A123335(n), A000007(n), A000012(n), A006012(n), A084120(n), A090965(n), A165225(n), A165229(n), A165230(n), A165231(n), A165232(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, respectively.
G.f.: (1-(1+y)*x)/(1-2(1+y)*x+(y+y^2)*x^2). - Philippe Deléham, Dec 19 2011
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2) with T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if nPhilippe Deléham, Dec 19 2011

Extensions

O.g.f. corrected by Tom Copeland, Jan 15 2017

A256944 Squares which are not the sums of two consecutive nonsquares.

Original entry on oeis.org

0, 1, 4, 9, 16, 36, 49, 64, 100, 144, 196, 256, 289, 324, 400, 484, 576, 676, 784, 900, 1024, 1156, 1296, 1444, 1600, 1681, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3136, 3364, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084, 6400, 6724, 7056, 7396, 7744, 8100, 8464
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 25 2015

Keywords

Comments

The union of A008843, A055792, and A016742. [Corrected by Charles R Greathouse IV, May 07 2015]
Consists of the squares of all even numbers and odd numbers in A078057 = (1, 3, 7, 17, 41, 99, ...), see also A001333 = abs(A123335). See A257282 for the square roots and A257292 for their complement in the nonnegative integers A001477. - M. F. Hasler, May 08 2015

Examples

			0, 1, 4, 9, 16, 36, are in this sequence because first 14 sums of two consecutive nonsquares are 5, 8, 11, 13, 15, 18, 21, 23, 25, 27, 29, 32, 35, 37.
		

Crossrefs

Programs

  • Mathematica
    lim = 15000; s = Plus @@@ (Partition[#, 2, 1] & @ Complement[Range@ lim, Range[Floor@ Sqrt[lim]]^2]); Select[Range@ Floor[Sqrt[lim]]^2, !MemberQ[s, #] &] (* Michael De Vlieger, Apr 29 2015 *)
    lst=Partition[Select[Range[0,10^6],!IntegerQ[Sqrt[#]]&],2,1]/.{a_,b_}->  a+b;a256944=Complement[Table[n^2,{n,0,Sqrt[Last[lst]]}],lst] (* timing improved by Ivan N. Ianakiev, Apr 30 2015 *)
    Union[#, Range[0, Max@ #, 2]] &@ Numerator[Convergents[Sqrt@ 2, 6]]^2 (* Michael De Vlieger, Aug 06 2016, after Harvey P. Dale at A001333 *)
  • PARI
    is(n)=issquare(n) && (n%2==0 || issquare(n\2) || issquare(n\2+1)) \\ Charles R Greathouse IV, May 07 2015

Formula

a(n) ~ 4n^2. - Charles R Greathouse IV, May 07 2015
a(n) = A257282(n)^2. - M. F. Hasler, May 08 2015

A257292 Numbers whose square can be written as the sum of two consecutive nonsquares.

Original entry on oeis.org

5, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1

Views

Author

M. F. Hasler, May 08 2015

Keywords

Comments

Equivalently, odd numbers such that neither of the two integers next to n^2/2 is a square.
Complement of A257282 = square roots of A256944.
The odd numbers missing here are 1, 3, 7, 17, 41, 99, ... = A078057 (see also A001333 = abs(A123335)).

Examples

			9 is a term because 9^2 = 81 = 40 + 41, neither of which are square.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 131, 2], AllTrue[{Floor[#^2/2], Ceiling[#^2/2]}, ! IntegerQ@ Sqrt@ # &] &] (* Michael De Vlieger, Dec 11 2015 *)
  • PARI
    select( is(n)={bittest(n,0) && !issquare(n^2\2) && !issquare(n^2\/2)}, [0..140]) \\ Corrected Jul 06 2021, thanks to an observation by Bill McEachen

A182436 Triangle T(n,k), read by rows, given by (2, -1, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 1, 2, 5, 2, 4, 8, 11, 4, 4, 20, 25, 24, 8, 8, 28, 70, 69, 52, 16, 8, 60, 126, 213, 178, 112, 32, 16, 80, 288, 460, 599, 440, 240, 64, 16, 160, 472, 1128, 1489, 1600, 1056, 512, 128, 32, 208, 976, 2152, 3914, 4457, 4120, 2480, 1088, 256
Offset: 0

Views

Author

Philippe Deléham, Apr 28 2012

Keywords

Comments

Row sums are the powers of 3.

Examples

			Triangle begins :
1
2, 1
2, 5, 2
4, 8, 11, 4
4, 20, 25, 24, 8
8, 28, 70, 69, 52, 16
8, 60, 126, 213, 178, 112, 32
16, 80, 288, 460, 599, 440, 240, 64
16, 160, 472, 1128, 1489, 1600, 1056, 512, 128
32, 208, 976, 2152, 3914, 4457, 4120, 2480, 1088, 256
		

Crossrefs

Formula

G.f.: (1+2*x-y*x)/(1-2*y*x-(2+y)*x^2).
T(n,k) = 2*T(n-1,k-1) + 2*T(n-2,k) + T(n-2,k-1), T(0,0) = T(1,1) = 1, T(1,0) = T(2,0) = T(2,2) = 2, T(2,1) = 5 and T(n,k) = 0 if k<0 or if k>n.
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A123335(n-1), A016116(n+1), A000244(n), A057087(n), A091928(n) for x = -2, -1, 0, 1, 2, 3 respectively.
Showing 1-10 of 10 results.