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 41-50 of 139 results. Next

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

A002967 Egyptian fractions: number of solutions of 1 = 1/x_1 + ... + 1/x_n in positive integers.

Original entry on oeis.org

1, 1, 10, 215, 12231, 2025462, 1351857641, 6255560531733
Offset: 1

Views

Author

Keywords

Comments

Solutions differing only in the order of the x_i are counted as distinct.
All denominators in the expansion 1 = 1/x_1 + ... + 1/x_n are bounded by A000058(n-1) = A129871(n). - Max Alekseyev, Dec 30 2003

Examples

			For n=3 the 10 solutions are {2,3,6} (6 ways), {2,4,4} (3 ways), {3,3,3} (1 way).
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, D11.
  • D. Singmaster, "The number of representations of one as a sum of unit fractions," unpublished manuscript, 1972.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

a(7) from Jud McCranie
a(8) from John Dethridge, Jan 11 2004

A039941 Alternately add and multiply.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 4, 8, 12, 96, 108, 10368, 10476, 108615168, 108625644, 11798392572168192, 11798392680793836, 139202068568601556987554268864512, 139202068568601568785946949658348, 19377215893777651167043206536157390321290709180447278572301746176
Offset: 0

Views

Author

Keywords

Crossrefs

A001696(n)=A039941(2*n), A001697(n)=A039941(2*n+1).

Programs

  • Haskell
    a039941 n = a039941_list !! (n-1)
    a039941_list = 0 : 1 : zipWith3 ($)
       (cycle [(+),(*)]) a039941_list (tail a039941_list)
    -- Reinhard Zumkeller, May 07 2012
  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,If[EvenQ[n],a+b,a*b]}; Join[{0},Transpose[ NestList[ nxt,{0,0,1},20]][[3]]] (* Harvey P. Dale, Aug 23 2013 *)
  • PARI
    a(n)=if(n<2,n>0, if(n%2,a(n-1)*a(n-2),a(n-1)+a(n-2)))
    

Formula

a(2n) = a(2n-1) + a(2n-2); a(2n+1) = a(2n-1)*a(2n); a(0) = 0; a(1) = 1
a(n) = {a(n-1) + a(n-2), n even, a(n-1)*a(n-2), n odd}; a(0)=0; a(1)=1.

Extensions

Additional comments from Michael Somos, May 19 2000
One more term from Harvey P. Dale, Aug 23 2013

A100441 a(n) is the denominator of f(n) where f(1) = 2 and f(n+1) is the solution of x + Sum_{i=1..n} f(i) = x * Product_{i=1..n} f(i).

Original entry on oeis.org

1, 1, 3, 13, 217, 57073, 3811958497, 16605534578235736513, 309708098978072051970763989442580255617, 106322990835084829467725909226560893968664147958670035553130958199430801942273
Offset: 1

Views

Author

Gilbert Boily (sgbl(AT)escape.ca), Nov 21 2004, Sep 03 2007

Keywords

Comments

Let E(0) = x + 1, let E(n+1) = 1 - E(n) + E(n)^2. Let e(n) = discrim(E(n),x) and let f(n) = e(n+1)/e(n)^2. Then f(1,2,3,...) = -3,13,217,57073,381195849,... which looks like this sequence (I do not have a proof yet). - Daniel R. L. Brown (dbrown(AT)certicom.com), Nov 18 2005
This sequence gives the next number in a sequence where the sum and the product of the terms of the sequence are equal.
It happens that the sum or product of the terms of this sequence match A001146 for the numerator of the sum or product and A076628 for the denominator of the sum or product of the sequence.
Let g(x) = x^2 - x + 1 be the map producing Sylvester's sequence A000058. Then for n >= 0, g^n(1/2) = 1/f(n+2), where g^n is the n-th iterate of g, so a(n+2) is the numerator of g^n(1/2). - Curtis Bechtel, Apr 05 2024

Examples

			2, 2, 4/3, 16/13, 256/217, 65536/57073, 4294967296/3811958497, 18446744073709551616/16605534578235736513, ... = A001146/A100441 (essentially).
		

Crossrefs

