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 11-14 of 14 results.

A006695 a(2n)=2*a(2n-2)^2-1, a(2n+1)=2*a(2n)-1, a(0)=2.

Original entry on oeis.org

2, 3, 7, 13, 97, 193, 18817, 37633, 708158977, 1416317953, 1002978273411373057, 2005956546822746113, 2011930833870518011412817828051050497, 4023861667741036022825635656102100993
Offset: 0

Views

Author

Keywords

Comments

An infinite coprime sequence defined by recursion.
Every term is relatively prime to all others. - Michael Somos, Feb 01 2004

References

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

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_,b_}]:=If[OddQ[n],{n+1,b,2a^2-1},{n+1,b,2b-1}]; Transpose[ NestList[ nxt,{1,2,3},15]][[2]] (* Harvey P. Dale, Jun 22 2015 *)
  • PARI
    a(n)=if(n<1,2*(n==0),if(n%2,2*a(n-1)-1,2*a(n-2)^2-1))

Formula

a(2n) = A001075(2^n).

A066356 Numerator of sequence defined by recursion c(n) = 1 + c(n-2) / c(n-1), c(0) = 0, c(1) = 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 7, 23, 167, 3925, 661271, 2609039723, 1728952269242533, 4516579101127820242349159, 7812958861560974806259705508894834509747, 35298563436210937269618773778802420542715366288238091341051372773
Offset: 0

Views

Author

Michael Somos, Dec 21 2001

Keywords

Comments

a(i) and a(j) are relative prime for all i>j>0.
An infinite coprime sequence defined by recursion.

Crossrefs

Cf. A001685, A002715, A003686, A006695, A064184 (denominators), A064526.

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,1+a/b}; NestList[nxt,{0,1},20][[All,1]]//Numerator (* Harvey P. Dale, Sep 26 2016 *)
  • PARI
    {a(n) = if( n<4, max(0, n) - (n>1), (2 * a(n-1) * a(n-2)^2 - a(n-1)^2 * a(n-4) - a(n-2)^3 * a(n-3)) / (a(n-2) - a(n-3) * a(n-4)))}

Formula

a(n) = (2 * a(n - 1) * a(n - 2)^2 - a(n - 1)^2 * a(n - 4) - a(n - 2)^3 * a(n - 3)) / (a(n - 2) - a(n - 3) * a(n - 4)).
a(n) = b(n) + b(n-1) * a(n-2) where b(n) = A064184(n).

A081475 Consider the mapping f(x/y) = (x+y)/(2xy) where x/y is a reduced fraction. Beginning with x_0 = 1 and y_0 = 2, repeated application of this mapping produces a sequence of fractions x_n/y_n; a(n) is the n-th numerator.

Original entry on oeis.org

1, 3, 7, 31, 367, 21199, 15311887, 648309901711, 19853227652502777487, 25742087295488761786102488482959, 1022127038655087543344600484892552190865956757100687
Offset: 0

Views

Author

Amarnath Murthy, Mar 24 2003

Keywords

Comments

An infinite coprime sequence defined by recursion.
Every term is relatively prime to all others. - Michael Somos, Feb 01 2004
Note that gcd(x+y,2*x*y) <= gcd(x+y,2)*gcd(x+y,x)*gcd(x+y,y), so gcd(x,y) = 1 implies gcd(x+y,2*x*y) = 1 unless both x,y are odd. As a result, the definition gives x_{n+1} = x_n+y_n and y_{n+1} = 2*(x_n)*(y_n) with x_0 = 1 and y_0 = 2. - Jianing Song, Oct 10 2021

Examples

			The n-th application of the mapping produces the fraction x_n/y_n from the fraction x_(n-1)/y_(n-1):
n=1:  f(1/2) = (1+2)/(2*1*2) = 3/4 (so a(1)=3);
n=2:  f(3/4) = (3+4)/(2*3*4) = 7/24 (so a(2)=7);
n=3:  f(7/24) = (7+24)/(2*7*24) = 31/336 (so a(3)=31).
From _Jianing Song_, Oct 10 2021: (Start)
a(0) = 1;
a(1) = 1 + 2^1 = 3;
a(2) = 3 + 2^2*1 = 7;
a(3) = 7 + 2^3*1*3 = 31;
a(4) = 31 + 2^4*1*3*7 = 367;
a(5) = 367 + 2^5*1*3*7*31 = 21199. (End)
		

Crossrefs

The denominators are A081476.

Programs

  • PARI
    a(n)=local(v); if(n<2,n>0,v=[1,2];for(k=2,n,v=[v[1]+v[2],2*v[1]*v[2]]); v[1])
    
  • PARI
    lista(n) = my(v=vector(n+1)); v[1]=1; if(n>=1, v[2]=3); for(k=2, n, v[k+1] = v[k] + 2*v[k-1]*(v[k]-v[k-1])); v \\ Jianing Song, Oct 10 2021

Formula

From Jianing Song, Oct 10 2021: (Start)
a(n) = a(n-1) + A081476(n-1) for n >= 1 with a(0) = 1 and A081476(0) = 2.
a(0) = 1, a(n) = a(n-1) + 2^n*a(0)*a(1)*...*a(n-2) for n >= 1.
a(0) = 1, a(1) = 3, a(n) = a(n-1) + 2*a(n-2)*(a(n-1)-a(n-2)) for n >= 2. (End)

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003
Edited by Jon E. Schoenfield, Apr 25 2014

