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

A024322 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 = (F(2), F(3), ...).

Original entry on oeis.org

0, 0, 2, 3, 5, 8, 13, 21, 42, 68, 110, 178, 288, 466, 754, 1220, 2029, 3283, 5312, 8595, 13907, 22502, 36409, 58911, 95320, 154231, 250161, 404769, 654930, 1059699, 1714629, 2774328, 4488957, 7263285
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
    [ (&+[A023531(j)*Fibonacci(n-j+2): j in [1..Floor((n+1)/2)]]) : n in [1..40]]; // G. C. Greubel, Jan 20 2022
    
  • Mathematica
    A010054[n_]:= SquaresR[1, 8n+1]/2;
    a[n_]:= Sum[A010054[j+1]*Fibonacci[n-j+2], {j, Floor[(n+1)/2]}];
    Table[a[n], {n, 40}] (* 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)*fibonacci(n-j+2) for j in (1..floor((n+1)/2)) ) for n in (1..40)] # G. C. Greubel, Jan 20 2022

Formula

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

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

A178244 Number of distinct permutations of binary digits (0's and 1's) in n.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 3, 1, 4, 6, 6, 4, 6, 4, 4, 1, 5, 10, 10, 10, 10, 10, 10, 5, 10, 10, 10, 5, 10, 5, 5, 1, 6, 15, 15, 20, 15, 20, 20, 15, 15, 20, 20, 15, 20, 15, 15, 6, 15, 20, 20, 15, 20, 15, 15, 6, 20, 15, 15, 6, 15, 6, 6, 1, 7, 21, 21, 35, 21, 35, 35, 35, 21, 35, 35, 35, 35, 35, 35, 21
Offset: 0

Views

Author

Juri-Stepan Gerasimov, May 23 2010

Keywords

Examples

			a(0) = 1 because the only permutation is 0 (or 0 written in base 2),
a(1) = 1 because the only permutation is 1 (or 1 written in base 2),
a(3) = 2 because there are two distinct permutations of the binary digits in 2 = 10_2: {01, 10} (identity permutation and transposition tau_12).
a(12) = 6, because the binary digits of 12 = 1100_2 have 6 distinct permutations {0011, 0101, 0110, 1001, 1010, 1100}, of which only 0101, 0110, 1001, 1010 are transpositions (= permutations changing exactly 2 elements).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L;
      L:= convert(n,base,2);
      binomial(nops(L),convert(L,`+`))
    end proc:
    map(f, [$0..100]); # Robert Israel, Oct 25 2023
  • Mathematica
    A178244[n_]:=Binomial[BitLength[n],DigitCount[n,2,1]];Array[A178244,100,0] (* Paolo Xausa, Nov 03 2023 *)
  • PARI
    A178244(n)=binomial(exponent(n*2+1),hammingweight(n));
    apply(A178244, [0..99]) \\ M. F. Hasler, Feb 23 2023
    
  • Python
    from math import comb
    def A178244(n): return comb(n.bit_length(),n.bit_count()) # Chai Wah Wu, Mar 13 2023

Formula

a(n) = binomial((A000120(n) + A023416(n)), A000120(n)).
a(n) = binomial(A070939(n), A000120(n)). - Paolo Xausa, Nov 03 2023

Extensions

Corrected (a 3 in the first group removed) by R. J. Mathar, May 28 2010
Definition corrected by M. F. Hasler, Feb 23 2023

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
Previous Showing 11-18 of 18 results.