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

A085357 Common residues of binomial(3n,n)/(2n+1) modulo 2: relates ternary trees (A001764) to the infinite Fibonacci word (A003849).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 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 D. Hanna, Jun 25 2003

Keywords

Comments

The n-th runs of ones is given by: 3 - A003849(n) (infinite Fibonacci word) = A076662(n+1). Runs of zeros are given by: A085358 and are also directly related to the Fibonacci sequence. Coefficients of A(x)^3 are found in A085359.
a(n) = 0 iff some binary digit of n is 1 while the corresponding binary digit of 3*n is 0. - Robert Israel, Jul 12 2016
The Run Length Transform of [0,1,0,0,0,...], A063524, the characteristic function of 1. (See A227349 for the definition). - Antti Karttunen, Oct 15 2016

Crossrefs

Cf. A001764 (ternary trees), A085358 (runs of zeros), A076662 (runs of ones), A003849 (infinite Fibonacci word), A085359 (A(x)^3).
Absolute values of A132971.

Programs

  • Magma
    [Binomial(3*n,n) mod 2: n in [0..100]]; // Vincenzo Librandi, Jul 09 2016
    
  • Maple
    f:= proc(n) local L,Lp;
      L:= convert(n,base,2);
      Lp:= convert(3*n,base,2);
      if has(L-Lp[1..nops(L)],1) then 0 else 1 fi
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 12 2016
  • Mathematica
    Table[Mod[Binomial[3 n, n], 2], {n, 0, 120}] (* Michael De Vlieger, Jul 08 2016 *)
  • PARI
    A085357(n) = !bitand(n,n<<1); \\ Antti Karttunen, Aug 22 2019
    
  • Python
    def A085357(n): return int(not n&(n<<1)) # Chai Wah Wu, Jun 25 2025

Formula

G.f.: 1 + x*A(x)^3 = A(x) (Mod 2); a(n) = A001764(n) (Mod 2).
a(n) = binomial(3n, n) (mod 2). Characteristic function of Fibbinary numbers (i.e. a(n)=1 iff n is in A003714). - Benoit Cloitre, Nov 15 2003
Recurrence: a(0) = 1, a(2n) = a(4n+1) = a(n), a(4n+3) = 0.
a(n-2) = A000256(n)(mod 2), for n>2. - John M. Campbell, Jul 08 2016
a(n) = A000621(n+1)(mod 2). - John M. Campbell, Jul 15 2016
a(n) = A000625(n)(mod 2). - John M. Campbell, Jul 15 2016
a(n) = A008966(A005940(1+n)). [Follows from the Run Length Transform interpretation, see also A277010.] - Antti Karttunen, Oct 15 2016
a(n) = abs(A132971(n)) = abs(A008683(A005940(1+n))). - Antti Karttunen, May 30 2017

A268034 A268032 with repeated 1's removed.

Original entry on oeis.org

3, 5, 11, 3, 21, 3, 5, 43, 3, 5, 11, 3, 85, 3, 5, 11, 3, 21, 3, 5, 171, 3, 5, 11, 3, 21, 3, 5, 43, 3, 5, 11, 3, 341, 3, 5, 11, 3, 21, 3, 5, 43, 3, 5, 11, 3, 85, 3, 5, 11, 3, 21, 3, 5, 683, 3, 5, 11, 3, 21, 3, 5, 43, 3, 5
Offset: 1

Views

Author

Jeremy Gardiner, Jan 24 2016

Keywords

Comments

Records appear to be given by A001045 Jacobsthal numbers.
(a(n)-1)/2 appears to be A085358.
The terms between the A001045(n+3) are:
3
5
11
3,
21
3, 5,
43
3, 5, 11, 3,
85
3, 5, 11, 3, 21, 3, 5,
171
3, 5, 11, 3, 21, 3, 5, 43, 3, 5, 11, 3,
341
3, 5, 11, 3, 21, 3, 5, 43, 3, 5, 11, 3, 85, 3, 5, 11, 3, 21, 3, 5,
683
This gives the same sequence. Every column has the same number.
By rows, there are 0, 0, 1, 2, 4, 7, 12, 20, ... apparently = Fibonacci(n+1) - 1 = A000071 terms.
From Paul Curtz, Jan 26 2016: (Start)
a(n) is also in
0, 1, 1 0, 3, 0, 1, 5, 0, ... equivalent to A035614(n)
1, 1, 3, 1, 5, 1, 1, 11, 1, ... equivalent to A035612(n)
1, 3, 5, 1, 11, 1, 3, 21, 1, ... (compare to A268032)
3, 5, 11, 3, 21, 3, 5, 43, 3, ... a(n) (equivalent to a3(n) in A035612)
5, 11, 21, 5, 43, 5, 11, 85, 5, ...
etc.
Every vertical comes from A001045 (*).
Second row: first one removing all 0's.
Third row: second one removing a part of 1's respecting (*)
Fourth row: third one removing all 1's.
etc.
The offset 0 is homogeneous to these sequences. (End)