A296516 a(n) is the number of terms in expanded form of bivariate polynomial Q_n, where (P_n, Q_n) is defined by: P_0 = x, Q_0 = y, P_(n+1) = P_n + Q_n, Q_(n+1) = P_n * Q_n.

Original entry on oeis.org

1, 1, 2, 5, 14, 40, 111, 300, 797, 2098, 5499, 14389, 37634, 98435, 257516, 673827, 1763460, 4615686, 12082137, 31628294
Offset: 0

Views

Author

Luc Rousseau, Feb 27 2018

Keywords

Comments

Programs based on the direct application of the definition quickly reach a limitation by combinatorial explosion, hence this short list of values in section Data. The first conjectured formula (see Formulas) obtained by the observation of a pattern in the 2D shape of Q_n (as drawn in the Examples) is more computationally efficient and makes it possible to produce a significantly longer list of (nonguaranteed) values: see attached a-file in b-file format, section Links.
A003686 and A064847 are values of P_n and Q_n at x=y=1 (i.e., sums of coefficients in these polynomials). At x=2, y=1 (or vice versa) P_n and Q_n seem to give same sequences but shifted. At x=y=-1, P_n seems to give A000058 negated interleaved with -1's, while Q_n seems to give A007018 interleaved with the same sequence negated. - Andrey Zabolotskiy, May 22 2018

Examples

			Q_0 = y -> one term -> a(0) = 1;
Q_1 = x*y -> one term -> a(1) = 1;
Q_2 = x^2*y + x*y^2 -> two terms -> a(2) = 2;
Q_3 = x^3*y + 2*x^2*y^2 + x^3*y^2 + x*y^3 + x^2*y^3 -> five terms -> a(3) = 5;
...
Locations of terms in 2D arrays indexed by the exponents of x and y:
   0: .   1: ..   2: ...   3: ....   4: ......   5: .........
      X      .X      ..X      ...X      ....X.      .....X...
                     .X.      ..XX      ...XXX      ....XXXX.
                              .XX.      ..XXXX      ...XXXXXX
                                        .XXXX.      ..XXXXXXX
                                        ..XX..      .XXXXXXXX
                                                    ..XXXXXX.
                                                    ..XXXXX..
                                                    ...XXX...
		

Crossrefs

Cf. A005207 (which with +1 added appears to be to P_n as a(n) is to Q_n).

Programs

  • Mathematica
    {p[0], q[0]} := {x, y};
    {p[n_], q[n_]} := {p[n - 1] + q[n - 1], p[n - 1] q[n - 1]};
    a[n_] := Length@CoefficientRules[q[n]];
    Table[a[n], {n, 0, 10}] (* Andrey Zabolotskiy, Peter Luschny, May 30 2018 *)
    From Luc Rousseau, Feb 27 2018: (Start)
    (* conjectured: *)
    T[n_] := n*(n + 1)/2
    F[n_] := Fibonacci[n]
    V[n_] := Sum[F[k]*(Sum[(n - 2 - l)*F[l], {l, k + 1, n - 3}]), {k, 1, n - 4}]
    W[n_] := Sum[(n - 2 - l)*T[F[l]], {l, 1, n - 3}]
    AA[n_] := (F[n + 1])^2 - T[n - 1] - T[F[n - 1]] - 2*V[n] - 2 W[n]
    Table[AA[n], {n, 1, 50}]
    (End)
  • Python
    def A296516(n):
        P, Q = {(1,0)}, {(0,1)}
        for _ in range(n): P, Q = P|Q, set((p[0]+q[0],p[1]+q[1]) for p in P for q in Q)
        return len(Q) # Chai Wah Wu, Oct 18 2021

Formula

Conjectured:
a(n) = F(n+1)^2 - T(n-1) - T(F(n-1)) - 2*V(n) - 2*W(n) for n > 0, where
F(n) is the n-th Fibonacci number,
T(n) is the n-th triangular number,
V(n) = Sum_{i=1..n-4} F(i)*(Sum_{j=i+1..n-3} (n-2-j)*F(j)),
W(n) = Sum_{i=1..n-3} (n-2-i)*T(F(i)).
Or:
a(n) = F(n+1)^2 - T(n-1) - T(F(n-1)) - [n>=4]*U(n) where [] is the Iverson bracket, and U(n) = F(n-1)*F(n-3) + F(n+1)*(2*F(n-4)-1) + 5 - 8*(n mod 2).
Conjectures from Colin Barker, Mar 28 2018: (Start)
G.f.: 1 + x*(1 - 5*x + 9*x^2 - 5*x^3 - 2*x^4 + x^5) / ((1 - x)^3*(1 - 3*x + x^2)*(1 - x - x^2)).
a(n) = 7*a(n-1) - 18*a(n-2) + 20*a(n-3) - 6*a(n-4) - 6*a(n-5) + 5*a(n-6) - a(n-7) for n > 7.
(End)
From Luc Rousseau, Mar 30 2018: (Start)
Derived from the conjectured order-7 linear recurrence above, for n > 0,
a(n) = -(1/2)*n^2 + (1/2)*n - 1 + ((2+phi)/10)*(phi^2)^n + ((4-3*phi)/10)*(-phi^(-1))^n + ((1+3*phi)/10)*phi^n + ((3-phi)/10)*(phi^(-2))^n,
where phi denotes the golden ratio and lim_{n->oo} a(n+1)/a(n) = phi^2.
a(n) = (F(2*n+1) + F(n+2) - n^2 + n - 2) / 2.
(End)

Extensions

a(15)-a(19) from Andrey Zabolotskiy, May 30 2018
Previous Showing 11-14 of 14 results.