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

A000058 Sylvester's sequence: a(n+1) = a(n)^2 - a(n) + 1, with a(0) = 2.

Original entry on oeis.org

2, 3, 7, 43, 1807, 3263443, 10650056950807, 113423713055421844361000443, 12864938683278671740537145998360961546653259485195807
Offset: 0

Views

Author

Keywords

Comments

Also called Euclid numbers, because a(n) = a(0)*a(1)*...*a(n-1) + 1 for n>0, with a(0)=2. - Jonathan Sondow, Jan 26 2014
Another version of this sequence is given by A129871, which starts with 1, 2, 3, 7, 43, 1807, ... .
The greedy Egyptian representation of 1 is 1 = 1/2 + 1/3 + 1/7 + 1/43 + 1/1807 + ... .
Take a square. Divide it into 2 equal rectangles by drawing a horizontal line. Divide the upper rectangle into 2 squares. Now you can divide the lower one into another 2 squares, but instead of doing so draw a horizontal line below the first one so you obtain a (2+1 = 3) X 1 rectangle which can be divided in 3 squares. Now you have a 6 X 1 rectangle at the bottom. Instead of dividing it into 6 squares, draw another horizontal line so you obtain a (6+1 = 7) X 1 rectangle and a 42 X 1 rectangle left, etc. - Néstor Romeral Andrés, Oct 29 2001
More generally one may define f(1) = x_1, f(2) = x_2, ..., f(k) = x_k, f(n) = f(1)*...*f(n-1)+1 for n > k and natural numbers x_i (i = 1, ..., k) which satisfy gcd(x_i, x_j) = 1 for i <> j. By definition of the sequence we have that for each pair of numbers x, y from the sequence gcd(x, y) = 1. An interesting property of a(n) is that for n >= 2, 1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n-1) = (a(n)-2)/(a(n)-1). Thus we can also write a(n) = (1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n-1) - 2 )/( 1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n-1) - 1). - Frederick Magata (frederick.magata(AT)uni-muenster.de), May 10 2001; [corrected by Michel Marcus, Mar 27 2019]
A greedy sequence: a(n+1) is the smallest integer > a(n) such that 1/a(0) + 1/a(1) + 1/a(2) + ... + 1/a(n+1) doesn't exceed 1. The sequence gives infinitely many ways of writing 1 as the sum of Egyptian fractions: Cut the sequence anywhere and decrement the last element. 1 = 1/2 + 1/3 + 1/6 = 1/2 + 1/3 + 1/7 + 1/42 = 1/2 + 1/3 + 1/7 + 1/43 + 1/1806 = ... . - Ulrich Schimke, Nov 17 2002; [corrected by Michel Marcus, Mar 27 2019]
Consider the mapping f(a/b) = (a^3 + b)/(a + b^3). Starting with a = 1, b = 2 and carrying out this mapping repeatedly on each new (reduced) rational number gives 1/2, 1/3, 4/28 = 1/7, 8/344 = 1/43, ..., i.e., 1/2, 1/3, 1/7, 1/43, 1/1807, ... . Sequence contains the denominators. Also the sum of the series converges to 1. - Amarnath Murthy, Mar 22 2003
a(1) = 2, then the smallest number == 1 (mod all previous terms). a(2n+6) == 443 (mod 1000) and a(2n+7) == 807 (mod 1000). - Amarnath Murthy, Sep 24 2003
An infinite coprime sequence defined by recursion.
Apart from the initial 2, a subsequence of A002061. It follows that no term is a square.
It appears that a(k)^2 + 1 divides a(k+1)^2 + 1. - David W. Wilson, May 30 2004. This is true since a(k+1)^2 + 1 = (a(k)^2 - a(k) + 1)^2 +1 = (a(k)^2-2*a(k)+2)*(a(k)^2 + 1) (a(k+1)=a(k)^2-a(k)+1 by definition). - Pab Ter (pabrlos(AT)yahoo.com), May 31 2004
In general, for any m > 0 coprime to a(0), the sequence a(n+1) = a(n)^2 - m*a(n) + m is infinite coprime (Mohanty). This sequence has (m,a(0))=(1,2); (2,3) is A000215; (1,4) is A082732; (3,4) is A000289; (4,5) is A000324.
Any prime factor of a(n) has -3 as its quadratic residue (Granville, exercise 1.2.3c in Pollack).
Note that values need not be prime, the first composites being 1807 = 13 * 139 and 10650056950807 = 547 * 19569939581. - Jonathan Vos Post, Aug 03 2008
If one takes any subset of the sequence comprising the reciprocals of the first n terms, with the condition that the first term is negated, then this subset has the property that the sum of its elements equals the product of its elements. Thus -1/2 = -1/2, -1/2 + 1/3 = -1/2 * 1/3, -1/2 + 1/3 + 1/7 = -1/2 * 1/3 * 1/7, -1/2 + 1/3 + 1/7 + 1/43 = -1/2 * 1/3 * 1/7 * 1/43, and so on. - Nick McClendon, May 14 2009
(a(n) + a(n+1)) divides a(n)*a(n+1)-1 because a(n)*a(n+1) - 1 = a(n)*(a(n)^2 - a(n) + 1) - 1 = a(n)^3 - a(n)^2 + a(n) - 1 = (a(n)^2 + 1)*(a(n) - 1) = (a(n) + a(n)^2 - a(n) + 1)*(a(n) - 1) = (a(n) + a(n+1))*(a(n) - 1). - Mohamed Bouhamida, Aug 29 2009
This sequence is also related to the short side (or hypotenuse) of adjacent right triangles, (3, 4, 5), (5, 12, 13), (13, 84, 85), ... by A053630(n) = 2*a(n) - 1. - Yuksel Yildirim, Jan 01 2013, edited by M. F. Hasler, May 19 2017
For n >= 4, a(n) mod 3000 alternates between 1807 and 2443. - Robert Israel, Jan 18 2015
The set of prime factors of a(n)'s is thin in the set of primes. Indeed, Odoni showed that the number of primes below x dividing some a(n) is O(x/(log x log log log x)). - Tomohiro Yamada, Jun 25 2018
Sylvester numbers when reduced modulo 864 form the 24-term arithmetic progression 7, 43, 79, 115, 151, 187, 223, 259, 295, 331, ..., 763, 799, 835 which repeats itself until infinity. This was first noticed in March 2018 and follows from the work of Sondow and MacMillan (2017) regarding primary pseudoperfect numbers which similarly form an arithmetic progression when reduced modulo 288. Giuga numbers also form a sequence resembling an arithmetic progression when reduced modulo 288. - Mehran Derakhshandeh, Apr 26 2019
Named after the English mathematician James Joseph Sylvester (1814-1897). - Amiram Eldar, Mar 09 2024
Guy askes if it is an irrationality sequence (see Guy, 1981). - Stefano Spezia, Oct 13 2024

