login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A102489 Take the decimal representation of n and read it as if it were written in hexadecimal. 13
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, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 112 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

List of numbers in base-16 representation that can be written with decimal digits.

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

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

Integers that avoid letters in their hexadecimal expansion. - Eliora Ben-Gurion, Aug 28 2019

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..9999

Eric Weisstein's World of Mathematics, Hexadecimal

FORMULA

a(n) - a(n-1) = (2*16^A122840(n) + 3)/5. - Robert Israel, Aug 30 2015

EXAMPLE

10 in decimal is 16 in base 16, so a(10)=16.

MAPLE

o10:= n -> min(padic:-ordp(n, 2), padic:-ordp(n, 5)):

d:= [0, seq((2*16^o10(n)+3)/5, n=1..1000)]:

ListTools:-PartialSums(d); # Robert Israel, Aug 30 2015

MATHEMATICA

Table[FromDigits[IntegerDigits[n], 16], {n, 0, 70}] (* Ivan Neretin, Aug 12 2015 *)

PROG

(Haskell)

import Data.Maybe (fromJust, mapMaybe)

a102489 n = a102489_list !! (n-1)

a102489_list = mapMaybe dhex [0..] where

   dhex 0                         = Just 0

   dhex x | d > 9 || y == Nothing = Nothing

          | otherwise             = Just $ 16 * fromJust y + d

          where (x', d) = divMod x 16; y = dhex x'

-- Reinhard Zumkeller, Jul 06 2012

CROSSREFS

Complement of A102490; A102487, A102491, A102493, A122840.

Cf. A090725 (the subsequence of primes).

Sequence in context: A032581 A062504 A305458 * A004838 A032998 A032344

Adjacent sequences:  A102486 A102487 A102488 * A102490 A102491 A102492

KEYWORD

nonn,base

AUTHOR

Reinhard Zumkeller, Jan 12 2005

EXTENSIONS

Edited by N. J. A. Sloane, Feb 08 2014 (changed definition, moved old definition to comment, changed offset and b-file).

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 08:08 EDT 2020. Contains 334824 sequences. (Running on oeis4.)