Programs

  • Magma
    I:=[1,3]; [1] cat  [n le 2 select I[n] else 2^(2^(n-1))-2^(2^(n-2))*Self(n-1)+Self(n-1)^2: n in [1..10]]; // Vincenzo Librandi, Jun 13 2015
    
  • Maple
    f:=proc(n) option remember; local i,k,k1,k2; if n = 1 then return(2); fi; k:=mul(f(i),i=1..n-1); k1:=numer(k); k2:=denom(k); k1/(k1-k2); end;
    f:=n-> if n=1 or n=2 then 2 else f(n-1)^2/(f(n-1)^2-f(n-1)+1) fi; # Robert FERREOL, Jun 12 2015
  • Mathematica
    f[n_] := f[n] = (frac = Product[f[i], {i, 1, n-1}]; p = Numerator[frac]; q = Denominator[frac]; p/(p-q)); f[1] = 2; (* or, after Robert FERREOL *) f[n_] := f[n] = If[n == 1 || n == 2, 2, f[n-1]^2/(f[n-1]^2-f[n-1]+1)]; Table[f[n], {n, 1, 10}] // Denominator (* Jean-François Alcover, Sep 19 2012, updated Jun 15 2015 *)
  • PARI
    {a(n) = my(s, t); if( n<3, n>0, t = a(n-1); s = 2^(2^(n-3)); s*s -s*t +t*t)}; /* Michael Somos, Aug 05 2017 */
    
  • SageMath
    @CachedFunction
    def a(n): # a = A100441
        if (n<3): return 2*n-1
        else: return 2^(2^(n-1)) - 2^(2^(n-2))*a(n-1) + a(n-1)^2
    [1]+[a(n) for n in range(1,12)] # G. C. Greubel, Apr 08 2023

Formula

Let F(n) = Product_{i=1..n} f(i) = p/q (say). Then f(n+1) = p/(p-q).
From Robert FERREOL, Jun 12 2015: (Start)
Recurrence: f(1) = f(2) = 2; f(n+1) = f(n)^2/(f(n)^2 - f(n) + 1).
Since f(n) = 2^(2^(n-2))/a(n) for n >= 2, the recurrence for a(n) is:
a(1) = a(2) = 1; a(n+1) = 2^(2^(n-1)) - 2^(2^(n-2))*a(n) + a(n)^2.
(End)

Extensions

Name edited by Michael Somos, Aug 05 2017

A144786 If n is an oblong number A002378, then a(n)=a(j) where j is the number of oblong numbers in (0,n], otherwise a(n)=n.

Original entry on oeis.org

1, 1, 3, 4, 5, 1, 7, 8, 9, 10, 11, 3, 13, 14, 15, 16, 17, 18, 19, 4, 21, 22, 23, 24, 25, 26, 27, 28, 29, 5, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 1, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 7, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 8, 73, 74, 75, 76
Offset: 1

Views

Author

Artur Jasinski, Sep 22 2008, Sep 26 2008

Keywords

Comments

As a motivation, consider the greedy decomposition of fractions 1/n into Egyptian fractions,
n=1: 2,3,7,43,1807,3263443,.. A000058
n=2: 3,7,43,1807,3263443,10650056950807,.. A000058
n=3: 4,13,157,24493,599882557,359859081592975693,.. A082732
n=4: 5,21,421,176821,31265489221,977530816197201697621,.. A144779
n=5: 6,31,931,865831,749662454731,561993796032558961827631,.. A144780
n=6: 7,43,1807,3263443,10650056950807,.. A000058
n=7: 8,57,3193,10192057,103878015699193,.. A144781
n=8: 9,73,5257,27630793,763460694178057,.. A144782
n=9: 10,91,8191,67084291,4500302031888391,.. A144783
n=10: 11,111,12211,149096311,22229709804712411,.. A144784
n=11: 12,133,17557,308230693,95006159799029557,.. A144785
n=12: 13,157,24493,599882557,.. A082732
k=13: 14,183,33307,1109322943,..
where the first few denominators of 1/n = 1/b(1)+1/b(2)+... have been tabulated.
For some sets of n, the list b(i) of denominators is essentially the same: consider for example A000058, which represents primarily n=1, then in truncated form also n=2, and then n=6, n=42 etc. Or consider A082732 which represents n=3, then in truncated form n=12, n=156 etc.
The OEIS sequence assigns the primary n to a(n). The interpretation of a(n) with ascending n is: n=1 is primary, a(1)=1.
Decomposition of n=2 is equivalent to n=1, a(2)=1. Cases n=3 to 5 are primary ("original", "new"), and a(n)=n in these cases. n=6 is not new but essentially the same Egyptian series as seen for n=1, so a(6)=1. Cases n=7 to n=11 are "new" sequences, again a(n)=n in these cases, but then n=12 is represented by A082732 as already seen for n=3, so a(12)=3.
Because the first denominator for the decomposition of 1/n is 1/(n+1), n+1 belongs to the sequence of denominators of the expansion of 1/a(n).
The sequences b(.) have recurrences which are essentially 1+b(n-1)*(b(n-1)-1), looking up the oblong number at the position of the previous b(.). This is the reason why reverse look-up of the n via A000194 (number of oblong numbers up to n) as used in the definition is equivalent to the assignment described above.

