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.

This page as a plain text file.
%I A058186 #11 Aug 02 2025 06:26:26
%S A058186 0,1,2,3,4,20,21,22,23,24,40,41,42,43,44,200,201,202,203,204,220,221,
%T A058186 222,223,224,240,241,242,243,244,400,401,402,403,404,420,421,422,423,
%U A058186 424,440,441,442,443,444,2000,2001,2002,2003,2004,2020,2021,2022,2023
%N A058186 Numbers (written in base 5) which appear the same when written in base 5 and base 10/2.
%C A058186 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}.
%H A058186 Amiram Eldar, <a href="/A058186/b058186.txt">Table of n, a(n) for n = 1..10000</a>
%H A058186 <a href="/index/Ba#base_fractional">Index entries for sequences related to fractional bases</a>.
%F A058186 a(n) = A007091(A058185(n)). - _Amiram Eldar_, Aug 02 2025
%e A058186 20 (10 in decimal) is a term since it is written as 20 both in base 5 and base 10/2.
%e A058186 30 (15 in decimal) is not a term since it is written as 30 in base 5 and 25 in base 10/2.
%t A058186 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 *)
%o A058186 (PARI) s(n) = if(n == 0, 0, 10 * s(n\10 * 2) + n % 10);
%o A058186 f(n) = fromdigits(digits(n, 5));
%o A058186 list(lim) = apply(f, select(x -> s(x) == f(x), vector(lim+1, i, i-1))); \\ _Amiram Eldar_, Aug 02 2025
%Y A058186 Cf. A007091, A024657, A058185.
%K A058186 base,nonn,easy
%O A058186 1,3
%A A058186 _Henry Bottomley_, Nov 17 2000
%E A058186 Offset corrected by _Amiram Eldar_, Aug 02 2025