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.

A104321 Smallest number m such that A104320(m)=n.

Original entry on oeis.org

0, 5, 8, 18, 13, 26, 27, 23, 42, 25, 37, 58, 47, 46, 61, 67, 54, 71, 77, 73, 88, 99, 141, 100, 115, 114, 119, 117, 113, 112, 109, 135, 110, 127, 133, 136, 164, 162, 177, 186, 193, 195, 163, 189, 201, 196, 191, 199, 206, 188, 208, 200, 221, 266, 235, 234, 238, 280
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 01 2005

Keywords

Comments

A104320(a(n))=n and A104320(m)<>n for m
If it exists, a(115) > 10^5. - Michel Marcus, Oct 19 2016

Crossrefs

Programs

  • PARI
    a(n) = {my(k = 0); while (#select(x->(x==0), digits(2^k, 3)) != n, k++); k;} \\ Michel Marcus, Oct 19 2016

A060035 Least m >= 0 such that 2^m has n 2's in its base-3 expansion.

Original entry on oeis.org

0, 1, 3, 12, 9, 16, 15, 19, 27, 30, 44, 40, 55, 52, 65, 60, 51, 75, 73, 80, 86, 82, 81, 77, 98, 85, 95, 79, 118, 141, 162, 107, 129, 105, 158, 145, 155, 143, 138, 152, 203, 176
Offset: 0

Author

Robert G. Wilson v, Mar 17 2001

Keywords

Comments

Previous name was: First power of 2 which has n 2's in its base 3 expansion, or -1 if no such power exists.
"Paul Erdős conjectured that for n > 8, 2^n is not a sum of distinct powers of 3. In terms of digits, this states that powers of 2 for n > 8 must always contain a '2' in their base 3 expansion."
The value of a(42) is conjectured to be -1 because no power of 2 up to 2^10^7 has exactly 42 2's.
After a(42), that is unknown, the sequence goes on 171, 142, 167, 197, 168, 216, 229, 193, 232, 236, 248, 226, 230, 224, 228, 303, 244, ...

Examples

			a(0) = 0 because 2^0 in base 3 is {1} which has no terms equaling 2.
a(6) = 15 because 2^15 in base 3 is {1, 1, 2, 2, 2, 2, 1, 1, 2, 2} which has 6 terms equaling 2.
		

References

  • Ilan Vardi, "Computational Recreations in Mathematica," Addison-Wesley Publishing Co., Redwood City, CA, 1991, page 20.

Crossrefs

Programs

  • Maple
    for m from 0 to 1000 do
      r:= numboccur(2,convert(2^m,base,3));
      if not assigned(A[r]) then A[r]:= m fi;
    od:
    seq(A[i],i=0..41); # Robert Israel, Dec 08 2015
  • Mathematica
    a[n_] := For[k=0, True, k++, If[Count[IntegerDigits[2^k, 3], 2]==n, Return[k]]]; Table[a[n],{n,0,41}] (* goes into infinite loop for n > 41 *)
    a[n_] := -1; Do[m = Count[IntegerDigits[2^(n), 3], 2]; If[a[m] == -1, a[m] = n], {n, 0, 1000}]; Table[a[n], {n, 0, 59}] (* L. Edson Jeffery, Dec 08 2015 *)
  • PARI
    isok(n, k) = {d = digits(2^k, 3); sum(i=1, #d, d[i]==2) == n;}
    a(n) = {k = 0; while(! isok(n, k), k++); k;} \\ Michel Marcus, Dec 08 2015

Extensions

Corrected and extended by Sascha Kurz, Jan 31 2003
Zero prepended to sequence by L. Edson Jeffery, Dec 08 2015
New name from L. Edson Jeffery, Dec 08 2015
a(42) = -1 and following terms removed from data by Michel Marcus, Dec 09 2015

A365214 Least k such that the binary representation of 3^k has exactly n 1's, or -1 if no such k exists.

Original entry on oeis.org

0, 1, 4, 3, 7, 5, -1, 9, 10, 12, 13, -1, 11, 14, 15, 24, 19, 25, 22, 21, -1, 23
Offset: 1

Author

Pontus von Brömssen, Aug 26 2023

Keywords

Comments

Least k such that A011754(k) = n, or -1 if no such k exists.
The first 22 terms are from Dimitrov and Howe (2021). After a(22), the sequence continues (with the -1's conjectural but very likely correct) -1, 26, 28, 31, 36, 40, 34, 27, -1, 35, 49, 33, 53, 38, -1, 42, 41, 57, 48, 52, -1, -1, 46, 51, 67, 59, 62, -1, ... .

Crossrefs

Showing 1-3 of 3 results.