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 21 results. Next

A352509 Numbers k such that k and k+1 are both Catalan-Niven numbers (A352508).

Original entry on oeis.org

1, 4, 5, 9, 32, 44, 55, 56, 134, 144, 145, 146, 155, 184, 234, 324, 329, 414, 426, 429, 434, 455, 511, 512, 603, 636, 930, 1004, 1014, 1160, 1183, 1215, 1287, 1308, 1448, 1472, 1505, 1562, 1595, 1808, 1854, 1967, 1985, 1995, 2051, 2075, 2096, 2135, 2165, 2255
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2022

Keywords

Examples

			4 is a term since 4 and 5 are both Catalan-Niven numbers: the Catalan representation of 4, A014418(20) = 20, has the sum of digits 2+0 = 2 and 4 is divisible by 2, and the Catalan representation of 5, A014418(5) = 100, has the sum of digits 1+0+0 = 1 and 5 is divisible by 1.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := c[n] = CatalanNumber[n]; q[n_] := Module[{s = {}, m = n, i}, While[m > 0, i = 1; While[c[i] <= m, i++]; i--; m -= c[i]; AppendTo[s, i]]; Divisible[n, Plus @@ IntegerDigits[Total[4^(s - 1)], 4]]]; Select[Range[2300], q[#] && q[#+1] &]

A259667 Catalan numbers mod 6.

Original entry on oeis.org

1, 1, 2, 5, 2, 0, 0, 3, 2, 2, 2, 4, 4, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 4, 4, 1, 0, 0, 0, 4, 4, 4, 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, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 4, 4, 4, 0, 0, 0, 4, 4, 4, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 2, 2, 2, 0, 0, 0, 2, 2, 2, 4
Offset: 0

Views

Author

M. F. Hasler, Nov 08 2015

Keywords

Comments

The only odd terms are those with indices n = 2^k - 1 (k = 0, 1, 2, 3, ...); see also A038003.
It is conjectured that the only k which yield a(2^k-1) = 1 are k = 0, 1 and 5. Are there other k than 2 and 8 that yield a(2^k-1) = 5? Otherwise said, is a(2^k-1) = 3 for all k > 8?
The question is equivalent to: does 2^k - 1 always contain a digit 2 when converted into base 3 for all k > 8? Similar conjecture has been proposed for 2^k, see A004642. - Jianing Song, Sep 04 2018

Crossrefs

Programs

  • Mathematica
    Mod[CatalanNumber[Range[0,120]],6] (* Harvey P. Dale, Oct 24 2020 *)
  • PARI
    a(n)=binomial(2*n,n)/(n+1)%6
    
  • PARI
    A259667(n)=lift(if(n%3!=1,binomod(2*n+1,n,6)/(2*n+1), if(bittest(n,0),binomod(2*n,n-1,6)/n,binomod(2*n,n,6)/(n+1)))) \\ using binomod.gp by M. Alekseyev, cf. Links.

Formula

a(n) = A000108(n) mod 6.

A152670 Even Catalan numbers.

Original entry on oeis.org

2, 14, 42, 132, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 35357670, 129644790, 477638700, 1767263190, 6564120420, 24466267020, 91482563640, 343059613650, 1289904147324, 4861946401452, 18367353072152, 69533550916004
Offset: 1

Views

Author

Omar E. Pol, Dec 10 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[CatalanNumber[Range[30]], EvenQ] (* Vladimir Reshetnikov, Nov 02 2015 *)
  • PARI
    lista(nn) = for (n=1, nn, if (((c=binomial(2*n,n)/(n+1)) % 2) == 0, print1(c, ", "))); \\ Michel Marcus, Nov 02 2015

A379152 The binary weights of the odd Catalan numbers.

Original entry on oeis.org

1, 1, 2, 6, 16, 25, 60, 127, 244, 494, 1010, 2015, 4076, 8086, 16281, 32818, 65518, 131059, 262348, 524448, 1047643, 2097675, 4194133, 8386693, 16776916, 33554390, 67114125, 134214652, 268452748
Offset: 0

Views

Author

Amiram Eldar, Dec 17 2024

Keywords

Crossrefs

Similar sequences: A011373, A079584, A082481, A379151, A379153.

Programs

  • Mathematica
    a[n_] := DigitCount[CatalanNumber[2^n-1], 2, 1]; Array[a, 23, 0]
  • PARI
    a(n) = my(m = -1 + 1 << n); hammingweight(binomial(2*m, m)/(m+1));
    
  • Python
    from itertools import count, islice
    def A379152_gen(): # generator of terms
        yield from [1,1]
        c, s = 1, 3
        for n in count(2):
            c = (c*((n<<2)-2))//(n+1)
            if n == s:
                yield c.bit_count()
                s = (s<<1)|1
    A379152_list = list(islice(A379152_gen(),10)) # Chai Wah Wu, Dec 17 2024

Formula

a(n) = A000120(A038003(n)) = A000120(A000108(2^n-1)).
a(n) = A379151(2^n-1).

A135759 Least Catalan number divisible by 2^n: a(n) = A000108(2^(n+1)-2).

Original entry on oeis.org

1, 2, 132, 2674440, 3814986502092304, 24139737743045626825711458546273312, 2861304849265668492891140780463352404986232263244287143198790516197234752
Offset: 0

Views

Author

Paul D. Hanna, Dec 02 2007

Keywords

Comments

The next term has 150 digits. - Harvey P. Dale, Jan 09 2017

Crossrefs

Cf. A038003 (odd Catalan numbers).

Programs

  • Mathematica
    Table[Binomial[2^(n + 2) - 4, 2^(n + 1) - 2]/(2^(n + 1) - 1), {n,0,10}] (* G. C. Greubel, Nov 07 2016 *)
    Table[SelectFirst[CatalanNumber[Range[300]],Divisible[#,2^n]&],{n,0,7}] (* Harvey P. Dale, Jan 09 2017 *)
  • PARI
    {a(n) = binomial(2^(n+2)-4, 2^(n+1)-2) / (2^(n+1)-1)}
    for(n=0,8,print1(a(n),", "))

Formula

a(n) = C(2^(n+2)-4, 2^(n+1)-2) / (2^(n+1)-1).

A178854 Asymptotic value of odd Catalan numbers mod 2^n.

Original entry on oeis.org

0, 1, 1, 5, 13, 29, 29, 93, 221, 221, 733, 1757, 3805, 7901, 7901, 24285, 57053, 122589, 122589, 384733, 384733, 384733, 2481885, 2481885, 10870493, 10870493, 10870493, 10870493, 145088221
Offset: 0

Views

Author

David A. Madore, Jun 18 2010

Keywords

Comments

For every n, the odd Catalan numbers C(2^m-1) are eventually constant mod 2^n (namely for m >= n-1): then a(n) is the asymptotic value of the remainder.

Examples

			The odd Catalan numbers mod 2^6=64 are 1,5,45,61,29,29,29, so a(6)=29.
		

Crossrefs

Cf. A038003 (odd Catalan numbers).

Programs

  • Maple
    A000108 := proc(n) binomial(2*n,n)/(n+1) ; end proc:
    A038003 := proc(n) A000108(2^n-1) ; end proc:
    A178854 := proc(n) if n = 0 then 0; else modp(A038003(n-1),2^n) ; end if; end proc:
    for n from 0 do printf("%d,\n",A178854(n)) ; end do: # R. J. Mathar, Jun 28 2010
  • Mathematica
    (* first do *) Needs["DiscreteMath`CombinatorialFunctions`"] (* then *) f[n_] := Mod[ CatalanNumber[2^n - 1], 2^n]; Array[f, 25, 0] (* Robert G. Wilson v, Jun 28 2010 *)

Formula

a(n) = remainder(Catalan(2^m-1), 2^n) for any m >= n-1.

Extensions

a(12)-a(24) from Robert G. Wilson v, Jun 28 2010
a(25)-a(28) from Robert G. Wilson v, Jul 23 2010

A060318 Powers of 3 in the odd Catalan numbers Catalan(2^n - 1).

Original entry on oeis.org

0, 0, 1, 2, 0, 1, 3, 0, 3, 3, 3, 6, 2, 2, 9, 5, 5, 4, 8, 5, 9, 10, 5, 4, 4, 4, 9, 9, 8, 11, 13, 13, 10, 11, 10, 8, 6, 12, 13, 14, 13, 11, 14, 15, 16, 13, 11, 10, 12, 18, 20, 19, 20, 11, 13, 19, 22, 18, 15, 26, 20, 17, 17, 26, 21, 22, 18, 18, 23, 26, 20, 19, 23, 21, 22, 19, 27, 17, 35
Offset: 1

Views

Author

Wouter Meeussen, Mar 28 2001

Keywords

Comments

Conjecture: all odd Catalan numbers have smallest prime factor 3, except Catalan(3), which has smallest prime factor 5, and Catalan(31) and Catalan(255), which have smallest prime factor 7 (checked up to Catalan(-1 + 2^2048)).

Examples

			a(5)=0 because 2^5 -1 = 31 and Catalan(31) = 7*11*17*19*37*41*43*47*53*59*61 so the power of 3 is zero.
		

Crossrefs

Programs

  • Mathematica
    pow3[ nfac_ ] := (nfac - Plus @@ IntegerDigits[ nfac, 3 ])/(3-1); powcat3[ n_ ] := pow3[ 2n ]-pow3[ n+1 ]-pow3[ n ]; Table[ powcat3[ 2^n-1 ], {n, 2048} ]

Formula

a(n) = A007949(A038003(n)). - Michel Marcus, Feb 02 2020

A116943 Number of 4s digits plus non-final 3s digits 3 base 5 expansion of 2^n.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 3, 2, 2, 2, 1, 1, 3, 4, 5, 3, 3, 1, 4, 4, 7, 2, 7, 7, 4, 6, 9, 9, 6, 5, 5, 7, 4, 9, 4, 7, 7, 7, 10, 8, 6, 8, 6, 9, 8, 9, 8, 10, 11, 11, 8, 13, 5, 11, 15, 13, 10, 10, 8, 12, 9, 14, 11, 8, 11, 12, 10, 13, 13, 13, 10, 10, 12, 6, 10, 15, 8, 17, 17, 16, 16, 12, 16, 15, 13
Offset: 0

Views

Author

Jonathan Vos Post, Mar 23 2006

Keywords

Comments

In his comment on A038003 Frank Adams-Watters conjectures "that 2^n contains such a base 5 digit for n>=9. This is almost certainly true." That is equivalent to a(n) > 0 for n>=9, which is also equivalent to A094389(n) = 5 where A094389 is last decimal digit of the odd Catalan number A038003(n).

Examples

			a(7) = 0 because 2^7 (modulo 5) = 1003, which contains 0 digits 4 plus 0 non-final digits 3 (it has a digit 3, but that digit is finial, meaning rightmost).
a(10) = 3 because 2^10 mod 5 = 13044, which contains 2 digits 4 plus 1 non-final digits 3, so 2 + 1 = 3.
a(60) = 10 because 2^60 mod 5 = 34132411211412413323100401, which contains 5 digits 4 plus 5 non-final digits 3, so 5 + 5 = 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{id = IntegerDigits[2^n, 5]}, Count[id, 4] + Count[Most@id, 3]]; Table[ f[n], {n, 0, 88}] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Apr 01 2006

A152753 Last digit of even Catalan number A152670(n).

Original entry on oeis.org

2, 4, 2, 2, 0, 2, 6, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 2, 4, 0, 8, 4, 8, 0, 4, 2, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 6, 2, 0, 4, 2, 2, 4, 0, 2, 6, 6, 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
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2008

Keywords

Comments

Even values of A152669.

Crossrefs

A201823 Terms of A001764 not divisible by 3, where A001764 enumerates ternary trees.

Original entry on oeis.org

1, 1, 55, 300830572, 1414282077098335379544565517191
Offset: 0

Views

Author

Paul D. Hanna, Dec 05 2011

Keywords

Comments

The number of digits for the terms begin:
[1, 1, 2, 9, 31, 97, 298, 902, 2715, 8155, 24478, 73446, 220354, ...].

Examples

			Sequence A001764 begins: [1, 1, 3, 12, 55, 273, 1428, 7752, 43263, 246675, ...],
where A001764(n) == 1 (mod 3) at positions: [0, 1, 4, 13, 40, 121, 364, 1093, ...].
		

Crossrefs

Programs

  • PARI
    a(n)=binomial(3*(3^n-1)/2,(3^n-1)/2)/3^n

Formula

a(n) = A001764( (3^n-1)/2 ) = binomial( 3*(3^n-1)/2, (3^n-1)/2 ) / 3^n.
a(n) == 1 (mod 3).
Previous Showing 11-20 of 21 results. Next