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.

Previous Showing 21-30 of 36 results. Next

A363348 Turn sequence of a non-Eulerian path for drawing an infinite aperiodic tiling based on the "hat" monotile. See the comments section for details.

Original entry on oeis.org

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

Views

Author

Thomas Scheuerle, May 28 2023

Keywords

Comments

The curve can be drawn using turtle graphics rules. Each term of the sequence encodes an angle of rotation in units of (1/6)*Pi. For example, a(k) = 3 would mean a turn of 90 degrees to the left, a(k) = -2 a turn of 60 degrees to the right. To draw the tiling we draw a line of length l and then take a term of the sequence to determine the direction of further drawing by rotation relative to the current drawing orientation. The length of the line segments between terms of the sequence is either sqrt(3) or 1 units. We start by drawing with sqrt(3) units of length; every time we reach a term with 3 or -3 in the sequence we toggle the selected line length from sqrt(3) to 1, or back again from 1 to sqrt(3).
The drawing process works by recursion into the H8 metatile and its supertiles; this means a(1..14) draws a single "hat" monotile. Then the terms a(1..140) draw the H8 metatile and a(1..1588) and so forth (see formula section) draw the next larger supertile of the H8 metatile. (For details regarding H8 see page 18 in arXiv:2303.10798.) The number of "hat" tiles visible after k recursions is Fibonacci(4*k + 2) (A033890); however, tiles and line segments will be overdrawn multiple times in this process.

Examples

			We start by drawing a line of length sqrt(3):
___
We take then the first term of the sequence a(1) = 3 this means
we turn our drawing turtle 90 degrees to the left and also switch to a length unit of 1.
___|
We take the second term from the sequence a(2) = -2 this means
we turn our drawing turtle 60 degrees to the right, and we keep the selected line length of 1 unit.
    /
___|
(In this ASCII representation, angles and length units are only symbolically represented and do not match the exact values in the description.)
		

Crossrefs

Cf. A363445 describes a curve around the perimeter of this tiling.

Programs

  • MATLAB
    % See Scheuerle link.
    
  • PARI
    L(k) = { my(v = [0, 14, 140, 1588]); if(k > 3, return(12*L(k-1) - 7*L(k-2) + L(k-3)), return(v[k+1])) }
    r1(k) = if(k > 1, return(r5(k-1) + r1(k-1) + r7(k-1)), return(6))
    r2(k) = if(k > 1, return(r2(k-1) + r7(k-1)), return(6))
    r3(k) = if(k > 1, return(2*r5(k-1) + r3(k-1) + r5(k) + r7(k-1)), return(6))
    r5(k) = if(k > 1, return(r5(k-1) + r3(k-1)), return(2))
    r7(k) = if(k > 1, return(r5(k-1) + 2*r3(k-1)), return(4))
    r8(k) = if(k > 1, return(r12(k-1) + r8(k-1) + r14(k-1)), return(1))
    r9(k) = if(k > 1, return(r9(k-1) + r14(k-1)), return(1))
    r10(k) = if(k > 1, return(2*r13(k-1) + r10(k-1) + r11(k-1) + r14(k-1)), return(1))
    r11(k) = if(k > 1, return(2*r13(k-1) + 3*r10(k-1) + r11(k-1)), return(1))
    r12(k) = if(k > 1, return(r13(k-1) + r10(k-1)), return(1))
    r13(k) = if(k > 1, return(r12(k-1) + r13(k-1) + r14(k-1)), return(1))
    r14(k) = if(k > 1, return(r13(k-1) + 2*r10(k-1)), return(1))
    c1(k) = r2(k) + sum(m=1, k-1, r9(k+1-m)*L(m))
    c2(k) = c1(k) - sum(m=1, k-1, L(m))
    c3(k) = r2(k) + r3(k) + sum(m=1, k-1, (r9(k+1-m) + r10(k+1-m) - 1)*L(m))
    c4(k) = r2(k) + r5(k+1) + sum(m=1, k-1, (r9(k+1-m) + r11(k+1-m) - 1)*L(m))
    c5(k) = r2(k) + r7(k) + sum(m=1, k-1, (r9(k+1-m) + r14(k+1-m) - 2)*L(m))
    c6(k) = c4(k) - sum(m=1, k-1, L(m))
    a(NumIter) = { my(a = [3, -2, 3, -2, 3, 2, 0, 2, -3, 2, 3, 2, -3, 2]); for(k = 1, NumIter, a = concat([a, a[1..(c1(k)-1)], -a[c1(k)], a[(c2(k)+1)..L(k)], a[1..(c3(k)-1)], -a[c3(k)], a[(c2(k)+1)..L(k)], a[1..(c3(k)-1)], -a[c3(k)], a[(c2(k)+1)..L(k)], a[1..(c4(k)-1)], -a[c4(k)], a[(c5(k)+1)..L(k)], a[1..(c3(k)-1)], -a[c3(k)], a[(c2(k)+1)..L(k)], a[1..(c3(k)-1)], -a[c3(k)],  a[(c2(k)+1)..L(k)], a[1..(c4(k)-1)], -a[c4(k)], a[(c6(k)+1)..L(k)]]) ); return(a) }
    draw(NumIter) = {my(p = [0, sqrt(3)]); my(dl = [1]); my(s = a(NumIter)); for(j=2, length(s), dl = concat(dl, ((dl[j-1]+(abs(s[j-1])==3))%2)); p = concat(p, p[j]+sqrt(1+2*dl[j])*exp(I*Pi*vecsum(s[1..j-1])*(1/6)) )); plothraw(apply(real, p), apply(imag, p), 1); }

