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 31-34 of 34 results.

A372142 a(n) is the smallest prime p such that there exist exactly n distinct primes q where q < p and the representation of p in base q is a palindrome.

Original entry on oeis.org

2, 3, 31, 443, 23053, 86677, 11827763, 27362989, 755827199, 1306369439
Offset: 0

Views

Author

Tadayoshi Kamegai, Apr 21 2024

Keywords

Comments

This is a special case of A372141.
It need not be the case that a(n) is a palindrome in base 2, as 23053 is a counterexample.
For p > 3, one only needs to check q such that q^2 + 1 <= p else p = cc_q = c*(q+1), not prime for c != 1 and q != 2. A similar argument shows that p cannot have an even number of digits in base q, else it would be divisible by (q+1). - Michael S. Branicky, Apr 21 2024

Examples

			a(5) = 86677, as it is palindromic in base 2, 107, 113, 151, and 233, and no smaller number satisfies the property.
		

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import sieve
    from sympy.ntheory import digits
    from itertools import islice
    def ispal(v): return v == v[::-1]
    def f(p): return sum(1 for q in sieve.primerange(1, isqrt(p-1)+1) if ispal(digits(p, q)[1:]))
    def agen():
        adict, n = {0:2, 1:3}, 0
        for p in sieve:
            v = f(p)
            if v >= n and v not in adict:
                adict[v] = p
                while n in adict:
                    yield adict[n]; del adict[n]; n += 1
    print(list(islice(agen(), 6))) # Michael S. Branicky, Apr 21 2024

Extensions

a(6) from Jon E. Schoenfield, Apr 21 2024
a(7) from Michael S. Branicky, Apr 21 2024
a(8) from Michael S. Branicky, Apr 22 2024
a(9) from Michael S. Branicky, Apr 24 2024

A056145 Palindromic primes in bases 2 and 8.

Original entry on oeis.org

3, 5, 7, 73, 28807, 31727, 262657, 295433, 1311749, 1385621, 1478189, 1540157, 1543741, 1549501, 1551037, 1865159, 1932247, 2031599, 2067007, 2085247, 2087807, 83914757, 84663941, 85742021, 85808581, 88779413, 89420117, 89466197, 89924053, 90169301, 94971053, 94983341
Offset: 1

Views

Author

Robert G. Wilson v, Jul 29 2000

Keywords

Crossrefs

Cf. A016041 and A029976.

Programs

  • Mathematica
    Do[ If[ PrimeQ[ n ], t=RealDigits[ n, 8 ][ [ 1 ] ]; If[ FromDigits[ t ]==FromDigits[ Reverse[ t ] ], s=RealDigits[ n, 2 ][ [ 1 ] ]; If[ FromDigits[ s ]==FromDigits[ Reverse[ s ] ], Print[ n ] ] ] ], {n, 1, 10^8} ]
    Select[Prime[Range[155000]],PalindromeQ[IntegerDigits[#,2]] && PalindromeQ[ IntegerDigits[ #,8]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 23 2017 *)

Extensions

More terms from Harvey P. Dale, Sep 23 2017

A155801 Nontrivial "Strobogrammatic" primes, the same "upside-down" in at least one base b with 2 <= b <= 10.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 31, 37, 43, 73, 101, 107, 127, 181, 257, 313, 443, 619, 757, 1093, 1193, 1297, 1453, 1571, 1619, 1787, 1831, 1879, 2801, 4889, 5113, 5189, 5557, 5869, 5981, 6211, 6827, 7607, 7759, 7919, 8191
Offset: 1

Views

Author

Jonathan Vos Post, Jan 27 2009

Keywords

Comments

I have to say "nontrivial" because every nonnegative integer is strobogrammatic in base 1. Strobogrammatic binary primes == primes in A006995 == A016041. Strobogrammatic primes in base 3 = 13, 757, 1093, 9103, ... == primes strobogrammatic in bases 2 and 3. For bases 2 < k < 8 we have that every strobogrammatic prime in base k must also be strobogrammatic in base 2 and hence palindromic in base 2. Hence we have, for example, strobogrammatic base-4 primes = A056130 = "Palindromic primes in bases 2 and 4."
Strobogrammatic primes in base 5 = 31, 19531, 394501, 472631, ... == primes strobogrammatic in base 2 and base 5. Strobogrammatic primes base 6 = 7, 37, 43, 1297, 55987, ... == primes strobogrammatic in base 2 and base 6. Note that 1101011 (base 6) = 18881 (base 10) which is strobogrammatic base 10 but not prime base 6 nor 10 (though prime base 2). Strobogrammatic primes base 7 = 2801, 134807, this last being strobogrammatic prime in bases 2, 4 and 7. Strobogrammatic primes base 8 = 73, 262657, 295433, ... Strobogrammatic primes base 9 break the above pattern, as they can have the digit 8 and are A068188 (tetradic primes). Strobogrammatic primes base 10 == A007597. Except sometimes for the first element, these (for the same range of k) must all have an odd number of digits.

Examples

			5189 = 1101011 (base 6) which numeral string is the same upside-down (and backwards). 11, 101, 181 and 619 are strobogrammatic base 10, the conventional interpretation of the word.
		

Crossrefs

Formula

A000040 INTERSECTION A155584[1 < k < 11, n].

A211405 Prime numbers that in binary are palindromic and also have palindromic index.

Original entry on oeis.org

5, 17, 73, 127, 313, 1453, 22861, 28123, 296713, 309481, 2063947162127
Offset: 1

Views

Author

James G. Merickel, Feb 09 2013

Keywords

Comments

This has been searched through 2^33.
The index of a(11) is 75558337841. a(12) > 2^44. - Giovanni Resta, Feb 12 2013

Examples

			The binary representations of the first three terms and their indices are 101 and 11, 10001 and 111, and 1001001 and 10101.
		

Crossrefs

Extensions

a(11) from Giovanni Resta, Feb 12 2013
Previous Showing 31-34 of 34 results.