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

A043529 Number of distinct base-2 digits of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also, if prefixed by 0, the trajectory of 0 under repeated applications of the morphism 0 -> 0,1, 1 -> 1,2, 2 -> 2,2. This is a word that is pure uniform morphic, but neither primitive morphic nor recurrent. - N. J. A. Sloane, Jul 15 2018

References

  • Dekking, Michel, Michel Mendes France, and Alf van der Poorten. "Folds." The Mathematical Intelligencer, 4.3 (1982): 130-138 & front cover, and 4:4 (1982): 173-181 (printed in two parts). See Observaion 1.8.

Crossrefs

Factor of A160466. Cf. A007456 and A081729. - Johannes W. Meijer, May 24 2009
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.

Programs

  • Maple
    A043529 := proc(n): if type(ln(n+1)/ln(2), integer) then 1 else 2 fi: end proc: seq(A043529(n), n=0..90); # Johannes W. Meijer, Sep 14 2012
  • Mathematica
    (* Needs version >= 10.2. *)
    SubstitutionSystem[{0 -> {0, 1}, 1 -> {1, 2}, 2 -> {2, 2}}, 0, 7] // Last // Rest (* Jean-François Alcover, Apr 06 2020 *)
    Table[Length[Union[IntegerDigits[n,2]]],{n,0,90}] (* Harvey P. Dale, Aug 04 2024 *)

Formula

This is 2 unless n = 2^k - 1 for some k in which case it is 1.
a(n) = 2 - A036987(n). - Antti Karttunen, Nov 19 2017

Extensions

First term added and offset changed by Johannes W. Meijer, May 15 2009

A160464 The Eta triangle.

Original entry on oeis.org

-1, -11, 2, -114, 29, -2, -3963, 1156, -122, 4, -104745, 32863, -4206, 222, -4, -3926745, 1287813, -184279, 12198, -366, 4, -198491580, 67029582, -10317484, 781981, -30132, 562, -4
Offset: 2

Views

Author

Johannes W. Meijer, May 24 2009

Keywords

Comments

The ES1 matrix coefficients are defined by ES1[2*m-1,n] = 2^(2*m-1) * int(y^(2*m-1)/(cosh(y))^(2*n),y=0..infinity)/(2*m-1)! for m = 1, 2, 3, .. and n = 1, 2, 3 .. .
This definition leads to ES1[2*m-1,n=1] = 2*eta(2*m-1) and the recurrence relation ES1[2*m-1,n] = ((2*n-2)/(2*n-1))*(ES1[2*m-1,n-1] - ES1[2*m-3,n-1]/(n-1)^2) which we used to extend our definition of the ES1 matrix coefficients to m = 0, -1, -2, .. . We discovered that ES1[ -1,n] = 0.5 for n = 1, 2, .. . As usual eta(m) = (1-2^(1-m))*zeta(m) with eta(m) the Dirichlet eta function and zeta(m) the Riemann zeta function.
The coefficients in the columns of the ES1 matrix, for m = 1, 2, 3, .. , and n = 2, 3, 4 .. , can be generated with the polynomials GF(z,n) for which we found the following general expression GF(z;n) = ((-1)^(n-1)*r(n)*CFN1(z,n)*GF(z;n=1) + ETA(z,n))/p(n).
The CFN1(z,n) polynomials depend on the central factorial numbers A008955.
The ETA(z,n) are the Eta polynomials which lead to the Eta triangle.
The zero patterns of the Eta polynomials resemble a UFO. These patterns resemble those of the Zeta, Beta and Lambda polynomials, see A160474, A160480 and A160487.
The first Maple algorithm generates the coefficients of the Eta triangle. The second Maple algorithm generates the ES1[2*m-1,n] coefficients for m= 0, -1, -2, -3, .. .
The M(n) sequence, see the second Maple algorithm, leads to Gould's sequence A001316 and a sequence that resembles the denominators of the Taylor series for tan(x), A156769(n).
Some of our results are conjectures based on numerical evidence, see especially A160466.

Examples

			The first few rows of the triangle ETA(n,m) with n=2,3,.. and m=1,2,... are
  [ -1]
  [ -11, 2]
  [ -114, 29, -2]
  [ -3963, 1156, -122, 4].
The first few ETA(z,n) polynomials are
  ETA(z,n=2) = -1;
  ETA(z,n=3) = -11+2*z^2;
  ETA(z,n=4) = -114 + 29*z^2 - 2*z^4.
The first few CFN1(z,n) polynomials are
  CFN1(z,n=2) = (z^2-1);
  CFN1(z,n=3) = (z^4 - 5*z^2 + 4);
  CFN1(z,n=4) = (z^6 - 14*z^4 + 49*z^2 - 36).