Examples

			a(0)=2, a(1) = 2+1 = 3, a(2) = 2*3 + 1 = 7, a(3) = 2*3*7 + 1 = 43.
		

References

  • Graham Everest, Alf van der Poorten, Igor Shparlinski and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 6.7.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994.
  • Richard K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E24.
  • Richard K. Guy and Richard Nowakowski, Discovering primes with Euclid. Delta, Vol. 5 (1975), pp. 49-63.
  • Amarnath Murthy, Smarandache Reciprocal partition of unity sets and sequences, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring 2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.1.
  • 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

Cf. A005267, A000945, A000946, A005265, A005266, A075442, A007018, A014117, A054377, A002061, A118227, A126263, A007996 (primes dividing some term), A323605 (smallest prime divisors), A091335 (number of prime divisors), A129871 (a variant starting with 1).

Programs

  • Haskell
    a000058 0 = 2
    a000058 n = a000058 m ^ 2 - a000058 m + 1 where m = n - 1
    -- James Spahlinger, Oct 09 2012
    
  • Haskell
    a000058_list = iterate a002061 2  -- Reinhard Zumkeller, Dec 18 2013
    
  • Julia
    a(n) = n == 0 ? BigInt(2) : a(n - 1)*(a(n - 1) - 1) + 1
    [a(n) for n in 0:8] |> println # Peter Luschny, Dec 15 2020
  • Maple
    A[0]:= 2:
    for n from 1 to 12 do
    A[n]:= A[n-1]^2 - A[n-1]+1
    od:
    seq(A[i],i=0..12); # Robert Israel, Jan 18 2015
  • Mathematica
    a[0] = 2; a[n_] := a[n - 1]^2 - a[n - 1] + 1; Table[ a[ n ], {n, 0, 9} ]
    NestList[#^2-#+1&,2,10] (* Harvey P. Dale, May 05 2013 *)
    RecurrenceTable[{a[n + 1] == a[n]^2 - a[n] + 1, a[0] == 2}, a, {n, 0, 10}] (* Emanuele Munarini, Mar 30 2017 *)
  • Maxima
    a(n) := if n = 0 then 2 else a(n-1)^2-a(n-1)+1 $
    makelist(a(n),n,0,8); /* Emanuele Munarini, Mar 23 2017 */
    
  • PARI
    a(n)=if(n<1,2*(n>=0),1+a(n-1)*(a(n-1)-1))
    
  • PARI
    A000058(n,p=2)={for(k=1,n,p=(p-1)*p+1);p} \\ give Mod(2,m) as 2nd arg to calculate a(n) mod m. - M. F. Hasler, Apr 25 2014
    
  • PARI
    a=vector(20); a[1]=3; for(n=2, #a, a[n]=a[n-1]^2-a[n-1]+1); concat(2, a) \\ Altug Alkan, Apr 04 2018
    
  • Python
    A000058 = [2]
    for n in range(1, 10):
        A000058.append(A000058[n-1]*(A000058[n-1]-1)+1)
    # Chai Wah Wu, Aug 20 2014
    

Formula

a(n) = 1 + a(0)*a(1)*...*a(n-1).
a(n) = a(n-1)*(a(n-1)-1) + 1; Sum_{i>=0} 1/a(i) = 1. - Néstor Romeral Andrés, Oct 29 2001
Vardi showed that a(n) = floor(c^(2^(n+1)) + 1/2) where c = A076393 = 1.2640847353053011130795995... - Benoit Cloitre, Nov 06 2002 (But see the Aho-Sloane paper!)
a(n) = A007018(n+1)+1 = A007018(n+1)/A007018(n) [A007018 is a(n) = a(n-1)^2 + a(n-1), a(0)=1]. - Gerald McGarvey, Oct 11 2004
a(n) = sqrt(A174864(n+1)/A174864(n)). - Giovanni Teofilatto, Apr 02 2010
a(n) = A014117(n+1)+1 for n = 0,1,2,3,4; a(n) = A054377(n)+1 for n = 1,2,3,4. - Jonathan Sondow, Dec 07 2013
a(n) = f(1/(1-(1/a(0) + 1/a(1) + ... + 1/a(n-1)))) where f(x) is the smallest integer > x (see greedy algorithm above). - Robert FERREOL, Feb 22 2019
From Amiram Eldar, Oct 29 2020: (Start)
Sum_{n>=0} (-1)^n/(a(n)-1) = A118227.
Sum_{n>=0} (-1)^n/a(n) = 2 * A118227 - 1. (End)

A000289 A nonlinear recurrence: a(n) = a(n-1)^2 - 3*a(n-1) + 3 (for n>1).

Original entry on oeis.org

1, 4, 7, 31, 871, 756031, 571580604871, 326704387862983487112031, 106735757048926752040856495274871386126283608871, 11392521832807516835658052968328096177131218666695418950023483907701862019030266123104859068031
Offset: 0

Views

Author

Keywords

Comments

An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
This is the special case k=3 of sequences with exact mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))=k, i=1,...,n-1}. k=1 gives Sylvester's sequence A000058 and k=2 Fermat sequence A000215. - Seppo Mustonen, Sep 04 2005

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

