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 32 results. Next

A273052 Numbers n such that 7*n^2 + 8 is a square.

Original entry on oeis.org

2, 34, 542, 8638, 137666, 2194018, 34966622, 557271934, 8881384322, 141544877218, 2255836651166, 35951841541438, 572973628011842, 9131626206648034, 145533045678356702, 2319397104647059198, 36964820628674590466, 589117732954146388258, 9388918906637667621662
Offset: 1

Views

Author

Vincenzo Librandi, May 14 2016

Keywords

Crossrefs

Cf. Numbers n such that k*n^2+(k+1) is a square: A052530 (k=3), this sequence (k=7), A106328 (k=8), A106256 (k=12), A273053 (k=15), A273054 (k=19), A106331 (k=24).

Programs

  • Magma
    I:=[2,34]; [n le 2 select I[n] else 16*Self(n-1)-Self(n-2): n in [1..30]];
    
  • Mathematica
    LinearRecurrence[{16, -1}, {2, 34}, 30]
  • PARI
    Vec(x*(2+2*x)/(1-16*x+x^2) + O(x^50)) \\ Colin Barker, May 14 2016

Formula

O.g.f.: x*(2 + 2*x)/(1 - 16*x + x^2).
E.g.f.: 2*(1 + (3*sqrt(7)*sinh(3*sqrt(7)*x) - 7*cosh(3*sqrt(7)*x))*exp(8*x)/7). - Ilya Gutkovskiy, May 14 2016
a(n) = 16*a(n-1) - a(n-2).
a(n) = (-(8-3*sqrt(7))^n*(3+sqrt(7))-(-3+sqrt(7))*(8+3*sqrt(7))^n)/sqrt(7). - Colin Barker, May 14 2016

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)).

A115169 Integers b > 0 for which there exists a positive integer a <= b such that (a^2 + b^2)/(1 + ab) is an integer.

Original entry on oeis.org

1, 8, 27, 30, 64, 112, 125, 216, 240, 343, 418, 512, 729, 1000, 1020, 1331, 1560, 1728, 2133, 2197, 2744, 3120, 3375, 4096, 4913, 5822, 5832, 6859, 7770, 8000, 9261, 10648, 12167, 13824, 15625, 16256, 16800, 17576, 18957, 19683
Offset: 1

Views

Author

John W. Layman, Mar 03 2006

Keywords

Comments

All positive cubes are in this sequence.
Indeed, if b = k^3, then for a = k, we have a^2 + b^2 = k^2 + k^6 = (1 + k^4)*k^2 = (a*b + 1)*a^2. More generally, if the ratio (a^2 + b^2)/(a*b + 1) is an integer, it is equal to gcd(a,b)^2, thus in particular a perfect square. (This was Question 6 in the 1988 IMO.) All solutions (a,b) are member of a sequence {(x(n), x(n+1)); n = 1,2,...} where x = (0, k, k^3, k^5 - k, ...) with x(n+1) = k^2*x(n) - x(n-1) and some k >= 2, cf. A052530 for k = 2, A065100 for k = 3. (One might consider >= 0 instead > 0 in the definition, but a = 0 yields a solution for any b.) - M. F. Hasler, Jun 12 2019

Examples

			(2^2+8^2)/(1+2*8) = 68/17 = 4, an integer, so 8 is a term of the series.
From _M. F. Hasler_, Jun 12 2019: (Start)
The list of solutions starts:
     a      b     a^2+b^2   a*b+1   ratio
   ----------------------------------------
     1      1          2       2       1
     8      2         68      17       4
    27      3        738      82       9
    30      8        964     241       4
    64      4       4112     257      16
   112     30      13444    3361       4
   125      5      15650     626      25
   216      6      46692    1297      36
   240     27      58329    6481       9
   343      7     117698    2402      49
   418    112     187268   46817       4
   512      8     262208    4097      64
   729      9     531522    6562      81
  1000     10    1000100   10001     100
  1020     64    1044496   65281      16
