A262222 Decimal representations of hexadecimal numbers that can be misinterpreted as decimal numbers in scientific E notation.
480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511
Offset: 1
Examples
480_10 = 1e0_16 and 1e0 = 1 in E notation. 739_10 = 2e3_16 and 2e3 = 2000_10 in E notation.
Links
- Christian Perfect, Table of n, a(n) for n = 1..99999
- Microsoft Community, Unable to disable scientific notation in Microsoft Excel.
- Wikipedia, Scientific E notation.
Crossrefs
A subset of A102490.
Programs
-
C
#include
#define DIGIT_E 14 bool isA262222(int k) { if (k <= 0 || k % 16 == DIGIT_E) return false; bool foundE = false; int digit; while (k > 0) { digit = k % 16; if (digit == DIGIT_E) { if (foundE) return false; foundE = true; } else if (digit > 9) return false; k /= 16; } return foundE && digit != DIGIT_E; } // Eric M. Schmidt, Sep 28 2023 -
Python
from itertools import count,product # every string of d characters with exactly one 'e' in it, and all the other characters digits 0-9, in ascending lexicographic order def mids(d): if d<1: raise Exception("d<1") if d==1: yield 'e' return for i in range(0,10): for m in mids(d-1): yield str(i)+m for i in range(10**(d-1)): yield 'e'+str(i).zfill(d-1) def a_generator(): for d in count(1): for start in range(1,10): # for each leading digit 1-9 for mid in mids(d): # for all possible middles made of d characters, containing exactly one 'e' for end in range(10): #for each possible final digit, 0-9 s = '{}{}{}'.format(start,''.join(mid),end) i = int(s,16) yield i a262222 = a_generator() [next(a262222) for in range(48)] # _Christian Perfect, Oct 20 2015
Comments