Formula

a(1..14) = {3,-2, 3,-2, 3, 2, 0, 2, -3, 2, 3, 2,-3, 2} = a(1..L(1)) and for k > 0:
a(1..L(k+1)) = {a(1..L(k)), a(1..c1(k)-1), -a(c1(k)), a(c2(k)+1..L(k)), a(1..c3(k)-1), -a(c3(k)), a(c2(k)+1..L(k)), a(1..c3(k)-1), -a(c3(k)), a(c2(k)+1..L(k)), a(1..c4(k)-1), -a(c4(k)), a(c5(k)+1..L(k)), a(1..c3(k)-1), -a(c3(k)), a(c2(k)+1..L(k)), a(1..c3(k)-1), -a(c3(k)), a(c2(k)+1..L(k)), a(1..c4(k)-1), -a(c4(k)), a(c6(k)+1..L(k))}. With:
L(k) = 12*L(k-1) - 7*L(k-2) + L(k-3) for k > 3 with L(1..3) = {14, 140, 1588}.
r1(k) = r5(k-1) + r1(k-1) + r7(k-1), with r1(1) = 6.
r2(k) = r2(k-1) + r7(k-1), with r2(1) = 6.
r3(k) = 2*r6(k-1) + r3(k-1) + r4(k-1) + r7(k-1), with r3(1) = 6 (A003699).
r4(k) = r5(k+1) = 2*r5(k-1) + 3*r3(k-1) + r4(k-1), with r4(1) = 8 (A052530).
r5(k) = r5(k-1) + r3(k-1), with r5(1) = 2. r4, r5, r6 are in the case of this tiling accidentally essentially the same recurrence.
r6(k) = r5(k) = r5(k-1) + r6(k-1) + r7(k-1), with r6(1) = 2 (A052530).
r7(k) = r6(k-1) + 2*r3(k-1), with r7(1) = 4 (A003500).
r8(k) = r12(k-1) + r8(k-1) + r14(k-1), with r8(1) = 1
r9(k) = r9(k-1) + r14(k-1), with r9(1) = 1.
r10(k) = 2*r13(k-1) + r10(k-1) + r11(k-1) + r14(k-1), with r10(1) = 1 (A061278).
r11(k) = 2*r13(k-1) + 3*r10(k-1) + r11(k-1), with r11(1) = 1.
r12(k) = r13(k-1) + r10(k-1), with r12(1) = 1.
r13(k) = r12(k-1) + r13(k-1) + r14(k-1), with r13(1) = 1.
r14(k) = r13(k-1) + 2*r10(k-1), with r14(1) = 1 (A108946 unsigned).
c1(k) = r2(k) + Sum_{m=1..k-1} (r9(k+1-m)*L(m)) = {6, 38, 374, 4204, ...}.
c2(k) = c1(k) - Sum_{m=1..k-1} L(m) = {6, 24, 220, 2462, ...}.
c3(k) = r2(k) + r3(k) + Sum_{m=1..k-1} ((r9(k+1-m) + r10(k+1-m) - 1)*L(m)) = {12, 116, 1282, 14572, ...}.
c4(k) = r2(k) + r4(k) + Sum_{m=1..k-1} ((r9(k+1-m) + r11(k+1-m) - 1)*L(m)) = {14, 138, 1550, 17630, ...}.
c5(k) = r2(k) + r7(k) + Sum_{m=1..k-1} ((r9(k+1-m) + r14(k+1-m) - 2)*L(m)) = {10, 66, 720, 8170, ...}.
c6(k) = c4(k) - Sum_{m=1..k-1} L(m) = {14, 124, 1396, 15888, ...}.
Description of curve position:
OrientationAngle(n) = Sum_{k = 1..n-1} a(k)*Pi*(1/6).
Xcoordinate(n) = Sum_{k = 1..n} cos(OrientationAngle(n))*sqrt(1 + 2*((1 + Sum_{k = 1..n-1} [abs(a(k)) = 3]) mod 2)).
Ycoordinate(n) = Sum_{k = 1..n} sin(OrientationAngle(n))*sqrt(1 + 2*((1 + Sum_{k = 1..n-1} [abs(a(k)) = 3]) mod 2)). [] is the Iverson bracket here.

