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.

Showing 1-4 of 4 results.

A075241 Least base for which the n-th prime has no prime reversal in that base.

Original entry on oeis.org

2, 3, 5, 7, 4, 6, 3, 2, 6, 3, 7, 4, 4, 3, 4, 5, 2, 7, 10, 3, 3, 2, 6, 2, 3, 6, 2, 3, 2, 4, 4, 4, 2, 2, 2, 4, 2, 4, 4, 4, 2, 4, 2, 10, 3, 3, 2, 3, 4, 3, 9, 2, 2, 3, 3, 4, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 4, 3, 2, 4, 6, 4, 2, 3, 2, 3, 2, 2, 2, 5, 2, 4, 4, 3, 2, 3, 6, 2, 3, 4, 2, 3, 3, 6, 2, 4, 3, 4, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Robert G. Wilson v, Sep 09 2002

Keywords

Comments

a(n) is always less than or equal to n-th prime and once past a(6) it is always less than n.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 2; p = Prime[n]; While[ PrimeQ[ FromDigits[ Reverse[ IntegerDigits[p, k]], k]], k++ ]; a = Append[a, k], {n, 1, 105}]; a

A075240 Smallest prime whose base-n reversal is not a prime.

Original entry on oeis.org

2, 3, 11, 5, 13, 7, 11, 29, 19, 11, 19, 13, 29, 23, 19, 17, 23, 19, 31, 29, 29, 23, 29, 37, 37, 29, 31, 29, 43, 31, 37, 37, 59, 59, 43, 37, 41, 59, 43, 41, 59, 43, 47, 47, 53, 47, 59, 61, 59, 61, 59, 53, 67, 59, 59, 59, 61, 59, 73, 61, 71, 67, 79, 71, 89, 67, 71, 101, 89
Offset: 2

Views

Author

Robert G. Wilson v, Sep 09 2002

Keywords

Comments

All primes show up in the sequence eventually.

Examples

			11_10 = 23_4, reverse(23) = 32, 32_4 = 14_10, so a(4) = 11 since this does not work for smaller primes.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ PrimeQ[ FromDigits[ Reverse[ IntegerDigits[ Prime[k], n]], n]], k++ ]; a = Append[a, Prime[k]], {n, 2, 70}]; a
  • PARI
    a(n) = my(p=2); while (isprime(fromdigits(Vecrev(digits(p, n)), n)), p = nextprime(p+1)); p; \\ Michel Marcus, Mar 28 2021

A075243 Composite numbers requiring increasingly larger bases to become prime by base reversal.

Original entry on oeis.org

4, 6, 8, 9, 16, 27, 36, 78, 81, 102, 114, 144, 270, 420, 480, 750, 1848, 2382, 2940, 13860, 14490, 14520, 21840, 31860, 33660, 44580, 80850, 1228080, 4305210, 5326860, 6846840, 9796710, 9990750, 10720710, 14910630, 15129510, 15278250, 16785090, 17022390, 17608500
Offset: 1

Views

Author

Robert G. Wilson v, Sep 09 2002

Keywords

Comments

The bases at which these entries occur are in A074901. See A075242.

Crossrefs

Programs

  • Mathematica
    NextComposite[n_] := Block[{k = n + 1}, While[PrimeQ[k], k++ ]; k]; f[n_] := Block[{b = 2}, While[b < n && !PrimeQ[ FromDigits[ Reverse[ IntegerDigits[n, b]], b]], b++ ]; b]; If[b != n, b, 0]; b = -1; k = 4; Do[ While[c = f[k]; c <= b, k = NextComposite[k]]; b = c; Print[k], {n, 1, 31}]

Extensions

More terms from Amiram Eldar, Jun 04 2021

A075244 Least number requiring the base n to produce a prime by base reversal.

Original entry on oeis.org

2, 3, 15, 8, 109, 9, 119, 16, 27, 70, 2197, 36, 1265, 158, 213, 178, 4205, 126, 14189, 260, 273, 304, 4865, 120, 1295, 78, 81, 532, 44323, 150, 47317, 952, 771, 102, 16705, 492, 6209, 114, 1209, 2020, 132743, 294, 22945, 2834, 2721, 2276, 66455, 144
Offset: 1

Views

Author

Robert G. Wilson v, Sep 09 2002

Keywords

Comments

Question, Is every base necessary to convert the natural numbers into primes?

Examples

			a(1) = 2 because two = 11 in unary (A000042) and its reversal 11 = 2. a(2) = 3 because three = 11 in base 2 (A007088) and its reversal 11 in base 2 = 3. a(3) = 15 because fifteen = 120 in base 3 (A007089) and its reversal 21 in base 3 = 7. a(4) = 8 -> 2. a(7) = 119 because 119 base 7 = 230 in base 7 (A007093) and its reversal 32 base 7 = 161.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = 2}, While[b < n && !PrimeQ[ FromDigits[ Reverse[ IntegerDigits[n, b]], b]], b++ ]; If[b != n, b, 0]]; a = Table[0, {70}]; Do[b = f[n]; If[b < 76 && a[[b]] == 0, a[[b]] = n], {n, 2, 133000}]
Showing 1-4 of 4 results.