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.

A095190 Doubled Thue-Morse sequence: a(2n) = A010060(n), a(2n+1) = A010060(n).

Original entry on oeis.org

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

Views

Author

Miklos Kristof and Peter Boros, Jun 21 2004

Keywords

Comments

The A010060 sequence replacing 0 with 0,0 and 1 with 1,1.
Let n = Sum(c(k)*2^k), c(k) = 0,1, be the binary form of n, n = Sum(d(k)*3^k), d(k) = 0,1,2, the ternary form, n = Sum(e(k)*5^k), e(k) = 0,1,2,3,4, the base 5 form. Then a(n) = Sum(c(k)+d(k)) mod 2 = Sum(c(k)+e(k)) mod 2.

Examples

			The Thue-Morse sequence is: 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 ... so a(n) = 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0 ...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[DigitCount[Floor[n/2], 2, 1], 2]; Array[a, 100, 0] (* Amiram Eldar, Jul 28 2023 *)
  • PARI
    a(n)=hammingweight(n\2)%2 \\ Charles R Greathouse IV, May 08 2016

Formula

a(n) = A096273(n) mod 2. - Benoit Cloitre, Jun 29 2004
a(n) = mod(A000120(floor(n/2)), 2) = mod(A010060(floor(n/2)), 2). - Paul Barry, Jan 07 2005
a(n) = mod(-1 + Sum_{k=0..n} mod(C(n, 2k), 2), 3). - Paul Barry, Jan 14 2005
a(n) = mod(log_2(Sum_{k=0..n} mod(C(n, 2k),2)),2). - Paul Barry, Jun 12 2006

A217445 Numbers n such that n! has the same number of terminating zeros in bases 3 and 4.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23, 33, 36, 37, 38, 42, 43, 46, 47, 51, 56, 58, 59, 60, 61, 62, 75, 86, 88, 89, 92, 100, 101, 102, 103, 105, 112, 113, 114, 115, 120, 121, 122, 124, 125, 138, 139, 141, 147, 153, 159, 164, 166, 167, 168
Offset: 1

Views

Author

Tanya Khovanova, Oct 03 2012

Keywords

Comments

The number of zeros of n! base 3 is approaching n/2 as n grows. Similarly, the number of zeros of n! base 4 is approaching n/2 as n grows. Consequently, this sequence is expected to have high density.
From Robert Israel, Jan 19 2017: (Start)
Numbers n such that A000120(n) + (n + A000120(n) mod 2) = A053735(n).
Since typically A000120(n) ~ log_2(n) while typically A053735(n) ~ log_3(n), the density of this sequence should go to 0, contrary to the previous comment. (End)
Comment from N. J. A. Sloane, Dec 06 2019: (Start)
Appears to be the same as the list of positive numbers n such that the last nonzero digit of n! in base 12 belongs to the set [1, 2, 5, 7, 10, 11].
The first footnote in Deshouillers et al. (2016) says: "if the last nonzero digit of n! in base 12 belongs to {1, 2, 5, 7, 10, 11} then |(digit-sum of n in base 3) - (digit-sum of n in base 2)| is <= 1; this seems to occur infinitely many times." Compare A096288. (End)

Examples

			6! is 222200 in base 3 and 23100 in base 4, both of them have 2 zeros at the end, so 6 is in the sequence.
		

References

  • Jean-Marc Deshouillers, Laurent Habsieger, Shanta Laishram, Bernard Landreau, Sums of the digits in bases 2 and 3, arXiv:1611.08180, 2016

Crossrefs

Cf. A054861 (base 3), A090616 (base 4), A090622, A096288.

Programs

  • Maple
    s2:= n -> convert(convert(n,base,2),`+`):
    s3:= n -> convert(convert(n,base,3),`+`):
    select(n -> s2(n) + (n+s2(n) mod 2) = s3(n), [$1..1000]); # Robert Israel, Jan 19 2017
  • Mathematica
    sntzQ[n_]:=Module[{f=n!},Last[Split[IntegerDigits[f,3]]]==Last[ Split[ IntegerDigits[ f,4]]]]; Select[Range[200],sntzQ] (* Harvey P. Dale, Jul 11 2020 *)
  • PARI
    is(n)=my(L=log(n+1));sum(k=1,L\log(3),n\3^k)==sum(k=1,L\log(2),n>>k)\2 \\ Charles R Greathouse IV, Oct 04 2012

Extensions

More terms from Alois P. Heinz, Oct 03 2012

A096289 Sum of digits of n in bases 2 and 5.

Original entry on oeis.org

0, 2, 3, 5, 5, 3, 4, 6, 5, 7, 4, 6, 6, 8, 9, 7, 5, 7, 8, 10, 6, 8, 9, 11, 10, 4, 5, 7, 7, 9, 6, 8, 5, 7, 8, 6, 6, 8, 9, 11, 6, 8, 9, 11, 11, 9, 10, 12, 10, 12, 5, 7, 7, 9, 10, 8, 7, 9, 10, 12, 8, 10, 11, 13, 9, 7, 8, 10, 10, 12, 9, 11, 10, 12, 13, 7, 7, 9, 10, 12, 6, 8, 9, 11, 11, 9, 10, 12, 11, 13
Offset: 0

Views

Author

Miklos Kristof, Peter Boros, Jun 24 2004

Keywords

Comments

Let n = Sum(c(k)*2^k), c(k) = 0,1, be the binary form of n, n = Sum(d(k)*5^k), d(k) = 0,1,2,3,4 the base 5 form; then a(n) = Sum(c(k)+d(k)).
a(n) mod 2 = doubled Thue-Morse sequence A095190.

Examples

			n=13: 13=1*2^3+1*2^2+1*2^0, 1+1+1=3, 13=2*5^1+3*5^0, 2+3=5, so a(13)=3+5=8.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[Flatten@ IntegerDigits[n, {2, 5}]]; Array[a, 100, 0] (* Amiram Eldar, Jul 28 2023 *)

Formula

a(n) = A000120(n) + A053824(n). - Amiram Eldar, Jul 28 2023
Showing 1-3 of 3 results.