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

A002716 An infinite coprime sequence defined by recursion.

Original entry on oeis.org

3, 5, 13, 17, 241, 257, 65281, 65537, 4294901761, 4294967297, 18446744069414584321, 18446744073709551617, 340282366920938463444927863358058659841
Offset: 0

Views

Author

Keywords

Comments

Every term is relatively prime to all others. - Michael Somos, Feb 01 2004

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

Programs

  • Mathematica
    a[0] = 3; a[1] = 5;
    a[n_] := a[n] = If[OddQ[n], a[n-1] + a[n-2] - 1, a[n-1]^2 - 3*a[n-1] + 3];
    Table[a[n], {n, 0, 12}] (* Jean-François Alcover, Aug 16 2018, after Michel Somos *)
  • PARI
    {a(n) = if( n<2, 3 * (n>=0) + 2 * (n>0), if( n%2, a(n-1) + a(n-2) - 1, a(n-1)^2 - 3 * a(n-1) + 3))} /* Michael Somos, Feb 01 2004 */

Formula

a(2*n + 1) = a(2*n) + a(2*n - 1) - 1, a(2*n) = a(2*n - 1)^2 - 3 * a(2*n - 1) + 3, a(0) = 3, a(1) = 5. - Michael Somos, Feb 01 2004
Conjecture: a(2n+1)=A001146(n+1)+1. - R. J. Mathar, May 15 2007
a(2*n) = A220294(n). a(2*n + 1) = A000215(n+1). - Michael Somos, Dec 10 2012

Extensions

More terms from Jeffrey Shallit
Edited by Michael Somos, Feb 01 2004

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

A001510 a(n) = 2*a(n-1)*(a(n-1)-1) for n > 1, with a(0) = 1, a(1) = 2.

Original entry on oeis.org

1, 2, 4, 24, 1104, 2435424, 11862575248704, 281441383062305809756861824, 158418504200047111075388369241884118003210485743490304
Offset: 0

Views

Author

Keywords

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

Programs

  • Mathematica
    (* a5 = A002715 *) a5[n_?OddQ] := a5[n] = 2*a5[n-1] + 1; a5[n_?EvenQ] := a5[n] = (a5[n-1]^2 - 3)/2; a5[0] = 3; a[n_] := a5[2*n - 4] + 1; a[0] = 1; a[1] = 2; Table[a[n], {n, 0, 8}] (* Jean-François Alcover, Jan 25 2013, after R. J. Mathar *)
    Join[{1}, RecurrenceTable[{a[1] == 2, a[n] == 2*a[n - 1]*(a[n - 1] - 1)}, a, {n, 1, 8}]] (* Amiram Eldar, Feb 02 2022 *)

Formula

a(n+2) = A002715(2*n) + 1. - R. J. Mathar, Apr 23 2007
a(n) = floor(1 + phi^(2^n)/2), where phi is the golden ratio (A001622) [Aho and Sloane, 1973]. - Amiram Eldar, Feb 02 2022

Extensions

Clarified definition, with thanks to Amiram Eldar, Feb 02 2022. - N. J. A. Sloane, Jan 09 2025
Showing 1-4 of 4 results.