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

A055456 a(n) is the smallest number which is not the sum of exactly 1 or of n earlier terms.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 19 2000

Keywords

Examples

			a(3)=2 because 1 is already in the sequence, 2 has not yet appeared (i.e., is not the sum of 1 earlier term), and the sum of 3 earlier terms is 3, 5 or 7.
a(4)=13 because 1, 2, and 3 have already appeared and the sum of 4 earlier terms could be any integer from 4 through 12.
		

Crossrefs

Cf. A035334. a(n) is not n-1 iff n-1 is in A024556 or equivalently in A002065.

Formula

If n-1 > 0 has not already appeared in sequence then a(n) = n-1, otherwise a(n) = n^2 - n + 1.

A065035 a(n+1) = a(n)^2 + 3*a(n) + 1.

Original entry on oeis.org

0, 1, 5, 41, 1805, 3263441, 10650056950805, 113423713055421844361000441, 12864938683278671740537145998360961546653259485195805, 165506647324519964198468195444439180017513152706377497841851388766535868639572406808911988131737645185441
Offset: 0

Views

Author

Henry Bottomley, Nov 03 2001

Keywords

Comments

a(k) is the optimal competitive ratio of any memoryless algorithm for the weighted k-server problem (Chiplunkar and Vishwanathan). - David Eppstein, Dec 31 2013
This is a divisibility sequence, that is if n divides m then a(n) divides a(m). Cf. A002065. - Peter Bala, Mar 26 2018

Examples

			a(3) = a(2)^2 + 3*a(2) + 1 = 25 + 15 + 1 = 41.
		

Crossrefs

Programs

  • PARI
    a(n)=if(n<1,0,a(n-1)^2+3*a(n-1)+1);
    
  • PARI
    { for (n=0, 12, a=if(n, a^2 + 3*a + 1, 0); write("b065035.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 03 2009

Formula

a(n) = A007018(n)-1 = A000058(n)-2 = A060136(3, n) = A028387(a(n-1)). - Michael Somos, Feb 10 2002

A055776 a(n) = a(n-1)^3 + a(n-1)^2 + a(n-1) + 1.

Original entry on oeis.org

0, 1, 4, 85, 621436, 239988219843053389, 13821964488793901254190711941736196403535171578341580
Offset: 0

Views

Author

Henry Bottomley, Jul 12 2000

Keywords

Comments

The next term has 157 digits. - Harvey P. Dale, Dec 08 2019

Examples

			a(3) = 4^3 + 4^2 + 4 + 1 = 64 + 16 + 4 + 1 = 85.
		

References

  • Mordechai Ben-Ari, Mathematical Logic for Computer Science, Third edition, 173-203

Crossrefs

Cf. A002065.

Programs

  • Magma
    [n le 1 select 0 else Self(n-1)^3 + Self(n-1)^2 + Self(n-1) + 1: n in [1..15]]; // Vincenzo Librandi, Oct 05 2015
    
  • Mathematica
    RecurrenceTable[{a[n] == a[n - 1]^3 + a[n - 1]^2 + a[n - 1] + 1, a[0] == 0}, a, {n, 0, 6}] (* Michael De Vlieger, Oct 05 2015 *)
    NestList[#^3+#^2+#+1&,0,7] (* Harvey P. Dale, Dec 08 2019 *)
  • PARI
    a=vector(6);a[1]=1;print1("0, 1, ");for(n=2,6,a[n]=a[n-1]^3+a[n-1]^2+a[n-1]+1;print1(a[n],", ")) \\ Gerald McGarvey, Dec 08 2007
    
  • PARI
    a(n) = if(n==0, 0, a(n-1)^3 + a(n-1)^2 + a(n-1) + 1);
    vector(10, n, a(n-1)) \\ Altug Alkan, Oct 06 2015

Formula

a(n) is asymptotic to c^(3^(n+1)) where c=1.056431004248312118265251254776175173104598976924006344252579493163876246969557582... - Gerald McGarvey, Dec 08 2007, corrected by Vaclav Kotesovec, Apr 03 2016
a(2n) mod 2 = 0 ; a(2n+1) mod 2 = 1. - Altug Alkan, Oct 04 2015

Extensions

Next term is too big to include.

A081796 Continued cotangent for sin(Pi/3) = sqrt(3)/2.

Original entry on oeis.org

0, 1, 13, 196, 257087, 249639161983, 553029809670900697241813, 575598315149214535162520163688459972096324096213, 680813056961507163626080261194823226597566577785481001106845521689287461487322891517719568410606
Offset: 0

Views

Author

Benoit Cloitre, Apr 10 2003

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 433-434.
  • D. H. Lehmer, A cotangent analogue of continued fractions, Duke Math. J., 4 (1935), 323-340.

Crossrefs

Programs

  • PARI
    \p900
    bn=vector(100);
    bn[1]=sqrt(3)/2;
    b(n)=if(n<0,0,bn[n]);
    for(n=2,10,bn[n]=(b(n-1)*floor(b(n-1))+1)/(b(n-1)-floor(b(n-1))));
    a(n)=floor(b(n+1));

Formula

sqrt(3)/2 = cot(Sum_{n>=0} (-1)^n*acot(a(n))).
Let b(0) = sqrt(3)/2, b(n) = (b(n-1)*floor(b(n-1))+1)/(b(n-1)-floor(b(n-1))) then a(n) = floor(b(n)).
Previous Showing 21-24 of 24 results.