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 51-60 of 139 results. Next

A177888 P_n(k) with P_0(z) = z+1 and P_n(z) = z + P_(n-1)(z)*(P_(n-1)(z)-z) for n>1; square array P_n(k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 5, 7, 1, 5, 7, 17, 43, 1, 6, 9, 31, 257, 1807, 1, 7, 11, 49, 871, 65537, 3263443, 1, 8, 13, 71, 2209, 756031, 4294967297, 10650056950807, 1, 9, 15, 97, 4691, 4870849, 571580604871, 18446744073709551617, 113423713055421844361000443, 1
Offset: 0

Views

Author

Alois P. Heinz, Dec 14 2010

Keywords

Examples

			Square array P_n(k) begins:
  1,              2,          3,      4,       5,    6,    7,     8, ...
  1,              3,          5,      7,       9,   11,   13,    15, ...
  1,              7,         17,     31,      49,   71,   97,   127, ...
  1,             43,        257,    871,    2209, 4691, 8833, 15247, ...
  1,           1807,      65537, 756031, 4870849,  ...
  1,        3263443, 4294967297,    ...
  1, 10650056950807,        ...
		

Crossrefs

Columns k=0-10 give: A000012, A000058(n+1), A000215, A000289(n+1), A000324(n+1), A001543(n+1), A001544(n+1), A067686, A110360(n+1), A110368(n+1), A110383(n+1).
Rows n=0-2 give: A000027(k+1), A005408, A056220(k+1).
Main diagonal gives A252730.
Coefficients of P_n(z) give: A177701.

Programs

  • Maple
    p:= proc(n) option remember;
          z-> z+ `if`(n=0, 1, p(n-1)(z)*(p(n-1)(z)-z))
        end:
    seq(seq(p(n)(d-n), n=0..d), d=0..8);
  • Mathematica
    p[n_] := p[n] = Function[z, z + If [n == 0, 1, p[n-1][z]*(p[n-1][z]-z)] ]; Table [Table[p[n][d-n], {n, 0, d}], {d, 0, 8}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *)

A003096 a(n) = a(n-1)^2 - 1, a(0) = 2.

Original entry on oeis.org

2, 3, 8, 63, 3968, 15745023, 247905749270528, 61457260521381894004129398783, 3776994870793005510047522464634252677140721938309041881088
Offset: 0

Views

Author

Keywords

Comments

After a(0) = 2 and a(1) = 3, this can never be prime, since a(n) = (a(n-1) + 1) * (a(n-1) - 1). Each term is relatively prime to its successor. - Jonathan Vos Post, Jun 06 2008
Mensa (see Dutch link below) indicates high intelligence by offering a self test containing a number of problems, one of which is "Complete each series with the element that logically continues the series: 3968, 63, 8, 3". - David A. Corneth, May 19 2024

References

  • R. K. Guy, How to factor a number, Proc. 5th Manitoba Conf. Numerical Math., Congress. Num. 16 (1975), 49-89.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [n le 1 select 2 else Self(n-1)^2 -1: n in [1..12]]; // G. C. Greubel, Oct 27 2022
    
  • Maple
    a := proc(n) local k, v: v := 2: for k from 1 to n do v := v^2-1: od: v: end:
    seq(a(n), n = 0 .. 8); # Lorenzo Sauras Altuzarra, Feb 01 2023
  • Mathematica
    NestList[#^2-1&,2,10] (* Harvey P. Dale, Nov 06 2011 *)
  • PARI
    a(n)=if(n<1,2*(n==0),a(n-1)^2-1)
    
  • SageMath
    def A003096(n): return 2 if (n==0) else A003096(n-1)^2 -1
    [A003096(n) for n in range(12)] # G. C. Greubel, Oct 27 2022

Formula

a(n-1) = ceiling(c^(2^n)) where c = 1.295553... = A077124. - Benoit Cloitre, Nov 29 2002

A005267 a(n) = -1 + a(0)*a(1)*...*a(n-1) with a(0) = 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The next term is too large to include.
An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
Let u(k), v(k) be defined by u(1)=1, v(1)=3, u(k+1)=v(k)-u(k), v(k+1)=u(k)v(k); then a(n)=v(2n). - Benoit Cloitre, Apr 02 2002
For positive n, a(n) has digital root 2 or 5 depending on whether n is odd or even. (T. Koshy) - Lekraj Beedassy, Apr 11 2005

References

  • R. K. Guy and R. Nowakowski, "Discovering primes with Euclid," Delta (Waukesha), Vol. 5, pp. 49-63, 1975.
  • T. Koshy, "Intriguing Properties Of Three Related Number Sequences", in Journal of Recreational Mathematics, Vol. 32(3) pp. 210-213, 2003-2004 Baywood NY.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    a(n)=if(n<2,3*(n>=0)-(n>0),a(n-1)^2+a(n-1)-1)
    
  • Python
    def a(n):
        if n == 0: return 2
        t = a(n-1)
        l = t+1
        u = t
        return l * u - 1
    print([a(n) for n in range(0, 8)]) # Darío Clavijo, Aug 24 2024

Formula

a(n) = -1 + a(0)a(1)...a(n-1).
a(n) = -1 + Product_{iHenry Bottomley, Jul 31 2000
a(n+1) = a(n)^2 + a(n) - 1 if n>1. a(0)=3, a(1)=2.
An induction shows that a(n+1) = A117805(n) - 1. - R. J. Mathar, Apr 22 2007; M. F. Hasler, May 04 2007
For n>0, a(n) = a(0)^2 + a(1)^2 + ... + a(n-1)^2 - n - 6. - Max Alekseyev, Jun 19 2008

A004168 a(n+1) = a(n)*(a(n)+1).

Original entry on oeis.org

3, 12, 156, 24492, 599882556, 359859081592975692, 129498558604939936868397356895854556, 16769876680757063368089314196389622249367851612542961252860614401811692
Offset: 0

Views

Author

Keywords

Comments

The next term (a(8)) has 141 digits. - Harvey P. Dale, Jul 02 2021

Crossrefs

Programs

  • Magma
    [n eq 1 select 3 else  Self(n-1)*(Self(n-1)+1): n in [1..10]]; // Vincenzo Librandi, Feb 23 2016
  • Maple
    A004168 := proc(n) option remember; if n=0 then 3 else A004168(n-1)*(A004168(n-1)+1); fi; end;
  • Mathematica
    a = {3}; Do[AppendTo[a, a[[n - 1]] (a[[n - 1]] + 1)], {n, 2, 8}]; a (* Michael De Vlieger, Feb 23 2016 *)
    NestList[#(#+1)&,3,7] (* Harvey P. Dale, Jul 02 2021 *)

Formula

a(n) = A082732(n+3) - 1. - Max Alekseyev, Aug 09 2019

Extensions

a(7) from Vincenzo Librandi, Feb 23 2016

A051070 a(n) is the n-th term in sequence A_n, respecting the offset, or a(n) = -1 if A_n has fewer than n terms.

Original entry on oeis.org

1, 2, 1, 0, 2, 3, 0, 7, 8, 4, 63, 1, 316, 78, 16, 2048, 7652, 26627, 8, 24000, 232919, 1145406, 3498690007594650042368, 2058537, 58, 26, 27, 59, 9272780, 3, 69273668, 4870847, 2387010102192469724605148123694256128, 1, 1, -53, 43, 0, -4696, 173, 44583, 111111111111111111111111111111111111111111, 30402457, 668803781, 1134903170, 382443020332
Offset: 1

Views

Author

Robert G. Wilson v, Aug 23 2000

Keywords

Comments

a(58) = A000058(58) = 192523...920807 (58669977298272603 digits) is too large to include in the b-file. - Pontus von Brömssen, May 19 2022
Comment from N. J. A. Sloane, Dec 26 2022 (Start)
Note that a(n) = -1 can arise in two ways: either A_n has fewer than n terms, or A_n has at least n terms, but its n-th term is -1.
Here is a summary of the terms with n <= 80.
a(n) = -1 occurs just twice, for n = 53 and 54, in both cases because the relevant New York subway lines do not have enough stops.
a(1) though a(65) are known, although a(58) = = 192523...920807 has 58669977298272603 digits.
a(66) is the first unknown value.
Also unknown for n <= 80 are a(67), a(72), a(74), a(75), a(76), and a(77) (counts of numbers <= 2^n represented by various quadratic forms; some of these do not even have b-files), and a(80), which like a(66) is a graph-theory question. (End)

Examples

			a(19) = 8 because A000019(19) = 8.
a(20) = 24000 because A000020(20) = 24000.
		

Crossrefs

See A091967, A107357, A102288 for other versions. See also A031214, A031135.

Programs

  • Maple
    for m from 1 do
      url:= sprintf("https://oeis.org/A%06d/b%06d.txt",m,m);
      S:= URL:-Get(url);
      L:= StringTools[Split](S,"\n");
      for t in L do
        g:= sscanf(t, "%d %d");
        if nops(g) = 2 and g[1] = m then
          a[m]:= g[2];
          break
        fi;
      od;
      if not assigned(a[m]) then break fi;
    od:
    seq(a[i],i=1..m-1); # Robert Israel, May 31 2015

Extensions

Rechecked and 4 more terms added by N. J. A. Sloane, May 25 2005
a(36) and a(42) corrected and a(43) to a(46) added by Robert Israel, May 31 2015
Definition revised by N. J. A. Sloane, Nov 27 2016

A075442 Slowest-growing sequence of primes whose reciprocals sum to 1.

Original entry on oeis.org

2, 3, 7, 43, 1811, 654149, 27082315109, 153694141992520880899, 337110658273917297268061074384231117039, 8424197597064114319193772925959967322398440121059128471513803869133407474043
Offset: 1

Views

Author

T. D. Noe, Sep 16 2002

Keywords

Comments

This sequence was mentioned by K. S. Brown. The sequence is generated by a greedy algorithm given by the Mathematica program. The sum converges quadratically.
It is easily shown that this sequence is infinite. For suppose there was a finite representation of unity as a sum of unit fractions with distinct prime denominators. Multiply the equation by the product of all denominators to obtain this product of prime numbers on one side of the equation and a sum of products consisting of this product with always exactly one of the prime numbers removed on the other side. Then each of the prime numbers divides one side of the equation but not the other, since it divides all the products added except exactly one. Contradiction. - Peter C. Heinig (algorithms(AT)gmx.de), Sep 22 2006
{a(n)} = 2, 3, 7, ..., so A225671(1) = 3. - Jonathan Sondow, May 13 2013

References

  • R. K. Guy, Unsolved Problems in Number Theory, D11.

Crossrefs

Programs

  • Mathematica
    x=1; lst={}; Do[n=Ceiling[1/x]; If[PrimeQ[n], n++ ]; While[ !PrimeQ[n], n++ ]; x=x-1/n; AppendTo[lst, n], {10}]; lst
    a[n_] := a[n] = Block[{sm = Sum[1/(a[i]), {i, n - 1}]}, NextPrime[ Max[ a[n - 1], 1/(1 - sm)]]]; a[0] = 1; Array[a, 10] (* Robert G. Wilson v, Oct 28 2010 *)
  • PARI
    a(n)=if(n<3, return(prime(n))); my(x=1.); for(i=1,n-1,x-=1/a(i)); nextprime(1/x) \\ Charles R Greathouse IV, Apr 29 2015
    
  • PARI
    a_vector(N=10)= my(r=1, v=vector(N)); for(i=1, N, v[i]= nextprime(1+1/r); r-= 1/v[i]); v; \\ Ruud H.G. van Tol, Jul 29 2023

A092666 a(n) = number of Egyptian fractions 1 = 1/x_1 + ... + 1/x_k (for any k), with 0 < x_1 <= ... <= x_k = n.

Original entry on oeis.org

1, 1, 1, 2, 1, 7, 1, 10, 10, 26, 1, 107, 1, 83, 375, 384, 1, 1418, 1, 4781, 7812, 1529, 1, 33665, 9789, 4276, 27787, 168107, 1, 584667, 1, 586340, 1177696, 52334, 5285597, 14746041, 1, 218959, 13092673, 84854683, 1, 279357910, 1, 491060793, 2001103921
Offset: 1

Views

Author

Max Alekseyev, Mar 02 2004

Keywords

Examples

			a(4) = 2 since there are two fractions 1=1/2+1/4+1/4 and 1=1/4+1/4+1/4+1/4.
		

Crossrefs

Formula

a(n) = A020473(n) - A020473(n-1).
a(n) = 1 if n is prime.

Extensions

Edited by Max Alekseyev, May 05 2010

A129871 A variant of Sylvester's sequence: a(0)=1 and for n>0, a(n) = (a(0)*a(1)*...*a(n-1)) + 1.

Original entry on oeis.org

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

Views

Author

Ben Branman, Sep 16 2011

Keywords

Comments

A variant of A000058, starting with an extra 1.

References

  • Jean-Marie Monier, Analyse, Exercices corrigés, 2ème année, MP, Dunod, 1997, Exercice 3.3.4 page 284.

Crossrefs

Cf. A000058 which is the main entry for this sequence.
Cf. A118227.

Programs

  • Haskell
    a129871 n = a129871_list !! n
    a129871_list = 1 : a000058_list  -- Reinhard Zumkeller, Dec 18 2013
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Product[a[k], {k, 0, n - 1}] + 1

Formula

For n>0, a(n) = A000058(n-1).
a(1) = 2, a(n+1) = a(n)^2 - a(n) + 1. a(n) = round(c^(2^n)), where c = 1.264... is the Vardi constant, A076393. - Thomas Ordowski, Jun 11 2013
From Bernard Schott, Apr 06 2021: (Start)
Sum_{n>=0} 1/a(n) = 2.
Sum_{n>=0} (-1)^(n+1)/a(n) = 2 * (A118227 - 1). (End)

Extensions

Corrected and rewritten by Ben Branman, Sep 16 2011
Edited by Max Alekseyev, Oct 11 2012

A091967 a(n) is the n-th term of sequence A_n, ignoring the offset, or -1 if A_n has fewer than n terms.

Original entry on oeis.org

0, 2, 1, 0, 2, 3, 0, 6, 6, 4, 44, 1, 180, 42, 16, 1096, 7652, 13781, 8, 24000, 119779, 458561, 152116956851941670912, 1054535, -53, 26, 27, 59, 4806078, 2, 35792568, 3010349, 2387010102192469724605148123694256128, 2, 0, -53, 43, 0, -4097, 173, 37338, 111111111111111111111111111111111111111111, 30402457, 413927966
Offset: 1

Views

Author

Proposed by several people, including Jeff Burch and Michael Joseph Halm

Keywords

Comments

This version ignores the offset of A_n and just counts from the beginning of the terms shown in the OEIS entry.
Thus a(8) = 6 because A_8 begins 1,1,2,2,3,4,5,6,... [even though A_8(8) is really 7].
The value a(n) = -1 could arise in two different ways, but it will be easy to decide which. - N. J. A. Sloane, Nov 27 2016
From M. F. Hasler, Sep 22 2013: (Start)
The value of a(91967) can be chosen at will.
Note that this sequence may change if the initial terms in A_n are altered, which does happen from time to time, usually because of the addition of an initial term.
After a(47), currently unknown, the sequence continues with a(48) = A48(47) = 1497207322929, a(49) = A49(48) = unknown, a(50) = A50(49) = unknown, a(51) = A51(50) = 1125899906842625, a(52)=97, a(53) = -1 (since A000053 has only 29 terms). (End)
a(58) = A000058(57) = 138752...985443 (29334988649136302 digits) is too large to include in the b-file. - Pontus von Brömssen, May 21 2022

Examples

			a(1) = 0 since A000001 has offset 0, and begins with A000001(0) = 0.
a(26) = 26 because the 26th term of A000026 = 26.
		

Crossrefs

Extensions

Corrected and extended by Jud McCranie; further extended by N. J. A. Sloane and E. M. Rains, Dec 08 1998
Corrected and extended by N. J. A. Sloane, May 25 2005
a(26), a(36) and a(42) corrected by M. F. Hasler, Jan 30 2009
a(43) and a(44) added by Daniel Sterman, Nov 27 2016
a(1) corrected by N. J. A. Sloane, Nov 27 2016 at the suggestion of Daniel Sterman
Definition and comments changed by N. J. A. Sloane, Nov 27 2016

A144743 Recurrence sequence a(n)=a(n-1)^2-a(n-1)-1, a(0)=3.

Original entry on oeis.org

3, 5, 19, 341, 115939, 13441735781, 180680260792773944179, 32645356640144805339284259388335434039861, 1065719310162246533488642668727242229836148490441005113524301742665845135502859459
Offset: 0

Views

Author

Artur Jasinski, Sep 20 2008

Keywords

Comments

a(0)=3 is the smallest integer generating an increasing sequence of the form a(n)=a(n-1)^2-a(n-1)-1.
Conjecture: A130282 and this sequence are disjoint. If this is true, for n >= 1, a(n+1) is the smallest m such that (m^2-1) / (a(n)^2-1) + 1 is a square. - Jianing Song, Mar 19 2022

Crossrefs

Programs

  • Mathematica
    a = {3}; k = 3; Do[k = k^2 - k - 1; AppendTo[a, k], {n, 1, 10}]; a
  • PARI
    a(n,s=3)=for(i=1,n,s=s^2-s-1);s \\ M. F. Hasler, Oct 06 2014

Formula

a(n) = a(n-1)^2-a(n-1)-1, a(0)=3.
a(n) ~ c^(2^n), where c = 2.07259396780115004655284076205241023281287049774423620992171834046728756... . - Vaclav Kotesovec, May 06 2015

Extensions

Edited by M. F. Hasler, Oct 06 2014
Previous Showing 51-60 of 139 results. Next