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.

A039967 Duplicate of A039969.

Original entry on oeis.org

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

Views

Author

Keywords

A085296 Runs of zeros in Catalan sequence modulo 3: consecutive occurrences of binomial(2*k,k)/(k+1) == 0 (mod 3).

Original entry on oeis.org

3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 363, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 1092, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 363, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 3279, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3
Offset: 1

Views

Author

Paul D. Hanna, Jun 24 2003

Keywords

Comments

When we prepend a '1' to the Catalan sequence modulo 3, the only nonzero digit strings are {1,1,1,2,2,2} and {2,2,2,1,1,1}; see A085297 for the occurrences of these digit strings.

Crossrefs

Programs

  • Maple
    nmax:=79: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := (3^(p+2)-3)/2 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 11 2013
  • Mathematica
    Map[If[First@ # == 0, Length@ #, Nothing] &, SplitBy[Array[Mod[CatalanNumber@ #, 3] &, 10^4], # == 0 &]] (* Michael De Vlieger, Nov 02 2018 *)
  • PARI
    A085296(n) = if(n%2,3,3*(1+A085296(n/2))); \\ Antti Karttunen, Nov 01 2018

Formula

a(2*n-1) = 3, a(2*n) = 3*(a(n)+1), for n >= 1.
a(n) = (9 * 3^A007814(n) - 1) / 2 - 1. - Ralf Stephan, Oct 10 2003
From Johannes W. Meijer, Feb 11 2013: (Start)
a((2*n-1)*2^p) = (3^(p+2)-3)/2, p >= 0 and n >= 1. Observe that a(2^p) = A029858(p+2).
a(2^(p+3)*n + 2^(p+2) - 1) = a(2^(p+2)*n + 2^(p+1) - 1) for p >= 0 and n >= 1. (End)

A113047 a(n) = C(3n,n)/(2n+1) mod 3.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 11 2005

Keywords

Comments

a(n) differs from 0 only when n=(3^j-1)/2, j>=0. [Conjecture confirmed by Kevin Ryde, Jun 23 2021; see links]
Characteristic function of the ternary repunits, a(n) = 1 iff n is a ternary repunit (A003462). - Kevin Ryde, Jun 23 2021

Crossrefs

Cf. A001764, A003462 (indices of 1's), A010872, A039969.

Programs

  • Mathematica
    Table[Mod[Binomial[3 n, n]/(2 n + 1), 3], {n, 0, 72}] (* Michael De Vlieger, Mar 24 2015 *)
  • PARI
    A113047(n) = ((binomial(3*n,n)/(n+n+1))%3); \\ Antti Karttunen, Aug 28 2017
    
  • PARI
    a(n) = while(n, my(r);[n,r]=divrem(n,3); if(r!=1,return(0))); 1; \\ Kevin Ryde, Jun 23 2021

Formula

G.f.: A(x) satisfies A(x)=1+x*A(x^3). - Vladimir Kruchinin, Mar 24 2015
a(n) = A001764(n) mod 3. - Michel Marcus, Mar 24 2015
a(n) = floor(log_3(2*n + 1)) - floor(log_3(2*n - 1)), for n>=1. - Ridouane Oudra, Aug 24 2021

Extensions

More terms from Antti Karttunen, Aug 28 2017

A039972 An example of a d-perfect sequence: a(n) = A007317(n) mod 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Odd bisection seems to be A006996. See also A039969. - Antti Karttunen, Aug 15 2017

Crossrefs

Programs

  • PARI
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A039972_as_a_vector(size)= { my(A=vector(size)); for(j=1, size, A[j]=1+sum(k=1, j-1, A[k]*A[j-k])); apply(n->(n%3),A); }; \\ After Michael Somos' May 23 2005 code for A007317 and Christian G. Bower's formula for A039972.
    write_to_bfile(1,A039972_as_a_vector(6561),"b039972_upto6561.txt"); \\ Antti Karttunen, Aug 15 2017

Formula

a(n) = A007317(n) mod 3. - Christian G. Bower, Jun 12 2005

Extensions

More terms from Christian G. Bower, Jun 12 2005
Formula added to the name by Antti Karttunen, Aug 15 2017

A352409 G.f. A(x) satisfies: [x^(n+1)] (1+x - x^2*A(x))^(n*(2*n+1)) = 0, for n >= 0.

Original entry on oeis.org

1, 3, 45, 1267, 51597, 2761539, 182885885, 14415019395, 1316237331069, 136512958750979, 15842506286290173, 2033176597680449283, 285833727841312233725, 43677225803116362273795, 7207197437612731825348605, 1277141936892060488486787075
Offset: 0

Views

Author

Paul D. Hanna, Mar 15 2022

Keywords

Comments

Conjectures:
(1) a(3*n) = A039969(n) (mod 3) = A000108(n) (mod 3) for n >= 0, where A000108 is the Catalan sequence.
(2) a(3*n+1) = 0 (mod 3) for n >= 0.
(3) a(3*n+2) = 0 (mod 3) for n >= 0.
(4) a(n) = 1 (mod 2) for n >= 0.

Examples

			G.f.: A(x) = 1 + 3*x + 45*x^2 + 1267*x^3 + 51597*x^4 + 2761539*x^5 + 182885885*x^6 + 14415019395*x^7 + 1316237331069*x^8 + ...
Related table.
The table of coefficients of x^k in (1+x - x^2*A(x))^(n*(2*n+1)) begins:
n=0: [1,  0,    0,     0,       0,        0,         0, ...];
n=1: [1,  3,    0,   -14,    -153,    -4059,   -162214, ...];
n=2: [1, 10,   35,     0,    -825,   -17758,   -642015, ...];
n=3: [1, 21,  189,   847,       0,   -55818,  -1835218, ...];
n=4: [1, 36,  594,  5772,   32715,        0,  -4524660, ...];
n=5: [1, 55, 1430, 23100,  252450,  1762706,         0, ...];
n=6: [1, 78, 2925, 69836, 1179672, 14597856, 122423756, 0, ...];
...
in which a diagonal equals all zeros, illustrating that
[x^(n+1)] (1+x - x^2*A(x))^(n*(2*n+1)) = 0, for n >= 0.
Congruence modulo 3:
(1) The terms of this sequence appear to be divisible by 3 when the index is not divisible by 3:
a(3*n+k) = 0 (mod 3) for n >= 0 and k = 1 or 2.
(2) For the terms a(3*n), the residues modulo 3 begin:
a(3*n) (mod 3) = [1, 1, 2, 2, 2, 0, 0, 0, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 1, 1, 1, 0, ...],
which appears to be congruent to the Catalan sequence A000108 modulo 3; i.e.,
a(3*n) = binomial(2*n,n)/(n+1) (mod 3), for n >= 0.
The above conjectures have been verified for the initial 1201 terms of this sequence.
		

Crossrefs

Programs

  • PARI
    {a(n) = my(A=[1]); for(i=1,n, A=concat(A,0); m=#A;
    A[#A] = polcoeff( (1+x - x^2*Ser(A))^(m*(2*m+1)) / (m*(2*m+1)) ,m+1););A[n+1]}
    for(n=0,10,print1(a(n),", "))

Formula

Conjectures: g.f. A(x) = Sum_{n>=0} a(n)*x^n satisfies:
(1) A(x) = 1 + x^3*A(x)^2 (mod 3),
(2) A(x) = C(x^3) (mod 3) = C(x)^3 (mod 3), where C(x) = 1 + x*C(x)^2 is the Catalan function (A000108).
a(n) ~ c * 2^(3*n) * (n-1)! / (-LambertW(-2*exp(-2)) * (2 + LambertW(-2*exp(-2))))^n, where c = 0.87591174815917817179... - Vaclav Kotesovec, Mar 19 2022

A039970 An example of a d-perfect sequence: a(2*n) = 0, a(2*n+1) = Catalan(n) mod 3.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A039969.

Programs

  • Magma
    [n mod 2 eq 0 select 0 else Catalan(Floor((n-1)/2)) mod 3: n in [1..100]]; // G. C. Greubel, Feb 13 2019
  • Mathematica
    Table[If[IntegerQ[n/2], 0, Mod[CatalanNumber[(n-1)/2], 3]], {n, 1, 100}] (* G. C. Greubel, Feb 13 2019 *)
  • PARI
    A039969(n) = ((binomial(2*n, n)/(n+1))%3);
    A039970(n) = if(n%2,A039969((n-1)/2),0); \\ Antti Karttunen, Feb 13 2019
    
  • Sage
    def A039970(n):
        if (mod(n,2)==0):
            return 0
        else:
            return mod(catalan_number((n-1)/2), 3)
    [A039970(n) for n in (1..100)] # G. C. Greubel, Feb 13 2019
    

Formula

a(2*n) = 0, a(2*n+1) = A039969(n). - Christian G. Bower, Jun 12 2005, sign edited because of changed offset of A039969. - Antti Karttunen, Feb 13 2019

Extensions

More terms from Christian G. Bower, Jun 12 2005
Formula added to the name by Antti Karttunen, Feb 13 2019

A039975 An example of a d-perfect sequence: a(n) = A006318(n-1) mod 3.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A006318.
Cf. also A039969.

Programs

Formula

a(n) = A006318(n-1) mod 3. - Christian G. Bower, Jun 12 2005

Extensions

More terms from Christian G. Bower, Jun 12 2005
Bower's formula added to the name by Antti Karttunen, Feb 13 2019

A085297 Nonzero residues of Catalan sequence modulo 3; related to the Thue-Morse sequence (A001285).

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jun 24 2003

Keywords

Comments

The runs of zeros in between the digit strings are given in A085296.

Crossrefs

Cf. A001285 (Thue-Morse), A000108 (Catalan), A039969 (d-perfect), A085296.

Formula

If a leading '1' is added to the Catalan sequence modulo 3, the only nonzero digit strings are {1, 1, 1, 2, 2, 2} and {2, 2, 2, 1, 1, 1}. Replacing these digit strings with their first digit, {1, 1, 1, 2, 2, 2} -> '1' and {2, 2, 2, 1, 1, 1} -> '2', then omitting all zeros, results in the Thue-Morse sequence.

A113048 Binomial(4n,n)/(3n+1) mod 4.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 11 2005

Keywords

Comments

It would appear that the behavior of this sequence is determined by values of the Jacobsthal numbers J(n)=A001045(n): a(n)=1 only if n=J(2k),k=0,1,...; a(n)=2 only if n=J(2k+3)+2J(2j), some k,j>=0, otherwise a(n)=0.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Binomial[4n,n]/(3n+1),4],{n,0,120}] (* Harvey P. Dale, Mar 18 2018 *)

A159979 Lodumo_3 of Catalan numbers .

Original entry on oeis.org

1, 4, 2, 5, 8, 0, 3, 6, 11, 14, 17, 7, 10, 13, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 20, 23, 26, 16, 19, 22, 45, 48, 51, 25, 28, 31, 29, 32, 35, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129
Offset: 0

Views

Author

Philippe Deléham, Apr 28 2009

Keywords

Comments

Permutation of nonnegative integers.

Crossrefs

Formula

a(n)=lod_3(A000108(n)).

Extensions

99 inserted by R. J. Mathar, Apr 30 2009
Showing 1-10 of 10 results.