Examples

			A268032 begins 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 3, 1, 1, 1, 21, ... hence this sequence begins 3, 5, 11, 3, 21, ...
		

Crossrefs

A378578 G.f. A(x) equals the series obtained by removing all factors of 3 from the coefficients in 1 + x*A(x)^3.

Original entry on oeis.org

1, 1, 1, 2, 13, 19, 52, 412, 73, 1405, 11735, 20000, 7300, 388606, 664316, 2325118, 20832709, 11815463, 95438089, 861817318, 1495813613, 5231996647, 47291366710, 3025568936, 199838851432, 1828302724054, 3320026962314, 439614522008, 73390614310810, 131344935434920, 55179693272894, 3321671735661494
Offset: 0

Views

Author

Paul D. Hanna, Jan 03 2025

Keywords

Comments

Conjecture: a(n) == binomial(3*n,n)/(2*n+1) (mod 2) for n >= 0.

Examples

			G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 13*x^4 + 19*x^5 + 52*x^6 + 412*x^7 + 73*x^8 + 1405*x^9 + 11735*x^10 + 20000*x^11 + 7300*x^12 + ...
The expansion of A(x)^3 begins
A(x)^3 = 1 + 3*x + 6*x^2 + 13*x^3 + 57*x^4 + 156*x^5 + 412*x^6 + 1971*x^7 + 4215*x^8 + 11735*x^9 + 60000*x^10 + 197100*x^11 + ...
where g.f. A(x) is obtained by removing all factors of 3 from the coefficients in 1 + x*A(x)^3.
SPECIFIC VALUES.
A(t) = 8/5 at t = 0.257842038645833456558...
A(t) = 3/2 at t = 0.24869526467110689667648213094860932113462559982219...
A(t) = 4/3 at t = 0.21321674572378383093755902318049913517774115880785...
A(t) = 5/4 at t = 0.18151790234803008203317827057063199289923020437324...
A(t) = 6/5 at t = 0.15638236848650043639095127985605468995430265567872...
A(1/4) = 1.5104498750225954401497052152244291483533940069402...
A(1/5) = 1.2948177731384287040434619555644894329636242990640...
A(1/6) = 1.2192544950152148905144159115908573870687883121699...
A(1/8) = 1.1487089332444818621810139499703458742589412625833...
A(1/9) = 1.1286969902151862545955480786537992451685724113531...
PARITY OF TERMS.
The run lengths of the odd terms, which starts
[3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, ...],
appears to equal A282162 (offset 1), the first differences of the upper Wythoff sequence (A001950).
The run lengths of the even terms, which starts
[1, 2, 5, 1, 10, 1, 2, 21, 1, 2, 5, 1, 42, 1, 2, 5, 1, 10, 1, 2, 85, 1, 2, 5, 1, 10, 1, 2, 21, 1, 2, 5, 1, 170, 1, 2, 5, 1, 10, 1, 2, 21, 1, 2, 5, 1, 42, 1, 2, 5, 1, 10, 1, 2, 341, 1, 2, 5, 1, 10, 1, 2, 21, 1, 2, 5, 1, 42, 1, 2, 5, 1, 10, 1, 2, 85, 1, 2, 5, 1, 10, 1, 2, 21, 1, 2, 5, 1, 682, 1, 2, 5, 1, 10, ...],
appears to equal A085358, the runs of zeros in binomial(3*n,n)/(2*n+1) (mod 2), the records of which are given by A000975 and occur at Fibonacci numbers.
		

Crossrefs

Programs

  • PARI
    N = 30; A=vector(N+1); A[1]=1; \\ N = number of terms
    {a(n) = if(n==0,1, A[n+1] = Vec(1 + x*Ser(A)^3)[n+1]; A[n+1] = A[n+1] / 3^valuation(A[n+1], 3) )}
    for(n=0, N, print1(a(n), ", "))

Formula

a(n) = A038502( Sum_{k=0..n-1} a(k) * Sum_{j=0..n-1-k} a(j)*a(n-1-k-j) ) for n > 0 with a(0) = 1, where A038502(m) = m/3^A007949(m) and A007949(m) = 3-adic valuation of m.
Showing 1-3 of 3 results.