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

A053993 The number phi_2(n) of Frobenius partitions that allow up to 2 repetitions of an integer in a row.

Original entry on oeis.org

1, 1, 3, 5, 9, 14, 24, 35, 55, 81, 120, 171, 248, 345, 486, 669, 920, 1246, 1690, 2256, 3014, 3984, 5253, 6870, 8970, 11618, 15022, 19306, 24745, 31557, 40154, 50845, 64244, 80850, 101501, 126982, 158514, 197218, 244865, 303143, 374497, 461435
Offset: 0

Views

Author

James Sellers, Apr 04 2000

Keywords

Comments

Sum of products of multiplicities of odd parts in all partitions of n (if there are no odd parts in a partition then product of multiplicities is considered to be 1). - Vladeta Jovovic, Feb 16 2005
The sequence A077285 is the same but with multiplicities of all parts.

Examples

			1 + x + 3*x^2 + 5*x^3 + 9*x^4 + 14*x^5 + 24*x^6 + 35*x^7 + 55*x^8 + ...
q^-1 + q^11 + 3*q^23 + 5*q^35 + 9*q^47 + 14*q^59 + 24*q^71 + 35*q^83 + ...
a(6) = 24 since the 5 partitions 6 = 5+1 = 4+2 = 3+2+1 = 2+2+2 each contribute 1, the 3 partitions 4+1+1 = 3+3 = 2+2+1+1 each contribute 2, the partition 3+1+1+1 contributes 3, the partition 2+1+1+1+1 contributes 4, and the partition 1+1+1+1+1+1 contributes 6 to give total 24 = 5*1 + 3*2 + 1*3 + 1*4 + 1*6. - _Michael Somos_, Mar 09 2011
		

References

  • George E. Andrews, Generalized Frobenius partitions, Memoirs of the American Mathematical Society, Number 301, May 1984.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)
          +add(b(n-i*j, i-1)*`if`(irem(i, 2)=1, j, 1), j=1..n/i)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 16 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + Sum[b[n-i*j, i-1] * If[Mod[i, 2] == 1, j, 1], {j, 1, n/i}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)
    QP = QPochhammer; s = QP[q^4] * (QP[q^6]^2 / (QP[q] * QP[q^2] * QP[q^3] * QP[q^12])) + O[q]^50; CoefficientList[s, q] (* Jean-François Alcover, Nov 09 2015, adapted from PARI *)
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^4 + A) * eta(x^6 + A)^2 / (eta(x + A) * eta(x^2 + A) * eta(x^3 + A) * eta(x^12 + A)), n))} /* Michael Somos, Mar 09 2011 */

Formula

Expansion of q^(1/12) * eta(q^4) * eta(q^6)^2 / (eta(q) * eta(q^2) * eta(q^3) * eta(q^12)) in powers of q. - Michael Somos, Mar 09 2011
Euler transform of period 12 sequence [ 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, ...]. - Michael Somos, Mar 09 2011
G.f.: (Product_{k>0} (1 - x^k) * (1 - x^(12*k - 10)) * (1 - x^(12*k - 9)) * (1 - x^(12*k - 3)) * (1 - x^(12*k - 2)))^(-1). [Andrews, p. 10, equation (5.9)]
a(n) ~ exp(2*Pi*sqrt(2*n)/3) / (6*sqrt(2)*n). - Vaclav Kotesovec, Nov 28 2015

A140944 Triangle T(n,k) read by rows, the k-th term of the n-th differences of the Jacobsthal sequence A001045.

Original entry on oeis.org

0, 1, 0, -1, 2, 0, 3, -2, 4, 0, -5, 6, -4, 8, 0, 11, -10, 12, -8, 16, 0, -21, 22, -20, 24, -16, 32, 0, 43, -42, 44, -40, 48, -32, 64, 0, -85, 86, -84, 88, -80, 96, -64, 128, 0, 171, -170, 172, -168, 176, -160, 192, -128, 256, 0, -341, 342, -340, 344, -336, 352, -320, 384, -256, 512, 0
Offset: 0

Views

Author

Paul Curtz, Jul 24 2008

Keywords

Comments