(End)
		

Crossrefs

Cf. A000578 (cubes), A052530 (subsequence of terms for ratio 2^2, for n >= 2), A065100 (subsequence of terms for ratio 3^2).

Programs

  • PARI
    isok(n) = for(m=0, n, if (denominator((m^2+n^2)/(1+m*n))==1, return(1))); return (0); \\ Michel Marcus, Sep 18 2017
    
  • PARI
    is_A115169(n)=for(a=1,n\3+1,(a^2+n^2)%(1+a*n)||return(1)) \\ M. F. Hasler, Jun 12 2019
    
  • PARI
    is(n)=my(s=sqrtnint(n,3),n2=n^2); for(b=1,s, if((n2+b^2)%(n*b+1)==0, return(1))); for(K=2,sqrtint((n2+(s+1)^2)\(n*s+n+1)), my(k=K^2); if(issquare(k^2*n2-4*n2+4*k), return(1))); 0 \\ Charles R Greathouse IV, Nov 08 2021

Extensions

Edited by M. F. Hasler, Jun 12 2019

A119749 Number of compositions of n into odd blocks with one element in each block distinguished.

Original entry on oeis.org

1, 1, 4, 7, 15, 32, 65, 137, 284, 591, 1231, 2560, 5329, 11089, 23076, 48023, 99935, 207968, 432785, 900633, 1874236, 3900319, 8116639, 16890880, 35150241, 73148321, 152223044, 316779047, 659223215, 1371856032, 2854858465
Offset: 1

Views

Author

Louis Shapiro, Jul 30 2006

Keywords

Comments

The sequence is the INVERT transform of the aerated odd integers. - Gary W. Adamson, Feb 02 2014
Number of compositions of n into odd parts where there is 1 sort of part 1, 3 sorts of part 3, 5 sorts of part 5, ... , 2*k-1 sorts of part 2*k-1. - Joerg Arndt, Aug 04 2014

Examples

			a(3) = 4 since Abc, aBc, abC come from one block of size 3 and A/B/C comes from having three blocks. The capital letters are the distinguished elements.
		

Crossrefs

Cf. A105309, A052530, A000045, A030267. Row sums of A292835.

Programs

  • Mathematica
    Rest@ CoefficientList[ Series[x(1 + x^2)/(x^4 - x^3 - 2x^2 - x + 1), {x, 0, 50}], x] (* Robert G. Wilson v *)

Formula

G.f.: (x+x^3)/(x^4 - x^3 -2x^2 -x +1).
a(n) = A092886(n)+A092886(n-2). - R. J. Mathar, Mar 08 2018
Sum_{k=0..n} a(k) = (3*a(n) + 2*a(n-1) - a(n-3))/2 - 1. - Xilin Wang and Greg Dresden, Aug 27 2020

A065101 a(0) = c, a(1) = p*c^3; a(n+2) = p*c^2*a(n+1) - a(n), for p = 3, c = 2.

Original entry on oeis.org

2, 24, 286, 3408, 40610, 483912, 5766334, 68712096, 818778818, 9756633720, 116260825822, 1385373276144, 16508218487906, 196713248578728, 2344050764456830, 27931895924903232, 332838700334381954
Offset: 0

Views

Author

N. J. A. Sloane, Nov 12 2001

Keywords

Crossrefs

Cf. A052530.