A363445 Turn sequence of a fractal-like curve which is also the perimeter around an aperiodic tiling based on the "hat" monotile. See the comments section for details.

Original entry on oeis.org

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

Views

Author

Thomas Scheuerle, Jul 09 2023

Keywords

Comments

The curve can be drawn by turtle graphics rules. Each term of the sequence encodes an angle of rotation in units of (1/6)*Pi. For example, a(k) = 3 would mean a turn of 90 degrees to the left, a(k) = -2 a turn of 60 degrees to the right. To draw the tiling we draw a line of length l and then take a term of the sequence to determine the direction of further drawing by rotation relative to the current drawing orientation. The length of the line segments between each term of the sequence is either sqrt(3) or 1 units. We start by drawing with sqrt(3) units of length; every time we reach a term with 3 or -3 in the sequence we toggle the selected line length from sqrt(3) in 1, or back again from 1 in sqrt(3).
The curve is defined by recursion; this means a(1..14) draws a single "hat" monotile. Then the interval a(15..56) draws the perimeter around the H8 metatile and a(57..202) will be the perimeter around the next higher composition of these tiles. (For details regarding H8 see page 18 in arXiv:2303.10798.) The number of "hat" tiles enclosed by this curve after k recursions is Fibonacci(4*k + 2) (A033890).
The number of new terms added after each iteration can be calculated as m(k) = 5*m(k-1) - 5*m(k-2) + m(k-3) with m(1..3) = {14, 42, 146, ...}. After each such iteration the curve will be closed with an enclosed area equivalent to A033890(k+1) "hat" tiles.

Examples

			We start by drawing a line of length sqrt(3):
___
We then take the first term of the sequence, a(1) = 3: this means
we turn our drawing turtle 90 degrees to the left and also switch to a length unit of 1.
___|
We take the second term from the sequence, a(2) = -2: this means
we turn our drawing turtle 60 degrees to the right, and we keep the selected line length of 1 unit.
    /
___|
(In this ASCII representation, angles and length units are only symbolically represented and do not match the exact values in the description.)
		

Crossrefs

Cf. A363348 describes how to draw this curve together with all "hat" monotiles enclosed by it.

