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

A024323 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = (odd natural numbers).

Original entry on oeis.org

0, 0, 3, 5, 7, 9, 11, 13, 24, 28, 32, 36, 40, 44, 48, 52, 73, 79, 85, 91, 97, 103, 109, 115, 121, 127, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405, 415, 425, 488, 500, 512, 524, 536, 548, 560, 572, 584
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
    [ (&+[A023531(j)*(2*n-2*j+1): j in [1..Floor((n+1)/2)]]) : n in [1..70]]; // G. C. Greubel, Jan 20 2022
    
  • Mathematica
    A023531[n_]:= SquaresR[1, 8n+9]/2;
    a[n_]:= Sum[A023531[j]*(2*n-2*j+1), {j, Floor[(n+1)/2]}];
    Table[a[n], {n, 70}] (* G. C. Greubel, Jan 20 2022 *)
  • Sage
    def A023531(n):
        if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
        else: return 0
    [sum( A023531(j)*(2*n-2*j+1) for j in (1..floor((n+1)/2)) ) for n in (1..70)] # G. C. Greubel, Jan 20 2022

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*(2*n -2*j + 1). - G. C. Greubel, Jan 20 2022

A024324 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = A000201 (lower Wythoff sequence).

Original entry on oeis.org

0, 0, 3, 4, 6, 8, 9, 11, 20, 23, 27, 29, 33, 37, 39, 43, 60, 65, 70, 74, 80, 84, 89, 94, 98, 104, 131, 137, 143, 150, 157, 163, 169, 176, 183, 189, 195, 202, 241, 248, 256, 265, 272, 281, 289, 296, 306, 313, 321, 329, 337, 346, 397, 406, 416, 425, 436, 445, 454, 466, 474, 484
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    b:= func< n,j | IsIntegral((Sqrt(8*j+9) -3)/2) select Fibonacci(n-j+1) else 0 >;
    A024324:= func< n | (&+[b(n,j): j in [1..Floor((n+1)/2)]]) >;
    [A024324(n) : n in [1..80]]; // G. C. Greubel, Jan 28 2022
    
  • Mathematica
    Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += Floor[n*GoldenRatio^2]; n -= m++]; t, {n, 120}] (* G. C. Greubel, Jan 28 2022 *)
  • PARI
    my(phi=quadgen(5)); a(n) = my(L=n>>1,m=2,ret=0); n--; while(n>L, ret += floor(n*phi); n-=(m++)); ret; \\ Kevin Ryde, Feb 03 2022
  • Sage
    def b(n,j): return floor( (n+1-j)*(1+sqrt(5))/2 ) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
    def A024324(n): return sum( b(n,k) for k in (1..((n+1)//2)) )
    [A024324(n) for n in (1..80)] # G. C. Greubel, Jan 28 2022
    

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A000201(n-j+1).

Extensions

a(62) corrected by Sean A. Irvine, Jun 27 2019

A024325 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = A001950 (upper Wythoff sequence).

Original entry on oeis.org

0, 0, 5, 7, 10, 13, 15, 18, 33, 38, 44, 48, 54, 60, 64, 70, 98, 106, 114, 121, 130, 137, 145, 153, 160, 169, 213, 223, 233, 244, 255, 265, 275, 286, 297, 307, 317, 328, 391, 403, 416, 430, 442, 456, 469, 481, 496, 508, 521, 534, 547, 561, 644, 659, 675, 690, 707, 722, 737, 755
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A023531:= func< n | IsIntegral( (Sqrt(8*n+9) -3)/2 ) select 1 else 0 >;
    A024325:= func< n | (&+[A023531(j)*Floor((n-j+1)*(3+Sqrt(5))/2): j in [1..Floor((n+1)/2)]]) >;
    [A024325(n) : n in [1..80]]; // G. C. Greubel, Jan 28 2022
    
  • Mathematica
    A023531[n_] := SquaresR[1, 8n+9]/2;
    a[n_]:= a[n]= Sum[A023531[j]*Floor[(n-j+1)*GoldenRatio^2], {j,Floor[(n+1)/2]}];
    Table[a[n], {n, 80}] (* G. C. Greubel, Jan 28 2022 *)
  • Sage
    def A023531(n):
        if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
        else: return 0
    def A023325(n): return sum( A023531(j)*floor(((n-j+1)*(3+sqrt(5)))/2) for j in (1..((n+1)//2)) )
    [A023325(n) for n in (1..80)] # G. C. Greubel, Jan 28 2022

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A001950(n-j+1).

A024326 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = A023533.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 120;
    A023533:= A023533 = With[{ms= Table[m(m+1)(m+2)/6, {m, 0, nmax+5}]}, Table[If[MemberQ[ms, n], 1, 0], {n, 0, nmax+5}]];
    AbsoluteTiming[Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += A023533[[n + 1]]; n -= m++]; t, {n, nmax}]] (* G. C. Greubel, Jan 29 2022  *)
  • Sage
    nmax=120
    @CachedFunction
    def A023531(n):
        if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
        else: return 0
    @CachedFunction
    def B_list(N):
        A = []
        for m in range(ceil((6*N)^(1/3))):
            A.extend([0]*(binomial(m+2, 3) -len(A)) +[1])
        return A
    A023533 = B_list(nmax+5)
    @CachedFunction
    def A023324(n): return sum( A023531(j)*A023533[n-j+1] for j in (1..((n+1)//2)) )
    [A023324(n) for n in (1..nmax)] # G. C. Greubel, Jan 29 2022

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A023533(n-j+1).

A024327 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor( (n+1)/2 ), s = A023531, t = A014306.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    A014306:= With[{ms= Table[m(m+1)(m+2)/6, {m,0,20}]}, Table[If[MemberQ[ms, n], 0, 1], {n,0,150}]];
    Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += A014306[[n+1]]; n -= m++]; t, {n, 120}] (* G. C. Greubel, Feb 17 2022 *)
  • Sage
    nmax=120
    @CachedFunction
    def b_list(N):
        A = []
        for m in range(ceil((6*N)^(1/3))):
            A.extend([0]*(binomial(m+2, 3) - len(A)) + [1])
        return A
    A023533 = b_list(nmax+5)
    def A014306(n): return 1 - A023533[n]
    def b(n, j): return A014306(n-j+1) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
    @CachedFunction
    def A024327(n): return sum( b(n, j) for j in (1..floor((n+1)/2)) )
    [A024327(n) for n in (1..nmax)] # G. C. Greubel, Feb 17 2022

Formula

a(n) = Sum_{k=1..floor((n+1)/2)} A023531(k)*A014306(n-k+1). - G. C. Greubel, Feb 17 2022

Extensions

Title corrected by Sean A. Irvine, Jun 30 2019

A085449 Horadam sequence (0,1,4,2).

Original entry on oeis.org

0, 1, 2, 8, 24, 80, 256, 832, 2688, 8704, 28160, 91136, 294912, 954368, 3088384, 9994240, 32342016, 104660992, 338690048, 1096024064, 3546808320, 11477712896, 37142659072, 120196169728, 388962975744, 1258710630400
Offset: 0

Views

Author

Ross La Haye, Aug 18 2003

Keywords

Comments

a(n) / a(n-1) converges to sqrt(5) + 1 as n approaches infinity. sqrt(5) + 1 can also be written as Phi^3 - 1, 2 * Phi, Phi^2 + Phi - 1 and (L(n) / F(n)) + 1, where L(n) is the n-th Lucas number and F(n) is the n-th Fibonacci number as n approaches infinity.
Binomial transform is A001076. - Paul Barry, Aug 25 2003

Examples

			a(4) = 24 because a(3) = 8, a(2) = 2, s = 2, r = 4 and (2 * 8) + (4 * 2) = 24.
G.f. = x + 2*x^2 + 8*x^3 + 24*x^4 + 80*x^5 + 256*x^6 + 832*x^7 + ... - _Michael Somos_, Mar 07 2021
		

Crossrefs

Essentially the same as A063727.

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=2*a[n-1]+4*a[n-2]; od; a; # Muniru A Asiru, Oct 09 2018
  • Magma
    [2^(n-1)*Fibonacci(n): n in [0..50]]; // G. C. Greubel, Oct 08 2018
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*(a[n-1]+2*a[n-2]) od: seq(a[n], n=0..26); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    Table[2^(n-1)*Fibonacci[n], {n,0,50}] (* G. C. Greubel, Oct 08 2018 *)
  • PARI
    vector(50, n, n--; 2^(n-1)*fibonacci(n)) \\ G. C. Greubel, Oct 08 2018
    

Formula

a(n) = s*a(n-1) + r*a(n-2); for n > 1, where a(0) = 0, a(1) = 1, s = 2, r = 4.
From Paul Barry, Aug 25 2003: (Start)
G.f.: x/(1-2*x-4*x^2).
a(n) = sqrt(5)*((1+sqrt(5))^n - (1-sqrt(5))^n)/10.
a(n) = Sum_{k=0..floor(n/2)} C(n, 2*k+1)5^k . (End)
The signed version 0, 1, -2, ... has a(n)=sqrt(5)((sqrt(5)-1)^n-(-sqrt(5)-1)^n)/10. It is the second inverse binomial transform of A085449. - Paul Barry, Aug 25 2003
a(n) = 2^(n-1)*Fib(n). - Paul Barry, Mar 22 2004
Sum_{n>=1} 1/a(n) = A269991. - Amiram Eldar, Feb 01 2021
a(n) = -(-4)^n*a(-n) for all integer n. - Michael Somos, Mar 07 2021

A085939 Horadam sequence (0,1,6,4).

Original entry on oeis.org

0, 1, 4, 22, 112, 580, 2992, 15448, 79744, 411664, 2125120, 10970464, 56632576, 292353088, 1509207808, 7790949760, 40219045888, 207621882112, 1071801803776, 5532938507776, 28562564853760
Offset: 0

Views

Author

Ross La Haye, Aug 16 2003

Keywords

Comments

a(n) / a(n-1) converges to sqrt(10) + 2 as n approaches infinity; sqrt(10) + 2 can also be written as sqrt(2) * (sqrt(2) + sqrt(5)), 2 * sqrt(2) * Phi - sqrt(2) + 2 and lim_{n->infinity} sqrt(2) * (sqrt(2) + (L(n) / F(n))), where L(n) is the n-th Lucas number and F(n) is the n-th Fibonacci number.

Examples

			a(4) = 112 because a(3) = 22, a(2) = 4, s = 4, r = 6 and (4 * 22) + (6 * 4) = 112.
		

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 4*Self(n-1) + 6*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 16 2018
  • Mathematica
    Join[{a=0,b=1},Table[c=4*b+6*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{4,6},{0,1},30] (* Harvey P. Dale, Jul 20 2016 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-4*x-6*x^2))) \\ G. C. Greubel, Jan 16 2018
    
  • Sage
    [lucas_number1(n,4,-6) for n in range(0, 21)] # Zerinvary Lajos, Apr 23 2009
    

Formula

a(n) = s*a(n-1) + r*a(n-2); for n > 1, where a(0) = 0, a(1) = 1, s = 4, r = 6.
a(n) = ((2+sqrt(10))^n - (2-sqrt(10))^n)/(2*sqrt(10)). - Rolf Pleisch, Jul 06 2009
G.f.: x/(1-4*x-6*x^2). - Colin Barker, Jan 10 2012

A024328 a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*prime(n-j+1).

Original entry on oeis.org

0, 0, 3, 5, 7, 11, 13, 17, 30, 36, 46, 50, 60, 70, 74, 84, 117, 131, 139, 157, 171, 177, 193, 207, 221, 237, 294, 310, 330, 348, 360, 390, 408, 424, 448, 470, 486, 506, 611, 625, 653, 673, 699, 739, 761, 781, 803, 835, 863, 891, 925, 953, 1078, 1104, 1136, 1180, 1214, 1244, 1270
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A023531 (characteristic function of {n(n+3)/2}).

Programs

  • Magma
    b:= func< n, j | IsIntegral((Sqrt(8*j+9) -3)/2) select NthPrime(n-j+1) else 0 >;
    A024328:= func< n | (&+[b(n, j): j in [1..Floor((n+1)/2)]]) >;
    [A024328(n) : n in [1..120]]; // G. C. Greubel, Feb 17 2022
    
  • Mathematica
    Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += Prime[n]; n -= m++]; t, {n, 120}] (* G. C. Greubel, Feb 17 2022 *)
  • PARI
    A024328(n)=sum(j=1, (n+1)\2, A023531(j)*prime(n-j+1)) \\ M. F. Hasler, Apr 12 2018
    
  • Sage
    def b(n, j): return nth_prime(n-j+1) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
    @CachedFunction
    def A024327(n): return sum( b(n, j) for j in (1..floor((n+1)/2)) )
    [A024327(n) for n in (1..120)] # G. C. Greubel, Feb 17 2022

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*prime(n-j+1).

Extensions

Name edited by M. F. Hasler, Apr 12 2018

A085504 Horadam sequence (0,1,9,3).

Original entry on oeis.org

0, 1, 18, 81, 405, 1944, 9477, 45927, 223074, 1082565, 5255361, 25509168, 123825753, 601059771, 2917611090, 14162371209, 68745613437, 333698181192, 1619805064509, 7862698824255, 38166342053346, 185263315578333, 899287025215113, 4365230915850336
Offset: 0

Views

Author

Ross La Haye, Aug 18 2003

Keywords

Comments

Lim_{n->infinity} a(n)/a(n-1) = (3/2)*(1 + sqrt(5)), which can also be written as phi^2 + 2*phi - 1, phi^3 + phi - 1, phi + sqrt(5) + 1, 3*phi, 3*phi^2 - 3, phi^4 - 2 and lim_{n->infinity} (3/2)*(1 + Lucas(n)/Fibonacci(n)).

Examples

			a(4) = 405 because a(3) = 81, a(2) = 18, s = 3, r = 9 and (3 * 81) + (9 * 18) = 405.
		

Crossrefs

Essentially the same as A122069 and A099012.

Programs

  • Mathematica
    Join[{0,1},LinearRecurrence[{3,9},{18,81},30]] (* or *) CoefficientList[ Series[x (1+15x+18x^2)/(1-3x-9x^2),{x,0,30}],x] (* Harvey P. Dale, Nov 24 2012 *)

Formula

a(n) = s*a(n-1) + r*a(n-2); for n > 3, where a(0) = 0, a(1) = 1, a(2) = 18, a(4) = 81, s = 3, r = 9.
G.f.: x*(1+15*x+18*x^2)/(1-3*x-9*x^2). [Colin Barker, Jun 20 2012]

Extensions

First formula corrected and more terms from Harvey P. Dale, Nov 24 2012
Previous Showing 11-19 of 19 results.