The first few generating functions GF(z;n) are:
  GF(z;n=2) = ((-1)*2*(z^2 - 1)*GF(z;n=1) + (- 1))/3;
  GF(z;n=3) = (4*(z^4 - 5*z^2+4) *GF(z;n=1) + (-11 + 2*z^2))/30;
  GF(z;n=4) = ((-1)*4*(z^6 - 14*z^4 + 49*z^2 - 36)*GF(z;n=1) + (-114 + 29*z^2 - 2*z^4))/315.
		

References

  • Mohammad K. Azarian, Problem 1218, Pi Mu Epsilon Journal, Vol. 13, No. 2, Spring 2010, p. 116. Solution published in Vol. 13, No. 3, Fall 2010, pp. 183-185.

Crossrefs

The r(n) sequence equals A062383 (n>=1).
The p(n) sequence equals A160473(n) (n>=2).
The GCS(n) sequence equals the Geometric Connell sequence A049039(n).
The M(n-1) sequence equals A001316(n-1)/A156769(n) (n>=1).
The q(n) sequence leads to A081729 and the 'gossip sequence' A007456.
The first right hand column equals A053644 (n>=1).
The first left hand column equals A160465.
The row sums equal A160466.
The CFN1(z, n) and the cfn1(n, k) lead to A008955.
Cf. A094665 and A160468.
Cf. the Zeta, Beta and Lambda triangles A160474, A160480 and A160487.
Cf. A162440 (EG1 matrix).

Programs

  • Maple
    nmax:=8; c(2 ):= -1/3: for n from 3 to nmax do c(n) := (2*n-2)*c(n-1)/(2*n-1)-1/((n-1)*(2*n-1)) end do: for n from 2 to nmax do GCS(n-1) := ln(1/(2^(-(2*(n-1)-1-floor(ln(n-1)/ ln(2))))))/ln(2); p(n) := 2^(-GCS(n-1))*(2*n-1)!; ETA(n, 1) := p(n)*c(n); ETA(n, n) := 0 end do: mmax:=nmax: for m from 2 to mmax do for n from m+1 to nmax do q(n) := (1+(-1)^(n-3)*(floor(ln(n-1)/ln(2)) - floor(ln(n-2)/ln(2)))): ETA(n, m) := q(n)*((-1)*ETA(n-1, m-1)+(n-1)^2*ETA(n-1, m)) end do end do: seq(seq(ETA(n,m), m=1..n-1), n=2..nmax);
    # End first program.
    nmax1:=20; m:=1; ES1row:=1-2*m; with (combinat): cfn1 := proc(n, k): sum((-1)^j*stirling1(n+1, n+1-k+j) * stirling1(n+1, n+1-k-j), j=-k..k) end proc: mmax1:=nmax1: for m1 from 1 to mmax1 do M(m1-1) := 2^(2*m1-2)/((2*m1-1)!); ES1[-2*m1+1,1] := 2*(1-2^(1-(1-2*m1)))*(-bernoulli(2*m1)/(2*m1)) od: for n from 2 to nmax1 do for m1 from 1 to mmax1-n+1 do ES1[1-2*m1, n] := (-1)^(n-1)*M(n-1)*sum((-1)^(k+1)*cfn1(n-1,k-1)* ES1[2*k-2*n-2*m1+1, 1], k=1..n) od: od: seq(ES1[1-2*m, n], n=1..nmax1-m+1);
    # End second program.

Formula

We discovered an interesting relation between the Eta triangle coefficients ETA(n,m) = q(n)*((-1)*ETA(n-1,m-1)+(n-1)^2*ETA(n-1,m)), for n = 3, 4, ... and m = 2, 3, ... , with
q(n) = 1 + (-1)^(n-3)*(floor(log(n-1)/log(2)) - floor(log(n-2)/log(2))) for n = 3, 4, ....
See A160465 for ETA(n,m=1) and furthermore ETA(n,n) = 0 for n = 2, 3, ....
The generating functions GF(z;n) of the coefficients in the matrix columns are defined by
GF(z;n) = sum_{m>=1} ES1[2*m-1,n] * z^(2*m-2), with n = 1, 2, 3, .... This leads to
GF(z;n=1) = (2*log(2) - Psi(z) - Psi(-z) + Psi(1/2*z) + Psi(-1/2*z)); Psi(z) is the digamma-function.
GF(z;n) = ((2*n-2)/(2*n-1)-2*z^2/((n-1)*(2*n-1)))*GF(z;n-1)-1/((n-1)*(2*n-1)).
We found for GF(z;n), for n = 2, 3, ..., the following general expression:
GF(z;n) = ((-1)^(n-1)*r(n)*CFN1(z,n)*GF(z;n=1) + ETA(z,n) )/p(n) with
r(n) = 2^floor(log(n-1)/log(2)+1) and
p(n) = 2^(-GCS(n))*(2*n-1)! with
GCS(n) = log(1/(2^(-(2*(n-1)-1-floor(log(n-1)/ log(2))))))/log(2).
Showing 1-2 of 2 results.