Programs

  • MATLAB
    % See Scheuerle link.
    
  • PARI
    L(k) = { my(v = [0, 14, 56, 202]); if(k > 3,return(6*L(k-1) - 10*L(k-2) + 6*L(k-3) - L(k-4)),return(v[k+1])) }
    r1(k) = if(k > 1, return(r5(k-1) + r1(k-1) + r7(k-1)), return(6))
    r2(k) = if(k > 1, return(r2(k-1) + r7(k-1)), return(6))
    r3(k) = if(k > 1, return(2*r5(k-1) + r3(k-1) + r5(k) + r7(k-1)), return(6))
    r5(k) = if(k > 1, return(r5(k-1) + r3(k-1)), return(2))
    r7(k) = if(k > 1, return(r5(k-1) + 2*r3(k-1)), return(4))
    c1(k) = r2(k) + L(k-1)
    c2(k) = r2(k) + r3(k) + L(k-1)
    c3(k) = r2(k) + r5(k+1) + L(k-1)
    c4(k) = r2(k) + r7(k) + L(k-1)
    a(NumIter) = { my(a = [3,-2, 3,-2, 3, 2, 0, 2, -3, 2, 3, 2,-3, 2]); for(k = 1, NumIter, a = concat([a, a[(L(k-1)+1)..(c1(k)-1)], -a[c1(k)], a[(c1(k)+1)..(c2(k)-1)], -a[c1(k)], a[(c1(k)+1)..(c2(k)-1)], -a[c1(k)], a[(c1(k)+1)..(c3(k)-1)], -a[c4(k)], a[(c4(k)+1)..(c2(k)-1)], -a[c1(k)], a[(c1(k)+1)..(c2(k)-1)], -a[c1(k)],  a[(c1(k)+1)..(c3(k)-1)], -a[c3(k)], a[(c3(k)+1)..length(a)] ]) ); return(a) }
    draw(NumIter) = {my(p = [0, sqrt(3)]); my(dl = [1]); my(s = a(NumIter)); for(j=2,length(s), dl = concat(dl, ((dl[j-1]+(abs(s[j-1])==3))%2)); p = concat(p, p[j]+sqrt(1+2*dl[j])*exp(I*Pi*vecsum(s[1..j-1])*(1/6)) )); plothraw(apply(real,p),apply(imag,p), 1);}

Formula

a(1..14) = {3,-2, 3,-2, 3, 2, 0, 2, -3, 2, 3, 2,-3, 2} = a(1..L(1)) and for k > 0:
a(1..L(k+1)) = {a(1..L(k-1)), a(L(k)+1..c1(k)-1), -a(c1(k)), a(c1(k)+1..c2(k)-1), -a(c1(k)), a(c1(k)+1..c2(k)-1), -a(c1(k)), a(c1(k)+1..c3(k)-1), -a(c4(k)), a(c4(k)+1..c2(k)-1), -a(c1(k)), a(c1(k)+1..c2(k)-1), -a(c1(k)), a(c1(k)+1..c3(k)-1), -a(c3(k)), a(c3(k)+1..L(k))}. With:
L(k) = 6*L(k-1) - 10*L(k-2) + 6*L(k-3) - L(k-4), for k > 3 and L(0..3) = {0, 14, 56, 202}.
L(k) = L(k-1) + r1(k-1) + 3*r3(k-1) + 2*r4(k-1) + r6(k-1).
r1(k) = r5(k-1) + r1(k-1) + r7(k-1), with r1(1) = 6.
r2(k) = r2(k-1) + r7(k-1), with r2(1) = 6.
r3(k) = 2*r6(k-1) + r3(k-1) + r4(k-1) + r7(k-1), with r3(1) = 6 (A003699).
r4(k) = r6(k+1) = 2*r5(k-1) + 3*r3(k-1) + r4(k-1), with r4(1) = 8 (A052530).
r5(k) = r5(k-1) + r3(k-1), with r5(1) = 2. r4, r5, r6 are in the case of this tiling accidentally essentially the same recurrence.
r6(k) = r5(k) = r5(k-1) + r6(k-1) + r7(k-1), with r6(1) = 2 (A052530).
r7(k) = r6(k-1) + 2*r3(k-1), with r7(1) = 4 (A003500).
c1(k) = r2(k) + L(k) = {6, 24, 80, ...}.
c2(k) = r2(k) + r3(k) + L(k) = {12, 46, 162, ...}.
c3(k) = r2(k) + r4(k) + L(k) = {14, 54, 192, ...}.
c4(k) = r2(k) + r7(k) + L(k) = {10, 38, 132, ...}.
Description of curve position:
OrientationAngle(n) = Sum_{k = 1..n-1} a(k)*Pi*(1/6).
Xcoordinate(n) = Sum_{k = 1..n} cos(OrientationAngle(n))*sqrt(1 + 2*((1 + Sum_{k = 1..n-1} [abs(a(k)) = 3]) mod 2)).
Ycoordinate(n) = Sum_{k = 1..n} sin(OrientationAngle(n))*sqrt(1 + 2*((1 + Sum_{k = 1..n-1} [abs(a(k)) = 3]) mod 2)). [] is the Iverson bracket here.
For some nonnegative integers b and c:
OrientationAngle(L(b)) = OrientationAngle(L(c)).
Xcoordinate(L(b)) = Xcoordinate(L(c)).
Ycoordinate(L(b)) = Ycoordinate(L(c)).

