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.

Previous Showing 11-13 of 13 results.

A090725 Primes whose representation in base 16 has no alphabetic characters.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 23, 37, 41, 53, 67, 71, 73, 83, 89, 97, 101, 103, 113, 131, 137, 149, 151, 257, 263, 277, 281, 293, 307, 311, 313, 337, 353, 359, 373, 389, 401, 409, 521, 547, 563, 569, 577, 593, 599, 601, 613, 617, 631, 641, 643, 647, 659, 661, 769, 773
Offset: 1

Views

Author

Cino Hilliard, Jan 18 2004

Keywords

Comments

Subsequence of primes of A102489. - Michel Marcus, Mar 05 2016

Crossrefs

Cf. A102489.

Programs

  • Mathematica
    Select[Prime[Range[400]], Max[IntegerDigits[#, 16]] < 10 & ] (* Zak Seidov, Mar 04 2016 *)
  • PARI
    isok(n) = isprime(n) && (vecmax(digits(n, 16)) < 10); \\ Michel Marcus, Mar 05 2016

Extensions

Better definition from Omar E. Pol, Dec 24 2008

A262222 Decimal representations of hexadecimal numbers that can be misinterpreted as decimal numbers in scientific E notation.

Original entry on oeis.org

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

Views

Author

Adam J.T. Partridge, Sep 16 2015

Keywords

Comments

Hexadecimal numbers containing no alpha digits other than a single "e", where the "e" is not the first or last digit (e.g., 3e12), may be misinterpreted as numbers in scientific E notation.
These numbers are especially troublesome when importing hexadecimal numbers from CSV files into Microsoft Excel.
These numbers can be written as 16^(i+1)a + 14*16^i + b where a and b are members of A102489 with a>0, b<16^i and i>0.
Numbers whose hexadecimal representation matches the regular expression [1-9][0-9]*e[0-9]+. - Eric M. Schmidt, Sep 28 2023

Examples

			480_10 = 1e0_16 and 1e0 = 1 in E notation.
739_10 = 2e3_16 and 2e3 = 2000_10 in 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
    

A347295 a(n) = 1 + (a(n-1) interpreted as a hexadecimal number); a(1)=1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 17, 24, 37, 56, 87, 136, 311, 786, 1927, 6440, 25665, 153190, 1388945, 20482374, 541598581, 22571222402, 2359835108355, 621877794997078, 441783186122961017, 1256072821702542102552, 22166920289514371672974675
Offset: 1

Views

Author

Divyanand Valsan, Jan 23 2022

Keywords

Comments

a(1)=1, and each subsequent term is obtained by interpreting the previous term as a hexadecimal number, converting it into decimal, and incrementing by 1.
This same procedure can be applied to create other base-switch sequences, e.g., between hexadecimal and octal or between decimal and octal. The base b1 in which a(n-1) is interpreted must be larger than the base b2 into which it is converted; otherwise, the b1-th term will be b1 written in base b2, which will not be a valid base-b1 expansion (e.g., with b1=10 and b2=16, we would obtain a(10)="A", which is not a valid decimal number).

Examples

			a(1)=1;
1_16 = 1_10; 1 + 1 = 2 = a(2);
2_16 = 2_10; 2 + 1 = 3 = a(3);
...
This will continue till a(10)=10, when base differences start to have an effect.
10_16 = 16_10; 16 + 1 = 17 = a(11);
17_16 = 23_10; 23 + 1 = 24 = a(12);
24_16 = 36_10; 36 + 1 = 37 = a(13);
37_16 = 55_10; 55 + 1 = 56 = a(14).
		

Crossrefs

Cf. A102489.

Programs

  • Mathematica
    NestList[FromDigits[IntegerDigits[#], 16] + 1 &, 1, 30] (* Amiram Eldar, Jan 23 2022 *)
  • Python
    #Hex-dec switch
    seq=[]
    seq.append(1)
    print(seq[0])
    for i in range(1,50):
        dec=int(str(seq[i-1]), 16)
        dec=dec+1
        seq.append(dec)
    print(seq)

Formula

a(n) = A102489(a(n-1)) + 1. - Jon E. Schoenfield, Jan 23 2022
Limit_{n->infinity} log(a(n))/log_10(16)^n = 0.180064331228631629088182553063.... - Jon E. Schoenfield, Jan 23 2022
Previous Showing 11-13 of 13 results.