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

A210728 a(n) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 7, 14, 27, 48, 83, 140, 233, 384, 629, 1026, 1669, 2710, 4395, 7122, 11535, 18676, 30231, 48928, 79181, 128132, 207337, 335494, 542857, 878378, 1421263, 2299670, 3720963, 6020664, 9741659, 15762356, 25504049, 41266440, 66770525, 108037002, 174807565
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210729: a(n)=a(n-1)+a(n-2)+n+3, a(0)=1,a(1)=2.

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 2, a[n] == a[n - 1] + a[n - 2] + n + 2}, a, {n, 36}] (* Bruno Berselli, Jun 27 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,a+b+n+3}; NestList[nxt,{1,1,2},40][[;;,2]] (* Harvey P. Dale, Aug 26 2024 *)

Formula

G.f.: (1-x+3*x^2-2*x^3)/((1-x)^2*(1-x-x^2)). - Bruno Berselli, Jun 27 2012
a(n) = ((5+sqrt(5))*(1+sqrt(5))^(n+1)-(5-sqrt(5))*(1-sqrt(5))^(n+1))/(2^(n+1)*sqrt(5))-n-5. - Bruno Berselli, Jun 27 2012
a(n) = -n-5+A022112(n+1). R. J. Mathar, Jul 03 2012

A210729 a(n) = a(n-1) + a(n-2) + n + 3 with n>1, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 8, 16, 31, 55, 95, 160, 266, 438, 717, 1169, 1901, 3086, 5004, 8108, 13131, 21259, 34411, 55692, 90126, 145842, 235993, 381861, 617881, 999770, 1617680, 2617480, 4235191, 6852703, 11087927, 17940664, 29028626, 46969326, 75997989, 122967353
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210728: a(n)=a(n-1)+a(n-2)+n+2, a(0)=1,a(1)=2.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 2*F(n+3)+3*F(n+1)-n-6); # G. C. Greubel, Jul 09 2019
  • Magma
    [3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6: n in [0..40]]; // Vincenzo Librandi, Jul 18 2013
    
  • Mathematica
    Table[3*Fibonacci[n+1]+2*Fibonacci[n+3]-n-6,{n,0,40}] (* Vaclav Kotesovec, May 13 2012 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+3)+3*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
    
  • Python
    prpr, prev = 1,2
    for n in range(2, 99):
        current = prev+prpr+n+3
        print(prpr, end=',')
        prpr = prev
        prev = current
    
  • Sage
    f=fibonacci; [2*f(n+3)+3*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
    

Formula

G.f.: (1-x+4*x^2-3*x^3)/((1-x-x^2)*(1-x)^2).
a(n) = 3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6. - Vaclav Kotesovec, May 13 2012
a(n) = 2*Lucas(n+2) + Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019

A123247 Let S(1)={1} and, for n>1 let S(n) be the smallest set containing x, x+1, 2x and 3x for each element x in S(n-1). a(n) is the number of elements in S(n).

Original entry on oeis.org

1, 3, 6, 13, 27, 54, 107, 213, 423, 845, 1685, 3371, 6735, 13468, 26937, 53900, 107873, 216035, 432787, 867313, 1738728, 3486464, 6993111, 14029776, 28153533, 56507114, 113435141, 227755613, 457358671, 918562597
Offset: 1

Views

Author

John W. Layman, Oct 04 2006

Keywords

Comments

If the set mapping has x -> x, 2x, 3x, 5x is used instead of x -> x, x+1, 2x, 3x, the corresponding sequence consists of the tetrahedral numbers C(n+3,3) = A000292.

Examples

			Under the indicated set mapping we have {1} -> {1,2,3} -> {1,2,3,4,6,9} -> {1,2,3,4,5,6,7,8,9,10,12,18,27}, ..., so a(2)=3, a(3)=6, a(4)=13, etc.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(k, v=[1]); print1(1); for(n=2, nn, v=Set(vector(4*#v, i, if(k=i%4, k*v[(3+i)\4], v[i/4]+1))); print1(", ", #v)); } \\ Jinyuan Wang, Apr 14 2020
    
  • Python
    from itertools import chain, islice
    def A123247_gen(): # generator of terms
        s = {1}
        while True:
            yield len(s)
            s = set(chain.from_iterable((x,x+1,2*x,3*x) for x in s))
    A123247_list = list(islice(A123247_gen(),20)) # Chai Wah Wu, Jan 12 2022

Extensions

a(14)-a(25) from Jinyuan Wang, Apr 14 2020
a(26)-a(30) from Chai Wah Wu, Jan 12 2022
Showing 1-3 of 3 results.