A077784 Numbers k such that (10^k - 1)/3 + 2*10^floor(k/2) is a palindromic wing prime (a.k.a. near-repdigit palindromic prime).

Original entry on oeis.org

3, 5, 35, 159, 237, 325, 355, 371, 481, 1649, 3641, 4709, 269623
Offset: 1

Views

Author

Patrick De Geest, Nov 16 2002

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
a(13) > 2*10^5. - Robert Price, Apr 03 2016

Examples

			5 is a term because (10^5 - 1)/3 + 2*10^2 = 33533.
		

References

  • C. Caldwell and H. Dubner, "Journal of Recreational Mathematics", Volume 28, No. 1, 1996-97, pp. 1-9.

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[(10^n + 6*10^Floor[n/2] - 1)/3], Print[n]], {n, 3, 4800, 2}] (* Robert G. Wilson v, Dec 16 2005 *)

Formula

a(n) = 2*A183175(n) + 1.

Extensions

Name corrected by Jon E. Schoenfield, Oct 31 2018
a(13) from Robert Price, Aug 03 2024

A077828 Expansion of 1/(1-3*x-3*x^2-3*x^3).

Original entry on oeis.org

1, 3, 12, 48, 189, 747, 2952, 11664, 46089, 182115, 719604, 2843424, 11235429, 44395371, 175422672, 693160416, 2738935377, 10822555395, 42763953564, 168976333008, 667688525901, 2638286437419, 10424853888984, 41192486556912, 162766880649945, 643152663287523
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...12, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784, A097826-7.
Cf. A071675.