Cf. A000058.

Programs

  • Mathematica
    Join[{1}, RecurrenceTable[{a[n] == a[n-1]^2 - 3*a[n-1] + 3, a[1] == 4}, a, {n, 1, 9}]] (* Jean-François Alcover, Feb 06 2016 *)
  • PARI
    a(n)=if(n<2,max(0,1+3*n),a(n-1)^2-3*a(n-1)+3)

Formula

a(n) = A005267(n) + 2 (for n>0).
a(n) = ceiling(c^(2^n)) + 1 where c = A077141. - Benoit Cloitre, Nov 29 2002
For n>0, a(n) = 3 + Product_{i=0..n-1} a(i). - Vladimir Shevelev, Dec 08 2010

A117805 Start with 3. Square the previous term and subtract it.

Original entry on oeis.org

3, 6, 30, 870, 756030, 571580604870, 326704387862983487112030, 106735757048926752040856495274871386126283608870, 11392521832807516835658052968328096177131218666695418950023483907701862019030266123104859068030
Offset: 0

Views

Author

Jacob Vecht, Apr 29 2006

Keywords

Comments

The next term is too large to include.
a(n) = A005267(n+1)+1. - R. J. Mathar, Apr 22 2007. This is true by induction. - M. F. Hasler, May 04 2007<
For any a(0) > 2, the sequence a(n) = a(n-1) * (a(n-1) - 1) gives a constructive proof that there exists integers with at least n + 1 distinct prime factors, e.g., a(n). As a corollary, this gives a constructive proof of Euclid's theorem stating that there are an infinity of primes. - Daniel Forgues, Mar 03 2017