Programs

  • Mathematica
    a[0] = c; a[1] = p*c^3; a[n_] := a[n] = p*c^2*a[n - 1] - a[n - 2]; p = 3; c = 2; Table[ a[n], {n, 0, 20} ]
  • PARI
    : polya002(3,2,18). For definition of function polya002 see A052530.
    
  • PARI
    { p=3; c=2; k=p*c^2; for (n=0, 100, if (n>1, a=k*a1 - a2; a2=a1; a1=a, if (n, a=a1=k*c, a=a2=c)); write("b065101.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 07 2009

Formula

G.f.: 2/(1 - 12*x + x^2). - Floor van Lamoen, Feb 07 2002
a(n) = 2*A004191(n). - R. J. Mathar, Sep 27 2014

A065102 a(0) = c, a(1) = p*c^3; a(n+2) = p*c^2*a(n+1) - a(n), for p = 2, c = 3.

Original entry on oeis.org

3, 54, 969, 17388, 312015, 5598882, 100467861, 1802822616, 32350339227, 580503283470, 10416708763233, 186920254454724, 3354147871421799, 60187741431137658, 1080025197889056045, 19380265820571871152
Offset: 0

Views

Author

N. J. A. Sloane, Nov 12 2001

Keywords

Comments

Integer values of Fibonacci numbers * 3/8 (see 2nd formula). - Vladimir Joseph Stephan Orlovsky, Oct 25 2009

Programs

  • Mathematica
    a[0] = c; a[1] = p*c^3; a[n_] := a[n] = p*c^2*a[n - 1] - a[n - 2]; p = 2; c = 3; Table[ a[n], {n, 0, 20} ]
    Clear[f,lst,n,a] f[n_]:=Fibonacci[n]; lst={};Do[a=f[n]*(3/8);If[IntegerQ[a],AppendTo[lst,a]],{n,0,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 25 2009 *)
    nxt[{a_,b_}]:={b,18b-a}; NestList[nxt,{3,54},20][[;;,1]] (* or *) LinearRecurrence[{18,-1},{3,54},20] (* Harvey P. Dale, Apr 23 2023 *)
  • PARI
    polya002(2,3,17) \\ For definition of function polya002 see A052530.
    
  • PARI
    { p=2; c=3; k=p*c^2; for (n=0, 100, if (n>1, a=k*a1 - a2; a2=a1; a1=a, if (n, a=a1=k*c, a=a2=c)); write("b065102.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 07 2009

Formula

G.f.: 3/(1 - 18*x + x^2). - Floor van Lamoen, Feb 07 2002
a(n) = 3*A049660(n+1). - R. J. Mathar, Sep 27 2014

A162959 The pairs (x,y) such that (x^2 + y^2)/(x*y + 1) is a perfect square, i.e., 4.

Original entry on oeis.org

0, 2, 2, 8, 8, 30, 30, 112, 112, 418, 418, 1560, 1560, 5822, 5822, 21728, 21728, 81090, 81090, 302632, 302632, 1129438, 1129438, 4215120, 4215120, 15731042, 15731042, 58709048, 58709048, 219105150, 219105150, 817711552, 817711552, 3051741058, 3051741058, 11389252680, 11389252680
Offset: 1

Views

Author

Vincenzo Librandi, Jul 19 2009

Keywords

Comments

Essentially A052530, each term besides the first repeated. - R. J. Mathar, Jul 21 2009

Examples

			Pairs are (8,30) with (8^2 + 30^2)/(8*30 + 1) = 4, or (30,112) with (30^2 + 112^2)/(30*112 + 1) = 4.
		

Programs

  • Mathematica
    CoefficientList[Series[2 x (x + 1) / (x^4 - 4 x^2 + 1), {x, 0, 40}], x] (* Vincenzo Librandi, May 14 2013 *)
  • PARI
    x='x+O('x^66); concat([0],Vec(2*x^2*(x+1)/(x^4-4*x^2+1))) \\ Joerg Arndt, May 15 2013

Formula

From Colin Barker, Feb 21 2013: (Start)
a(n) = 4*a(n-2) - a(n-4).
G.f.: 2*x^2*(x+1) / (x^4-4*x^2+1). (End)

A254308 a(n) = a(n-1) + (if a(n-1) is odd a(n-2) else a(n-3)) with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 11, 19, 30, 41, 71, 112, 153, 265, 418, 571, 989, 1560, 2131, 3691, 5822, 7953, 13775, 21728, 29681, 51409, 81090, 110771, 191861, 302632, 413403, 716035, 1129438, 1542841, 2672279, 4215120, 5757961, 9973081, 15731042, 21489003, 37220045
Offset: 0

Views

Author

Russell Walsmith, Feb 23 2015

Keywords

Comments

Every third iteration is a tribonacci-type recursion: a(n) = a(n-1) + a(n-3) otherwise it is Fibonacci-type a(n) = a(n-1) + a(n-2).

Examples

			For n = 7, a(n-1) is even so 8 + 3 = 11.
G.f. = x + x^2 + 2*x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 11*x^7 + 19*x^8 + 30*x^9 + ...
		

Crossrefs

Programs

  • Haskell
    a254308 n = a254308_list !! n
    a254308_list = 0 : 1 : 1 : zipWith3 (\u v w -> u + if odd u then v else w)
                   (drop 2 a254308_list) (tail a254308_list) a254308_list
    -- Reinhard Zumkeller, Feb 24 2015
    
  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1+x+2*x^2-x^3+x^4)/(1-4*x^3+x^6))); // G. C. Greubel, Aug 03 2018
  • Mathematica
    CoefficientList[Series[x*(1+x+2*x^2-x^3+x^4)/(1-4*x^3+x^6), {x, 0, 60}], x] (* G. C. Greubel, Aug 03 2018 *)
    nxt[{a_,b_,c_}]:={b,c,If[OddQ[c],c+b,c+a]}; NestList[nxt,{0,1,1},50][[All,1]] (* or *) LinearRecurrence[{0,0,4,0,0,-1},{0,1,1,2,3,5},50] (* Harvey P. Dale, May 12 2022 *)
  • PARI
    {a(n) = polcoeff( x * if( n<0, n=-n; -(1 - x + 2*x^2 + x^3 + x^4), (1 + x + 2*x^2 - x^3 + x^4)) / (1 - 4*x^3 + x^6) + x * O(x^n), n)}; /* Michael Somos, Feb 23 2015 */
    

Formula

Two identities: a(3n)/2 + a(3n-3)/2 = a(3n-1); a(3n)/2 - a(3n-3)/2 = a(3n-2).
G.f.: x * (1 + x + 2*x^2 - x^3 + x^4) / (1 - 4*x^3 + x^6). - Michael Somos, Feb 23 2015
0 = a(n) - 4*a(n+3) + a(n+6) for all n in Z. - Michael Somos, Feb 23 2015
a(3*n) = A052530(n). a(3*n-2) = A001835(n). a(3*n+2) = A001834(n). - Michael Somos, Feb 23 2015

A284985 a(0)=0, a(1)=24; for n>=2, a(n)=576*a(n-1)-a(n-2).

Original entry on oeis.org

0, 24, 13824, 7962600, 4586443776, 2641783652376, 1521662797324800, 876475129475432424, 504848152915051751424, 290791659603940333387800, 167495491083716716979621376, 96477112072561225039928524776, 55570649058304181906281850649600
Offset: 0

Views

Author

Kyle Degen, Apr 06 2017

Keywords

Comments

a(n-1) and a(n+1) are the solutions for c if b=a(n) in (b^2+c^2)/(b*c+1)=576 and there are no other pairs of solutions apart from consecutive pairs of terms in this sequence.

Crossrefs

Cf. A052530.

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,576b-a}; NestList[nxt,{0,24},20][[;;,1]] (* or *) LinearRecurrence[{576,-1},{0,24},20] (* Harvey P. Dale, Jul 16 2024 *)
  • PARI
    concat(0, Vec(24*x/(1-576*x+x^2) + O(x^20))) \\ Colin Barker, Apr 10 2017

Formula

a(n) = 576*a(n-1)-a(n-2).
a(n) = 12/(17*sqrt(287))*(((-1/(288+17287))^(n))+((288+(17*sqrt(287)))^(n))).
G.f.: 24*x/(1-576*x+x^2) . - R. J. Mathar, Apr 10 2017

Extensions

a(8)-a(12) from Giovanni Resta, Apr 10 2017
Previous Showing 21-30 of 32 results. Next