Programs

  • Mathematica
    CoefficientList[Series[1/(1-3x-3x^2-3x^3),{x,0,30}],x] (* or *) LinearRecurrence[ {3,3,3},{1,3,12},30] (* Harvey P. Dale, Dec 25 2018 *)
  • PARI
    Vec(1/(1-3*x-3*x^2-3*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

Formula

a(n) = sum{k=0..n, T(n-k, k)3^(n-k)}, T(n, k) = trinomial coefficients (A027907). - Paul Barry, Feb 15 2005
a(n) = sum{k=0..n, sum{i=0..floor((n-k)/2), C(n-k-i, i)C(k, n-k-i)}*3^k}. - Paul Barry, Apr 26 2005

A077829 Expansion of 1/(1-3*x-3*x^2-2*x^3).

Original entry on oeis.org

1, 3, 12, 47, 183, 714, 2785, 10863, 42372, 165275, 644667, 2514570, 9808261, 38257827, 149227404, 582072215, 2270414511, 8855914986, 34543132921, 134737972743, 525555146964, 2049965624963, 7996038261267, 31189121952618, 121655411891581, 474525678055131
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...14, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784, A097826-A097828, A076139.

Programs

  • Mathematica
    CoefficientList[Series[1/(1 - 3*x - 3*x^2 - 2*x^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jan 20 2024 *)
    LinearRecurrence[{3,3,2},{1,3,12},30] (* Harvey P. Dale, Dec 20 2024 *)
  • PARI
    Vec(1/(1-3*x-3*x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

Formula

G.f.: 1/(1-3*x-3*x^2-2*x^3).
a(n) = 3*a(n-1) + 3*a(n-2) + 2*a(n-3). - Wesley Ivan Hurt, Jan 20 2024

A077831 Expansion of 1/(1-3*x-2*x^2-2*x^3).

Original entry on oeis.org

1, 3, 11, 41, 151, 557, 2055, 7581, 27967, 103173, 380615, 1404125, 5179951, 19109333, 70496151, 260067021, 959412031, 3539362437, 13057045415, 48168685181, 177698871247, 655548074933, 2418379337655, 8921631905325, 32912750541151, 121418274109413
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/(1-3x-2x^2-2x^3),{x,0,30}],x] (* or *) LinearRecurrence[{3,2,2},{1,3,11},30] (* Harvey P. Dale, Feb 28 2025 *)
  • PARI
    Vec(1/(1-3*x-2*x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

A166259 Positive integers n such that a centered polygonal number n*k*(k+1)/2+1 is not a square for any k > 0.

Original entry on oeis.org

2, 18, 32, 50, 72, 98, 128, 162, 200, 242, 338, 392, 450, 512, 578, 648, 722, 882, 968, 1058, 1152, 1250, 1352, 1458, 1682, 1800, 1922, 2048, 2178, 2312, 2401, 2450, 2662, 2738, 2809, 2888, 3042, 3174, 3200, 3362, 3528, 3698, 3750, 4050, 4225, 4232, 4418, 4489, 4608, 4802
Offset: 1

Views

Author

Alexander Adamchuk, Oct 10 2009

Keywords

Comments

Positive integers n such that A120744(n) = -1.

Crossrefs

Extensions

Edited and extended by Max Alekseyev, Jan 20 2010

A219021 Sum of cubes of first n terms of Lucas sequence U(4,1) (A001353) divided by sum of their first powers.

Original entry on oeis.org

1, 13, 172, 2356, 32661, 454329, 6325816, 88099144, 1227032521, 17090245381, 238035989412, 3315412063548, 46177727142301, 643172746439665, 8958240642814960, 124772195953666576, 1737852501591502353, 24205162822158610557, 337134426993071036956, 4695676815022772628676, 65402340983109050660389
Offset: 1

Views

Author

Max Alekseyev, Nov 09 2012

Keywords

Comments

For a Lucas sequence U(k,1), the sum of the cubes of the first n terms is divisible by the sum of the first n terms. This sequence corresponds to the case of k=4.

Crossrefs

Programs

  • Magma
    I:=[1,13,172,2356,32661]; [n le 5 select I[n] else 19*Self(n-1)-76*Self(n-2)+76*Self(n-3)-19*Self(n-4)+Self(n-5): n in [1..30]]; // Vincenzo Librandi, Dec 09 2015
  • Mathematica
    CoefficientList[Series[(1 - 6 x + x^2)/((1 - x) (1 - 14 x + x^2) (1 - 4 x + x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Dec 09 2015 *)
  • PARI
    Vec(x*(1-6*x+x^2)/((1-x)*(1-14*x+x^2)*(1-4*x+x^2)) + O(x^30)) \\ Colin Barker, Dec 08 2015
    

Formula

a(n) = Sum_{k=1..n} A001353(k)^3 / Sum_{k=1..n} A001353(k).
a(n) = Sum_{k=1..n} A001353(k)^3 / A061278(n).
From Colin Barker, Dec 08 2015: (Start)
a(n) = 19*a(n-1)-76*a(n-2)+76*a(n-3)-19*a(n-4)+a(n-5) for n>5.
G.f.: x*(1-6*x+x^2) / ((1-x)*(1-14*x+x^2)*(1-4*x+x^2)).
(End)

A222393 Nonnegative integers m such that 18*m*(m+1)+1 is a square.

Original entry on oeis.org

0, 4, 12, 152, 424, 5180, 14420, 175984, 489872, 5978292, 16641244, 203085960, 565312440, 6898944364, 19203981732, 234361022432, 652370066464, 7961375818340, 22161378278060, 270452416801144, 752834491387592, 9187420795420572, 25574211328900084
Offset: 1

Views

Author

Bruno Berselli, Feb 19 2013

Keywords

Comments

a(n+2)/a(n) tends to A156164.
a(n) is congruent to {0,2,4} (mod 5, 6 and 10).

Crossrefs

Cf. nonnegative integers n such that k*n*(n+1)+1 is a square: A001652 (k=2), A001921 (k=3), A001477 (k=4), A053606 (k=5), A105038 (k=6), A105040 (k=7), A053141 (k=8), A222390 (k=10), A105838 (k=11), A061278 (k=12), A104240 (k=13); A105063 (k=17), this sequence (k=18), A101180 (k=19), A077259 (k=20) [incomplete list].

Programs

  • Magma
    m:=22; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(4*(1+x)^2/((1-x)*(1-6*x+x^2)*(1+6*x+x^2))));
    
  • Magma
    I:=[0,4,12,152,424]; [n le 5 select I[n] else Self(n-1)+34*Self(n-2)-34*Self(n-3)-Self(n-4)+Self(n-5): n in [1..25]]; // Vincenzo Librandi, Aug 18 2013
    
  • Mathematica
    LinearRecurrence[{1, 34, -34, -1, 1}, {0, 4, 12, 152, 424}, 23]
    CoefficientList[Series[4 x (1 + x)^2 / ((1 - x) (1 - 6 x + x^2) (1 + 6 x + x^2)), {x, 0, 25}], x] (* Vincenzo Librandi, Aug 18 2013 *)
  • Maxima
    makelist(expand(-1/2+((3+sqrt(2)*(-1)^n)*(3-2*sqrt(2))^(2*floor(n/2))+(3-sqrt(2)*(-1)^n)*(3+2*sqrt(2))^(2*floor(n/2)))/12), n, 1, 23);
    
  • PARI
    x='x+O('x^30); concat([0], Vec(4*x*(1+x)^2/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)))) \\ G. C. Greubel, Jul 15 2018

Formula

G.f.: 4*x*(1+x)^2/((1-x)*(1-6*x+x^2)*(1+6*x+x^2)).
a(n) = a(-n+1) = a(n-1)+34*a(n-2)-34*a(n-3)-a(n-4)+a(n-5).
a(n) = -1/2+((3+t*(-1)^n)*(3-2*t)^(2*floor(n/2))+(3-t*(-1)^n)*(3+2*t)^(2*floor(n/2)))/12, where t=sqrt(2).

A077826 Expansion of (1-x)^(-1)/(1-2*x-3*x^2-2*x^3).

Original entry on oeis.org

1, 3, 10, 32, 101, 319, 1006, 3172, 10001, 31531, 99410, 313416, 988125, 3115319, 9821846, 30965900, 97627977, 307797347, 970410426, 3059468848, 9645763669, 30410754735, 95877738174, 302279267892, 953013259777, 3004619799579, 9472837914274, 29865561746840
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...10, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784.
Partial sums of A077833.

Programs

Formula

From Wesley Ivan Hurt, Jun 26 2022: (Start)
G.f.: (1-x)^(-1)/(1-2*x-3*x^2-2*x^3).
a(n) = 3*a(n-1) + a(n-2) - a(n-3) - 2*a(n-4). (End)
Previous Showing 21-30 of 36 results. Next