Examples

			Start with 3; 3^2 - 3 = 6; 6^2 - 6 = 30; etc.
		

Crossrefs

Cf. A007018.

Programs

  • Maple
    f:=proc(n) option remember; if n=0 then RETURN(3); else RETURN(f(n-1)^2-f(n-1)); fi; end;
  • Mathematica
    k=3;lst={k};Do[k=k^2-k;AppendTo[lst,k],{n,9}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 19 2010 *)
    RecurrenceTable[{a[0]==3, a[n]==a[n-1]*(a[n-1] - 1)}, a, {n, 0, 10}] (* Vaclav Kotesovec, Dec 17 2014 *)
    NestList[#^2-#&,3,10] (* Harvey P. Dale, Oct 11 2023 *)

Formula

a(0) = 3, a(n) = (a(n-1))^2 - a(n-1).
a(n) ~ c^(2^n), where c = 2.330283023986140936420341573975137247354077600883596774023675490739568138... . - Vaclav Kotesovec, Dec 17 2014

A126604 a(1) = 4; a(2) = 3; for n > 2, a(n) = a(n-1)^2 + a(n-1) - 1.

Original entry on oeis.org

4, 3, 11, 131, 17291, 298995971, 89398590973228811, 7992108067998667938125889533702531, 63873791370569400659097694858350356285036046451665934814399129508491
Offset: 1

Views

Author

Tomas Xordan, Jan 06 2007

Keywords

Comments

a(n) = -1 + Product_{k=1..n-1} a(k) for n > 1.
Sequence is a variant of A005267 (start values 3 and 2, offset 0). Both sequences have the same recursion formulas and both are infinite coprime sequences; a(n) has digital root 2 for odd n and 5 for even n, n > 2.
a(2) to a(6) are prime, a(1) and a(7) to a(10) are composite, a(2) to a(10) are squarefree.

Examples

			a(3) = 3^2 + 3 - 1 = 11, a(4) = 11^2 + 11 - 1 = 131.
		

Crossrefs

Cf. A005267.

Programs

  • Maple
    a[1]:=1: a[2]:=3: for n from 3 to 10 do a[n]:=a[n-1]^2+a[n-1]-1 od: seq(a[n],n=1..10); # Emeric Deutsch, Jan 09 2007
  • Mathematica
    Join[{4},NestList[#^2+#-1&,3,10]] (* Harvey P. Dale, Jul 24 2012 *)
  • PARI
    1. {print1(4,",",a=3,",");for(n=1,8,print1(a=a^2+a-1,","))}
    2. {m=10;v=vector(m);print1(v[1]=4,",");for(n=2,m,print1(v[n]=-1+prod(k=1,n-1,v[k]),","))} \\ Klaus Brockhaus, Jan 09 2007

Extensions

Edited and extended by Klaus Brockhaus and Emeric Deutsch, Jan 09 2007

A105183 a(n) = 1 + a(n-1)*(a(n-1) + 1), with a(0)=2.

Original entry on oeis.org

2, 7, 57, 3307, 10939557, 119673918295807, 14321846720271609085072077057, 205115293478954645768397227034180943592279329877217858307, 42072283618957694230389567430137958296609066493047345973782287300661413651741392431587718724877522268597146764557
Offset: 0

Views

Author

Lekraj Beedassy, Apr 11 2005

Keywords

Comments

For n > 1, a(n) has digital root 3 or 4 depending on whether n is odd or even.
The 5-adic valuation of a(n)^2 + 1 is n+1. - William Hu, Dec 01 2023

References

  • T. Koshy, "Intriguing Properties Of Three Related Number Sequences", in Journal of Recreational Mathematics, vol. 32(3) 210-3 2003-4 Baywood NY.

Crossrefs

Cf. A005267.

Programs

  • Maple
    a[0]:=2: for n from 1 to 8 do a[n]:=1+a[n-1]*(a[n-1]+1) od: seq(a[n],n=0..8); # Emeric Deutsch, Jun 13 2005
  • Mathematica
    NestList[1+#(#+1)&,2,10] (* Harvey P. Dale, Mar 30 2016 *)

Formula

From Gerald McGarvey, Dec 12 2007: (Start)
For n > 0, a(n) = Sum_{k=0..n-1} a(k)^2 + n + 2.
Conjecture: a(n) is asymptotic to d - 1/2 -(5/2^3)/d -(65/2^7)/d^3 -(650/2^11)/d^5 -(19045/2^15)/d^7 -(274950/2^19)/d^9 -(6979050/2^23)/d^11 -(130292500/2^27)/d^13 ... where d = c^(2^n) and c is a constant = 1.288203192684485177845610784851700404829443712770079185959554466777577486352420255603915828361833141546.... (End)

Extensions

More terms from Emeric Deutsch, Jun 13 2005

A110389 Integers with mutual residues -1.

Original entry on oeis.org

2, 3, 5, 29, 869, 756029, 571580604869, 326704387862983487112029, 106735757048926752040856495274871386126283608869, 11392521832807516835658052968328096177131218666695418950023483907701862019030266123104859068029
Offset: 1

Views

Author

Seppo Mustonen, Sep 11 2005

Keywords

Comments

This is the special case k=1 of sequences with mutual residues -k. In general, a(1)=k+1 and a(n) = min{m | m>a(n-1), mod(m,a(i))=-k, i=1,...,n-1}.
An infinite coprime sequence.
Same as A005267 but with the first two terms in reverse order.

Crossrefs

Cf. A000289.

Programs

  • Maple
    a:=proc(k,n::nonnegint) option remember; if n<3 then RETURN(n*k+1); fi; if n=3 then RETURN(a(k,1)*a(k,2)-k); fi; a(k,n-1)*(a(k,n-1)+k)-k; end; seq(a(1,n),n=1..10);
  • Mathematica
    Join[{2,3},NestList[#^2+#-1&,5,10]] (* Harvey P. Dale, Jul 13 2015 *)

Formula

a(1)=2, a(2)=3, a(n) = -1 + a(1)*a(2)*...*a(n-1);
a(n) = a(n-1)^2 + a(n-1) - 1, n > 3.

Extensions

One more term (a(10)) from Harvey P. Dale, Jul 13 2015

A140432 a(1)=1, a(2)=2, a(3)=3, a(4)=4, a(5)=5, a(n+1)=a(1)*a(2)*...*a(n)-1 for n>=5.

Original entry on oeis.org

1, 2, 3, 4, 5, 119, 14279, 203904119, 41576889949070279, 1728637777837101228675346430208119, 2988188566965591343823377482689473316222062058836342422720083726279
Offset: 1

Views

Author

Max Alekseyev, Jun 19 2008

Keywords

Comments

a(1)^2 + a(2)^2 + ... + a(70)^2 = a(1)*a(2)*...*a(70)

Crossrefs

Cf. A005267.

Programs

  • Mathematica
    nxt[{t_,a_}]:={t(t-1),t-1}; Join[{1,2,3,4},NestList[nxt,{120,5},10][[All,2]]] (* Harvey P. Dale, Jul 08 2022 *)

Formula

For n>=6, a(n) = a(1)^2 + a(2)^2 + ... + a(n-1)^2 - n + 70.
Showing 1-7 of 7 results.