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.

A102489 Take the decimal representation of n and read it as if it were written in hexadecimal.

This page as a plain text file.
%I A102489 #58 May 08 2025 10:57:49
%S A102489 0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21,22,23,24,25,32,33,34,35,36,37,
%T A102489 38,39,40,41,48,49,50,51,52,53,54,55,56,57,64,65,66,67,68,69,70,71,72,
%U A102489 73,80,81,82,83,84,85,86,87,88,89,96,97,98,99,100,101,102,103,104,105,112
%N A102489 Take the decimal representation of n and read it as if it were written in hexadecimal.
%C A102489 List of numbers in base-16 representation that can be written with decimal digits.
%C A102489 Early in the sequence there are blocks recurring as a(n) = a(n-10)+16, but this pattern starts to fail when we reach 160, 161, ... with hex-representations A0, A1, ... which cannot be written with decimal digits. - _Rick L. Shepherd_, Jun 08 2012
%C A102489 Binary Coded Decimal (BCD) codes, common in electronics, when interpreted as plain binary-coded integers. For example, number 39 is BCD coded in two nibbles as 0011 1001 which is the binary expansion of 57; hence, taking into account the offset, a(1+39) = 57. - _Stanislav Sykora_, Jun 09 2012
%C A102489 Integers that avoid letters in their hexadecimal expansion. - _Eliora Ben-Gurion_, Aug 28 2019
%H A102489 Reinhard Zumkeller, <a href="/A102489/b102489.txt">Table of n, a(n) for n = 0..9999</a>
%H A102489 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Hexadecimal.html">Hexadecimal</a>
%F A102489 a(n) - a(n-1) = (2*16^A122840(n) + 3)/5. - _Robert Israel_, Aug 30 2015
%e A102489 10 in decimal is 16 in base 16, so a(10)=16.
%p A102489 o10:= n -> min(padic:-ordp(n,2),padic:-ordp(n,5)):
%p A102489 d:= [0,seq((2*16^o10(n)+3)/5, n=1..1000)]:
%p A102489 ListTools:-PartialSums(d); # _Robert Israel_, Aug 30 2015
%t A102489 Table[FromDigits[IntegerDigits[n], 16], {n, 0, 70}] (* _Ivan Neretin_, Aug 12 2015 *)
%o A102489 (Haskell)
%o A102489 import Data.Maybe (fromJust, mapMaybe)
%o A102489 a102489 n = a102489_list !! (n-1)
%o A102489 a102489_list = mapMaybe dhex [0..] where
%o A102489    dhex 0                         = Just 0
%o A102489    dhex x | d > 9 || y == Nothing = Nothing
%o A102489           | otherwise             = Just $ 16 * fromJust y + d
%o A102489           where (x', d) = divMod x 16; y = dhex x'
%o A102489 -- _Reinhard Zumkeller_, Jul 06 2012
%Y A102489 Complement of A102490; A102487, A102491, A102493, A122840.
%Y A102489 Cf. A090725 (the subsequence of primes).
%K A102489 nonn,base
%O A102489 0,3
%A A102489 _Reinhard Zumkeller_, Jan 12 2005
%E A102489 Edited by _N. J. A. Sloane_, Feb 08 2014 (changed definition, moved old definition to comment, changed offset and b-file).