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-20 of 22 results. Next

A131030 Period 6: repeat [16, 7, 7, 16, 25, 25].

Original entry on oeis.org

16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Sixth column of triangular array T defined in A131022.

Crossrefs

Cf. A131022. Other columns of T are in A088911, A131026, A131027, A131028, A131029.

Programs

  • Magma
    m:=79; [ [16, 7, 7, 16, 25, 25][(n-1) mod 6 + 1]: n in [1..m] ];
  • Maple
    seq(op([16, 7, 7, 16, 25, 25]), n=0..30); # Wesley Ivan Hurt, Oct 02 2018
  • PARI
    {m=79; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==3, 16, if(r==1||r==2, 7, 25)), ","))}
    

Formula

a(1) = a(4) = 16, a(2) = a(3) = 7, a(5) = a(6) = 25; for n > 6, a(n) = a(n-6).
G.f.: x*(16 - 25*x + 25*x^2)/((1-x)*(1 - x + x^2)).
a(n) = 16 + 9*cos(n*Pi/3) - 3*sqrt(3)*sin(n*Pi/3). - Wesley Ivan Hurt, Sep 26 2018

A291962 Decimal repunits written in base 2.

Original entry on oeis.org

0, 1, 1011, 1101111, 10001010111, 10101101100111, 11011001000000111, 100001111010001000111, 101010011000101011000111, 110100111110110101111000111, 1000010001110100011010111000111, 1010010110010001100001100111000111, 1100111011110101111010000000111000111
Offset: 0

Views

Author

Felix Fröhlich, Sep 06 2017

Keywords

Comments

Interpreting A002275 as binary numbers and converting to decimal gives A000225. This sequence gives the resulting terms of the "reverse" operation.
The n least significant bits of a(n) seem to converge to A088911 as n increases.

Crossrefs

Programs

  • Mathematica
    Table[FromDigits@ IntegerDigits[Floor[10^n/9], 2], {n, 0, 12}] (* Michael De Vlieger, Sep 06 2017 *)
    FromDigits[IntegerDigits[#,2]]&/@Table[FromDigits[PadRight[{},n,1]],{n,0,20}] (* Harvey P. Dale, Apr 01 2023 *)
  • PARI
    a(n) = subst(Pol(binary((10^n-1)/9)), x, 10)
    
  • Python
    def a(n): return 0 if n == 0 else int(bin(int("1"*n))[2:])
    print([a(n) for n in range(13)]) # Michael S. Branicky, Apr 26 2022

Formula

a(n) = A007088(A002275(n)).

A153234 a(n) = floor(2^n/9).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 7, 14, 28, 56, 113, 227, 455, 910, 1820, 3640, 7281, 14563, 29127, 58254, 116508, 233016, 466033, 932067, 1864135, 3728270, 7456540, 14913080, 29826161, 59652323, 119304647, 238609294, 477218588, 954437176, 1908874353, 3817748707, 7635497415, 15270994830
Offset: 0

Views

Author

Paul Curtz, Dec 21 2008

Keywords

Comments

Partial sums of A113405. - Mircea Merca, Dec 28 2010
Dubickas proves that infinitely many terms of this sequence are composite. - Charles R Greathouse IV, Feb 04 2016
Parity from a(4) onward gives A088911 (Period 6: repeat [1, 1, 1, 0, 0, 0]). - Jeremy Gardiner, Nov 04 2020

Crossrefs

Cf. A113405.

Programs

Formula

a(n+1) - 2*a(n) = A088911(n+3).
a(n) + a(n+3) = 2^n - 1 = A000225(n), n > 0.
From Mircea Merca, Dec 28 2010: (Start)
a(n) = round((2*2^n-9)/18) = floor((2^n-1)/9) = ceiling((2^n-8)/9).
a(n) = a(n-6) + 7*2^(n-6), n > 5. (End)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + 3*a(n-4) - 2*a(n-5).
G.f.: x^4 / ( (1-2*x)*(1-x^2)*(1-x+x^2) ).
a(n) + a(n+1) = A111927(n). - R. J. Mathar, Apr 08 2013

Extensions

More terms from Vincenzo Librandi, Jun 25 2011

A131025 Antidiagonal sums of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j-1,k) for 2 <= k <= j.

Original entry on oeis.org

1, 1, 3, 2, 5, 3, 9, 6, 16, 11, 27, 22, 50, 50, 101, 114, 215, 255, 471, 552, 1024, 1145, 2169, 2290, 4460, 4460, 8921, 8556, 17477, 16383, 33861, 31674, 65536, 62255, 127791, 124510, 252302, 252302, 504605, 514446, 1019051, 1048575, 2067627
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Examples

			For first seven rows of T see A131022 or A129339.
		

Crossrefs

Cf. A131022 (T read by rows), A129339 (main diagonal of T), A131023 (first subdiagonal of T), A131024 (row sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=43; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ];
  • Mathematica
    CoefficientList[Series[(1 - 3 x^2 + 2 x^4 + 2 x^6 - 2 x^8 + x^9)/((1 - x)*(1 + x)*(1 - x + x^2)*(1 - 2 x^2)*(1 - 3 x^2 + 3 x^4)), {x, 0, 42}], x] (* Michael De Vlieger, Oct 26 2021 *)
  • PARI
    {m=43; M=matrix(m, m); for(j=1, m, M[j, 1]=if((j-1)%6<3, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, (j+1)\2, M[j-k+1, k]), ","))}
    