A variant of the triangle A140503, now including the diagonal.
Since the diagonal contains zeros, rows sums are those of A140503.

Examples

			Triangle begins as:
    0;
    1,   0;
   -1,   2,   0;
    3,  -2,   4,  0;
   -5,   6,  -4,  8,   0;
   11, -10,  12, -8,  16,  0;
  -21,  22, -20, 24, -16, 32,  0;
		

Crossrefs

Programs

  • Magma
    [2^k*(1-(-2)^(n-k))/3: k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 18 2023
    
  • Maple
    A001045:= n -> (2^n-(-1)^n)/3;
    A140944:= proc(n,k) if n = 0 then A001045(k); else procname(n-1,k+1)-procname(n-1,k) ; fi; end:
    seq(seq(A140944(n,k),k=0..n),n=0..10); # R. J. Mathar, Sep 07 2009
  • Mathematica
    T[0, 0]=0; T[1, 0]= T[0, 1]= 1; T[0, k_]:= T[0, k]= T[0, k-1] + 2*T[0, k-2]; T[n_, n_]=0; T[n_, k_]:= T[n, k] = T[n-1, k+1] - T[n-1, k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2014 *)
    Table[2^k*(1-(-2)^(n-k))/3, {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2023 *)
  • PARI
    T(n, k) = (2^k - 2^n*(-1)^(n+k))/3 \\ Jianing Song, Aug 11 2022
    
  • SageMath
    def A140944(n,k): return 2^k*(1 - (-2)^(n-k))/3
    flatten([[A140944(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Feb 18 2023

Formula

T(n, k) = T(n-1, k+1) - T(n-1, k). T(0, k) = A001045(k).
T(n, k) = (2^k - 2^n*(-1)^(n+k))/3, for n >= k >= 0. - Jianing Song, Aug 11 2022
From G. C. Greubel, Feb 18 2023: (Start)
T(n, n-1) = A000079(n).
T(2*n, n) = (-1)^(n+1)*A192382(n+1).
T(2*n, n-1) = (-1)^n*A246036(n-1).
T(2*n, n+1) = A083086(n).
T(3*n, n) = -A115489(n).
Sum_{k=0..n} T(n, k) = A052992(n)*[n>0] + 0*[n=0].
Sum_{k=0..n} (-1)^k*T(n, k) = A045883(n).
Sum_{k=0..n} 2^k*T(n, k) = A084175(n).
Sum_{k=0..n} (-2)^k*T(n, k) = (-1)^(n+1)*A109765(n).
Sum_{k=0..n} 3^k*T(n, k) = A091056(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^(n+1)*A097038(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^(n+1)*A138495(n). (End)

Extensions

Edited and extended by R. J. Mathar, Sep 07 2009

A281146 Binary representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 515", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 10, 100, 1000, 10100, 101000, 1010100, 10101000, 101010100, 1010101000, 10101010100, 101010101000, 1010101010100, 10101010101000, 101010101010100, 1010101010101000, 10101010101010100, 101010101010101000, 1010101010101010100, 10101010101010101000
Offset: 0

Views

Author

Robert Price, Feb 22 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 515; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 10], {i, 1, stages - 1}]

Formula

Conjectures from Colin Barker, Feb 22 2017: (Start)
a(n) = 100*(10^n - 1) / 99 for n>1 and even.
a(n) = 100*(10^n - 10) / 99 for n>1 and odd.
a(n) = 10*a(n-1) + a(n-2) - 10*a(n-3) for n>2.
G.f.: (1 - x^2 + 100*x^4) / ((1 - x)*(1 + x)*(1 - 10*x)).
(End)

A339694 Triangle read by rows: A(n, k) = Sum_{i=0..n-1} x(i, k)*2^i, where x(i, k) = A014682^(i)(k) (mod 2) using the i-th iteration of A014682.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 0, 5, 2, 3, 4, 1, 6, 7, 0, 5, 10, 3, 4, 1, 6, 7, 8, 13, 2, 11, 12, 9, 14, 15, 0, 21, 10, 3, 20, 17, 6, 23, 8, 29, 2, 11, 12, 9, 14, 15, 16, 5, 26, 19, 4, 1, 22, 7, 24, 13, 18, 27, 28, 25, 30, 31, 0, 21, 42, 35, 20, 17, 6, 23, 40, 29, 34, 11
Offset: 1

Views

Author

Sebastian Karlsson, Dec 13 2020

Keywords

Comments

A(n, k) is periodic with period 2^n, i.e., A(n, k) = A(n, k + 2^n). Each row in the triangle is therefore [A(n, 0), A(n, 1), ..., A(n, 2^n-1)].
The binary modular Collatz graph C(n) is the graph representing the dynamics of the Collatz function (A014682) modulo 2^n. For example, in C(3), there is an arrow from 3 to 5 and from 3 to 1 because any number that is 3 modulo 8 either gets mapped to 5 modulo 8 or 1 modulo 8. The vertices of the de Bruijn graph B(2,n) are words of length n consisting of the two symbols 0 and 1. If one represents these vertices as integers, b_0 b_1 ... b_{n-1} -> Sum_{i=0..n-1} b_i*2^i, then A(n) : C(n) -> B(2,n) is a graph isomorphism [Laarhoven, de Weger].
The n-th row is a permutation on the set {0..2^n-1}. For n > 5, the order of this permutation is 2^(n-4) [Bernstein, Lagarias]. - Sebastian Karlsson, Jan 17 2021

Examples

			Triangle begins:
n=1 : 0 1;
n=2 : 0 1  2 3;
n=3 : 0 5  2 3 4 1 6 7;
n=4 : 0 5 10 3 4 1 6 7 8 13 2 11 12 9 14 15;
...
A(3, 4) = Sum_{i=0..2} x(i, 4)*2^i = 0*2^0 + 0*2^1 + 1*2^2 = 4.
A(4, 1) = Sum_{i=0..3} x(i, 1)*2^i = 1*2^0 + 0*2^1 + 1*2^2 + 0*2^3 = 5.
		

Crossrefs

Cf. A000004 (column 0), A052992 (column 1), A263053 (column 2).

Programs

  • Mathematica
    A339694row[n_]:=Table[Sum[Mod[Nest[If[OddQ[#],(3#+1)/2,#/2]&,k,i],2]2^i,{i,0,n-1}],{k,0,2^n-1}];Array[A339694row,6] (* Paolo Xausa, Aug 08 2023 *)
  • PARI
    f(n) = if(n%2, 3*n+1, n)/2 \\ A014682
    x(i, n) = my(x=n); for (k=1, i, x = f(x)); x % 2;
    A(n, k) = sum(i=0, k-1, x(i, n)*2^i);
    row(n) = vector(2^n, i, A(i-1, n));
    tabf(nn) = for (n=1, nn, print(row(n))); \\ Michel Marcus, Dec 21 2020
  • Python
    def A014682(k):
        if k % 2 == 0:
            return k // 2
        else:
            return (3*k + 1) // 2
    def x(i, k):
        while i > 0:
            k = A014682(k)
            i = i - 1
        return k % 2
    def A(n, k):
        L = [x(i, k) * 2**i for i in range(0, n)]
        return sum(L)
    

Formula

A000120( T(n, (m + 1) mod 2^n) ) = log_3( A014682^n(m + 1 + 2^n) - A014682^n(m + 1) ), m = 0..2^n-1. (A000120 is the binary weight.) - Thomas Scheuerle, Aug 23 2021

A093833 3^n-Jacobsthal(n).

Original entry on oeis.org

1, 2, 8, 24, 76, 232, 708, 2144, 6476, 19512, 58708, 176464, 530076, 1591592, 4777508, 14337984, 43024876, 129096472, 387333108, 1162086704, 3486434876, 10459654152, 31379661508, 94140382624, 282423944076, 847277424632
Offset: 0

Views

Author

Paul Barry, Apr 17 2004

Keywords

Comments

Binomial transform of A052992. Binomial transform is A093834. Partial sums are A004054. Sums of consecutive pairs yield A053581.
Contribution from Johannes W. Meijer, Aug 15 2010: (Start)
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 343, 349, 373 and 469, lead to this sequence. For the central square these vectors lead to the companion sequence A175659.
(End)

Formula

G.f.: (1-x)^2/((1+x)(1-2x)(1-3x)); a(n)=3^n-2^n/3+(-1)^n/3; a(n)=3^n-A001045(n).

A117413 Expansion of (1-x^2)/(1-2*x^2+4*x^3+x^4).

Original entry on oeis.org

1, 0, 1, -4, 1, -12, 17, -24, 81, -104, 241, -508, 817, -1876, 3425, -6512, 13537, -24848, 49697, -97332, 185249, -368604, 710129, -1380872, 2709425, -5233656, 10232209, -19924140, 38689617, -75543460, 146843585, -285921248, 557171393, -1083673376, 2111184193, -4110111076
Offset: 0

Views

Author

Paul Barry, Mar 14 2006

Keywords

Comments

Diagonal sums of number triangle A117411.

Crossrefs

Cf. A117411.

Programs

  • Magma
    I:=[1,0,1,-4]; [n le 4 select I[n] else 2*Self(n-1) -4*Self(n-2) -Self(n-3): n in [1..41]]; // G. C. Greubel, Sep 07 2022
    
  • Mathematica
    CoefficientList[Series[(1-x^2)/(1-2x^2+4x^3+x^4),{x,0,40}],x] (* or *) LinearRecurrence[{0,2,-4,-1},{1,0,1,-4},40] (* Harvey P. Dale, Jul 12 2017 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A117413
        if(n<4): return (1, 0, 1, -4)[n]
        else: return 2*a(n-2) - 4*a(n-3) - a(n-4)
    [a(n) for n in (0..40)] # G. C. Greubel, Sep 07 2022

Formula

a(n) = 2*a(n-2) - 4*a(n-3) - a(n-4).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2*k} C(n-k, k-j)*C(j, n-2*k)*(-4)^(n-2*k).
a(n) = (-)^n*A052992(2*n). - R. J. Mathar, Nov 22 2024

A164925 Array, binomial(j-i,j), read by rising antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, -1, 0, 1, 1, -2, 0, 0, 1, 1, -3, 1, 0, 0, 1, 1, -4, 3, 0, 0, 0, 1, 1, -5, 6, -1, 0, 0, 0, 1, 1, -6, 10, -4, 0, 0, 0, 0, 1, 1, -7, 15, -10, 1, 0, 0, 0, 0, 1, 1, -8, 21, -20, 5, 0, 0, 0, 0, 0, 1, 1, -9, 28, -35, 15, -1, 0, 0, 0, 0, 0, 1, 1, -10, 36, -56, 35, -6, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Mark Dols, Aug 31 2009

Keywords

Comments

Inverse of A052509, or A004070???

Examples

			Array, A(n, k), begins as:
  1,  1,  1,   1,  1,   1,  1,  1,  1, ...
  1,  0,  0,   0,  0,   0,  0,  0,  0, ...
  1, -1,  0,   0,  0,   0,  0,  0,  0, ...
  1, -2,  1,   0,  0,   0,  0,  0,  0, ...
  1, -3,  3,  -1,  0,   0,  0,  0,  0, ...
  1, -4,  6,  -4,  1,   0,  0,  0,  0, ...
  1, -5, 10, -10,  5,  -1,  0,  0,  0, ...
  1, -6, 15, -20, 15,  -6,  1,  0,  0, ...
  1, -7, 21, -35, 35, -21,  7, -1,  0, ...
Antidiagonal triangle, T(n, k), begins as:
  1;
  1,  1;
  1,  0,  1;
  1, -1,  0,  1;
  1, -2,  0,  0,  1;
  1, -3,  1,  0,  0,  1;
  1, -4,  3,  0,  0,  0,  1;
  1, -5,  6, -1,  0,  0,  0,  1;
  1, -6, 10, -4,  0,  0,  0,  0,  1;
		

Crossrefs

Programs

  • Magma
    A164925:= func< n,k | k eq 0 or k eq n select 1 else Binomial(2*k-n,k) >;
    [A164925(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 10 2023
    
  • Mathematica
    T[n_, k_]:= If[k==0 || k==n, 1, Binomial[2*k-n, k]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 10 2023 *)
  • PARI
    {A(i, j) = if( i<0, 0, if(i==0 || j==0, 1, binomial(j-i, j)))}; /* Michael Somos, Jan 25 2012 */
    
  • SageMath
    def A164925(n,k): return 1 if (k==0 or k==n) else binomial(2*k-n, k)
    flatten([[A164925(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Feb 10 2023

Formula

Sum_{k=0..n} T(n, k) = A164965(n). - Mark Dols, Sep 02 2009
From G. C. Greubel, Feb 10 2023: (Start)
A(n, k) = binomial(k-n, k), with A(0, k) = A(n, 0) = 1 (array).
T(n, k) = binomial(2*k-n, k), with T(n, 0) = T(n, n) = 1 (antidiagonal triangle).
Sum_{k=0..n} (-1)^k*T(n, k) = A008346(n).
Sum_{k=0..n} (-2)^k*T(n, k) = (-1)^n*A052992(n). (End)

Extensions

Edited by Michael Somos, Jan 26 2012
Offset changed by G. C. Greubel, Feb 10 2023

A263053 Number of (n+1) X 2 0..1 arrays with each row and column not divisible by 3, read as a binary number with top and left being the most significant bits.

Original entry on oeis.org

2, 2, 10, 10, 42, 42, 170, 170, 682, 682, 2730, 2730, 10922, 10922, 43690, 43690, 174762, 174762, 699050, 699050, 2796202, 2796202, 11184810, 11184810, 44739242, 44739242, 178956970, 178956970, 715827882, 715827882, 2863311530, 2863311530
Offset: 1

Views

Author

R. H. Hardin, Oct 08 2015

Keywords

Comments

Each row must be either 01 or 10. The two columns are therefore binary complements with sum 2^k-1, where k = n + 1 is the number of rows. If k is even then 2^k-1 is divisible by 3 and the number of solutions is 2*(2^k-1)/3. If k is odd then 2^k-1 == 1 (mod 3) and the number of solutions is (2^k-2)/3. - Andrew Howroyd, Feb 03 2022

Examples

			All solutions for n=4:
  0 1   0 1   1 0   1 0   1 0   0 1   1 0   1 0   0 1   0 1
  0 1   0 1   0 1   1 0   0 1   1 0   1 0   0 1   1 0   1 0
  1 0   0 1   0 1   1 0   1 0   1 0   0 1   1 0   0 1   0 1
  0 1   1 0   0 1   0 1   1 0   1 0   1 0   0 1   1 0   0 1
  1 0   0 1   1 0   1 0   1 0   0 1   0 1   0 1   1 0   0 1
		

Crossrefs

Column 1 of A263060.
Cf. A052992.

Programs

  • Python
    [int(2**n - 2/3 -((-2)**n)/3) for n in range(1,40)] # Pascal Bisson, Feb 03 2022

Formula

a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3).
From Colin Barker, Jan 01 2019: (Start)
G.f.: 2*x / ((1 - x)*(1 - 2*x)*(1 + 2*x)).
a(n) = 2^n - 2/3 - (-2)^n/3.
(End)
a(n) = 2*A052992(n). - Pascal Bisson, Feb 03 2022

A247661 The number phi_4(n) of Frobenius partitions that allow up to 4 repetitions of an integer in a row.

Original entry on oeis.org

1, 1, 3, 6, 12, 20, 35, 56, 92, 142, 221, 330, 496, 724, 1056, 1512, 2155, 3028, 4240, 5866, 8085
Offset: 0

Views

Author

N. J. A. Sloane, Oct 05 2014

Keywords

References

  • George E. Andrews, Generalized Frobenius partitions, Memoirs of the American Mathematical Society, Number 301, May 1984.

Crossrefs

A247662 The number phi_5(n) of Frobenius partitions that allow up to 5 repetitions of an integer in a row.

Original entry on oeis.org

1, 1, 3, 6, 12, 21, 37, 60, 99, 156, 244, 371, 561, 829, 1218, 1763, 2532, 3594, 5068, 7075, 9819
Offset: 0

Views

Author

N. J. A. Sloane, Oct 05 2014

Keywords

References

  • George E. Andrews, Generalized Frobenius partitions, Memoirs of the American Mathematical Society, Number 301, May 1984.

Crossrefs

Showing 1-10 of 10 results.