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.

A058185 Numbers (written in decimal) which appear the same when written in base 5 and base 10/2.

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 70, 71, 72, 73, 74, 100, 101, 102, 103, 104, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 250, 251, 252, 253, 254, 260, 261, 262, 263, 264, 270, 271, 272, 273, 274
Offset: 1

Views

Author

Henry Bottomley, Nov 17 2000

Keywords

Comments

To represent a number in base b, if a digit exceeds b-1, subtract b and carry 1. In fractional base b/c, subtract b and carry c. The sequence consists of numbers which in base 5 only have even digits, or one more than such numbers.

Examples

			10 is a term since it is written as 20 both in base 5 and base 10/2.
40 it not a term since it is written as 130 in base 5 and 80 in base 10/2.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = If[n == 0, 0, 10 * s[2 * Floor[n/10]] + Mod[n, 10]]; q[k_] := s[k] == FromDigits[IntegerDigits[k, 5]]; Select[Range[0, 300], q] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    s(n) = if(n == 0, 0, 10 * s(n\10 * 2) + n % 10);
    isok(k) = s(k) == fromdigits(digits(k, 5)); \\ Amiram Eldar, Aug 02 2025

Extensions

Offset corrected by Amiram Eldar, Aug 02 2025