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.

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

Original entry on oeis.org

0, 1, 2, 3, 4, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44, 200, 201, 202, 203, 204, 220, 221, 222, 223, 224, 240, 241, 242, 243, 244, 400, 401, 402, 403, 404, 420, 421, 422, 423, 424, 440, 441, 442, 443, 444, 2000, 2001, 2002, 2003, 2004, 2020, 2021, 2022, 2023
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 have digits in {0,2,4} except that the unit digit can be any from {0,1,2,3,4}.

Examples

			20 (10 in decimal) is a term since it is written as 20 both in base 5 and base 10/2.
30 (15 in decimal) is not a term since it is written as 30 in base 5 and 25 in base 10/2.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = If[n == 0, 0, 10*s[2*Floor[n/10]] + Mod[n, 10]]; f[n_] := FromDigits[IntegerDigits[n, 5]]; q[k_] := s[k] == f[k]; f /@ Select[Range[0, 300], q] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    s(n) = if(n == 0, 0, 10 * s(n\10 * 2) + n % 10);
    f(n) = fromdigits(digits(n, 5));
    list(lim) = apply(f, select(x -> s(x) == f(x), vector(lim+1, i, i-1))); \\ Amiram Eldar, Aug 02 2025

Formula

a(n) = A007091(A058185(n)). - Amiram Eldar, Aug 02 2025

Extensions

Offset corrected by Amiram Eldar, Aug 02 2025