Examples

			n=1 is not in A002378, so a(1)=1.
n=2 = A000058(2), so a(2)=1 because there is 1 oblong number <=2 and >0.
n=3 is not in A002378, so a(3)=3.
n=6 = A000058(3), so a(6)=a(2) because there are 2 oblong numbers <=6 and >0.
		

Crossrefs

Formula

a(n) = a(A000194(n+1)) if n in A002378. a(n) = n if n in A078358.

Extensions

a(57)=57 inserted, a(61)=61 corrected and better definition provided by Omar E. Pol, Dec 29 2008
I did some further editing of this entry, but many of the lines are still obscure. - N. J. A. Sloane, Dec 29 2008
Comments that connect to Egyptian fractions rephrased by R. J. Mathar, Oct 01 2009

A144788 a(n+1) = a(n)^3 - a(n) + 1 with a(1) = 3.

Original entry on oeis.org

3, 25, 15601, 3797146111201, 54748462363349863789331489199516542401, 164102719777453765093060237305105241279744702931788833463132240094953276902575203916973404664183940277497050364801
Offset: 1

Views

Author

Artur Jasinski, Sep 22 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; k = 3; Do[AppendTo[a, k]; k = k^3 - k + 1, {n, 1, 8}]; a (* Artur Jasinski *)
    NestList[#^3-#+1&,3,5] (* Harvey P. Dale, Jan 09 2014 *)

Formula

a(n) = round(c^(3^n)), where c = 1.4298877386... is given in A144811.

A000324 A nonlinear recurrence: a(0) = 1, a(1) = 5, a(n) = a(n-1)^2 - 4*a(n-1) + 4 for n>1.

Original entry on oeis.org

1, 5, 9, 49, 2209, 4870849, 23725150497409, 562882766124611619513723649, 316837008400094222150776738483768236006420971486980609
Offset: 0

Views

Author

Keywords

Comments

An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
This is the special case k=4 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
A000058, A000215, A000289 and this sequence here can be represented as values of polynomials defined via P_0(z)= 1+z, P_{n+1}(z) = z+ prod_{i=0..n} P_i(z), with recurrences P_{n+1}(z) = (P_n(z))^2 -z*P_n(z) +z, n>=0. - Vladimir Shevelev, Dec 08 2010

References

  • Derek Jennings, Some reciprocal summation identities with applications to the Fibonacci and Lucas numbers, in: G. E. Bergum, Applications of Fibonacci Numbers, Vol. 7, Bergum G. E. et al. (eds.), Kluwer Academic Publishers, 1998, pp. 197-200.
  • 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

a(n) = A001566(n-1)+2 (for n>0).

Programs

  • Mathematica
    t = {1, 5}; Do[AppendTo[t, t[[-1]]^2 - 4*t[[-1]] + 4], {n, 11}] (* T. D. Noe, Jun 19 2012 *)
    Join[{1}, RecurrenceTable[{a[n] == a[n-1]^2 - 4*a[n-1] + 4, a[1] == 5}, a, {n, 1, 8}]] (* Jean-François Alcover, Feb 07 2016 *)
    Join[{1},NestList[#^2-4#+4&,5,10]] (* Harvey P. Dale, Dec 11 2023 *)
  • PARI
    a(n)=if(n<2,max(0,1+4*n),a(n-1)^2-4*a(n-1)+4)
    
  • PARI
    a(n)=if(n<1,n==0,n=2^n;fibonacci(n+1)+fibonacci(n-1)+2)

Formula

a(n) = L(2^n)+2, if n>0 where L() is Lucas sequence.
For n>=1, a(n) = 4 + Product_{i=0..n-1} a(i). - Vladimir Shevelev, Dec 08 2010
From Amiram Eldar, Sep 10 2022: (Start)
a(n) = Lucas(2^(n-1))^2 for n > 1.
Sum_{n>=1} 4^n/a(n) = 4 (Jennings, 1998; Duverney, 2001). (End)
Product_{n>=1} (1 - 3/a(n)) = 1/4 (Duverney and Kurosawa, 2022). - Amiram Eldar, Jan 07 2023

A010705 Period 2: repeat (3,7).

Original entry on oeis.org

3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3
Offset: 0

Views

Author

Keywords

Comments

Continued fraction expansion of (21 + 5*sqrt(21))/14 (decimal expansion is given by A176106). - R. J. Mathar, Mar 08 2012
If an initial 2 is prepended to this sequence, it is Sylvester's sequence (A000058) modulo 10. - Alonso del Arte, Mar 25 2015
Also, smallest prime factor of 8^n-1 for n >= 1. - Sean A. Irvine, Oct 15 2023

Programs

Formula

G.f.: (3+7x)/((1-x)(1+x)). - R. J. Mathar, Nov 21 2011

A118227 Decimal expansion of Cahen's constant.

Original entry on oeis.org

6, 4, 3, 4, 1, 0, 5, 4, 6, 2, 8, 8, 3, 3, 8, 0, 2, 6, 1, 8, 2, 2, 5, 4, 3, 0, 7, 7, 5, 7, 5, 6, 4, 7, 6, 3, 2, 8, 6, 5, 8, 7, 8, 6, 0, 2, 6, 8, 2, 3, 9, 5, 0, 5, 9, 8, 7, 0, 3, 0, 9, 2, 0, 3, 0, 7, 4, 9, 2, 7, 7, 6, 4, 6, 1, 8, 3, 2, 6, 1, 0, 8, 4, 8, 4, 4, 0, 8, 9, 5, 5, 5, 0, 4, 6, 3, 4, 3, 1, 9, 5, 4, 0, 5, 3
Offset: 0

Views

Author

Eric W. Weisstein, Apr 16 2006

Keywords

Comments

Cahen proved that his constant is irrational. Davison and Shallit proved that it is transcendental and computed its simple continued fraction expansion A006280. - Jonathan Sondow, Aug 17 2014
Named after the French mathematician Eugène Cahen (1865 - 1941). - Amiram Eldar, Oct 29 2020

Examples

			0.6434105462883380261...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 6.7, p. 436.

Crossrefs

Programs

  • Mathematica
    a[0] = 2; a[n_] := a[n] = a[n-1]^2 - a[n-1]+1; kmax = 1; FixedPoint[ RealDigits[ Sum[(-1)^k/(a[k]-1), {k, 0, kmax += 10}], 10, 105][[1]]&, kmax] (* Jean-François Alcover, Jul 28 2011, updated Jun 19 2014 *)
    Most@First@RealDigits@N[x=1; 1+Sum[x=x(1+x); (-1)^k/x, {k, 1, 9}], 106] (* Oliver Seipel, Aug 25 2024, after Charles R Greathouse IV *)
    Most@First@RealDigits@N[x=1; 1/2+Sum[x=x(1+x)(1+x+x^2); 1/(x+1), {k, 1, 4}], 106] (* Oliver Seipel, Aug 25 2024 *)
  • PARI
    C=1;1+suminf(k=1,C+=C^2; (-1)^k/C) \\ Charles R Greathouse IV, Jul 14 2020

Formula

Equals Sum_{k >= 0} (-1)^k/(A000058(k)-1).
Equals Sum_{n>=0} 1/A000058(2*n) = 1 - Sum_{n>=0} 1/A000058(2*n+1). - Amiram Eldar, Oct 29 2020
Equals 1 + (1/2) * Sum_{n>=0} (-1)^(n+1)/A129871(n). - Bernard Schott, Apr 06 2021

A144787 Recurrence sequence a(n+1)=a(n)^3-a(n)+1 and a(1)=2.

Original entry on oeis.org

2, 7, 337, 38272417, 56060590716839257663297, 176186654453940966415101758343368831005891099500239113100063334235777
Offset: 1

Views

Author

Artur Jasinski, Sep 22 2008

Keywords

Comments

For constant c=1.240554576397679299452... see A144810.

Crossrefs

Programs

  • Mathematica
    a = {}; k = 2; Do[AppendTo[a, k]; k = k^3 - k + 1, {n, 1, 8}]; a (*Artur Jasinski*)
    NestList[#^3-#+1&,2,5] (* Harvey P. Dale, Jun 24 2013 *)
Previous Showing 41-50 of 139 results. Next