Formula

G.f.: (1-3*x^2+2*x^4+2*x^6-2*x^8+x^9)/((1-x)*(1+x)*(1-x+x^2)*(1-2*x^2)*(1-3*x^2+3*x^4)).

A112713 Expansion of x/(1 - x + x^5 - x^6).

Original entry on oeis.org

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

Views

Author

Paul Barry, Sep 15 2005

Keywords

Comments

Decimal expansion of 10000/900009. - Elmo R. Oliveira, May 08 2024

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x/(1 - x + x^5 - x^6), {x, 0, 100}], x] (* or *) LinearRecurrence[{1, 0, 0, 0, -1, 1}, {0, 1, 1, 1, 1, 1}, 100] (* Harvey P. Dale, Feb 16 2014 *)

Formula

G.f.: x/(1 - x + x^5 - x^6) = x/((1-x)*(1+x)*(1-x+x^2-x^3+x^4)).
a(n) = a(n-1) - a(n-5) + a(n-6).
a(n) = a(n-10).
a(n) = (Sum_{k=0..floor((n+2)/2)} (-1)^(k+1)*C(n-k+2, k-1)*F(n-2*k+2)) mod 2.
a(n) = A112712(n) mod 2.

Extensions

Incorrect g.f. removed by Georg Fischer, May 15 2019

A131023 First subdiagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j-1,k) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 14, 37, 101, 256, 593, 1267, 2534, 4825, 8921, 16384, 30581, 58975, 117950, 242461, 504605, 1048576, 2156201, 4371451, 8742902, 17308657, 34085873, 67108864, 132623405, 263652487, 527304974, 1059392917, 2133134741
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Also first differences of main diagonal A129339.

Examples

			For first seven rows of T see A131022 or A129339.
		

Crossrefs

Cf. A131022 (T read by rows), A129339 (main diagonal of T), A131024 (row sums of T), A131025 (antidiagonal sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=34; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n+1, n]: n in [1..m-1] ];
    
  • PARI
    {m=33; v=concat([1, 2, 3, 4],vector(m-4)); for(n=5, m, v[n]=5*v[n-1]-9*v[n-2]+6*v[n-3]); v}

Formula

a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4; for n > 4, a(n) = 5*a(n-1) - 9*a(n-2) + 6*a(n-3).
G.f.: x*(1-3*x+2*x^2+x^3)/((1-2*x)*(1-3*x+3*x^2)).
a(n) = A057681(n-1) + 2^(n-2), a(1) = 1. - Bruno Berselli, Feb 17 2011

A131024 Row sums of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j-1,k) for 2 <= k <= j.

Original entry on oeis.org

1, 3, 7, 11, 16, 22, 36, 73, 175, 431, 1024, 2290, 4824, 9649, 18571, 34955, 65536, 124510, 242460, 484921, 989527, 2038103, 4194304, 8565754, 17308656, 34617313, 68703187, 135812051, 268435456, 532087942, 1059392916, 2118785833, 4251920575, 8546887871
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Sum of n-th row equals (n+1)-th term of main diagonal minus (n+1)-th term of first column. A088911 has offset 0, so a(n) = A129339(n+1) - A088911(n).

Examples

			For first seven rows of T see A131022 or A129339.
		

Crossrefs

Cf. A131022 (T read by rows), A129339 (main diagonal of T), A131023 (first subdiagonal of T), A131025 (antidiagonal sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=32; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j, k]: k in [1..j] ]: j in [1..m] ];
  • PARI
    lista(m) = my(M=matrix(m, m)); for(j=1, m, M[j, 1]=if((j-1)%6<3, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, j, M[j, k]), ", "))
    

Formula

G.f.: x*(1-3*x+3*x^2-3*x^3+6*x^4-4*x^5+x^6)/((1-x)*(1+x)*(1-2*x)*(1-x+x^2)*(1-3*x+3*x^2)).

A350589 Sum over all partitions of [n] of the number of blocks containing their own index.

Original entry on oeis.org

0, 1, 3, 9, 30, 112, 464, 2109, 10411, 55351, 314772, 1903878, 12189432, 82274309, 583389847, 4332513061, 33607736990, 271657081128, 2283282938288, 19916981288017, 179994994948647, 1682624910161483, 16247280435775188, 161833756265886822, 1660836884761337248
Offset: 0

Views

Author

Alois P. Heinz, Jan 07 2022

Keywords

Comments

Also the number of partitions of [n] where the first k elements are marked (1 <= k <= n) and at least k blocks contain their own index: a(3) = 9 = 5 + 3 + 1: 1'23, 1'2|3, 1'3|2, 1'|23, 1'|2|3, 1'3|2', 1'|2'3, 1'|2'|3, 1'|2'|3'.

Examples

			a(3) = 9 = 1 + 1 + 2 + 2 + 3: 123, 12|3, 13|2, 1|23, 1|2|3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember;
         `if`(n=0, 1, b(n-1, m+1)+m*b(n-1, m))
        end:
    a:= n-> add(b(n-i, i), i=1..n):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, 1, b[n - 1, m + 1] + m*b[n - 1, m]];
    a[n_] := Sum[b[n - i, i], {i, 1, n}];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} A108087(n-k,k).
a(n) = Sum_{k=1..n} k * A259691(n-1,k).
a(n) = Sum_{k=1..n} A259691(n,k)/k.
a(n) = A347420(n) - A000110(n).
a(n) = 1 + A005490(n) - A000110(n).
a(n) mod 2 = A088911(n+5).

A056829 Nearest integer to n^2/6.

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 6, 8, 11, 14, 17, 20, 24, 28, 33, 38, 43, 48, 54, 60, 67, 74, 81, 88, 96, 104, 113, 122, 131, 140, 150, 160, 171, 182, 193, 204, 216, 228, 241, 254, 267, 280, 294, 308, 323, 338, 353, 368, 384, 400, 417, 434, 451, 468, 486, 504
Offset: 0

Views

Author

N. J. A. Sloane, Sep 02 2000

Keywords

Programs

  • Mathematica
    Round[Range[0,60]^2/6] (* or *) LinearRecurrence[{2,-1,0,0,0,1,-2,1},{0,0,1,2,3,4,6,8},60] (* Harvey P. Dale, Oct 11 2020 *)

Formula

G.f.: -x^2*(1+x^4) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^3 ). - R. J. Mathar, Jul 10 2015
a(n) = A056827(n)+A088911(n+3). - R. J. Mathar, Jul 10 2015

A117907 Expansion of x + (1-x)^2/(1-x^6).

Original entry on oeis.org

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

Views

Author

Paul Barry, Apr 01 2006

Keywords

Comments

Diagonal sums of A117906.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 90); Coefficients(R!( x + (1-x)^2/(1-x^6) )); // G. C. Greubel, Oct 20 2021
    
  • Mathematica
    (* From Harvey P. Dale, Nov 29 2013 *)
    CoefficientList[Series[x+(1-x)^2/(1-x^6), {x,0,90}], x]
    Join[{1,-1}, LinearRecurrence[{-1,-1,-1,-1,-1}, {1,0,0,0,1}, 90]]
    PadRight[{1,-1}, 90, {1,-2,1,0,0,0}] (* End *)
  • Sage
    def A117907(n): return (-1)^n if (n<2) else (((5*n-1)//3)%2) - 3*bool(n%6==1)
    [A117907(n) for n in (0..90)] # G. C. Greubel, Oct 20 2021

Formula

G.f.: (1 +x^2 +x^3 +x^4 +x^5 +x^6)/(1 +x +x^2 +x^3 +x^4 +x^5).
a(n) = floor((5*n-1)/3) mod 2 - 3*[(n mod 6) = 1], n >= 2, with a(0) = 1, a(1) = -1. - G. C. Greubel, Oct 20 2021
Previous Showing 11-20 of 22 results. Next