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-8 of 8 results.

A100026 Consider all (2n+1)-digit palindromic primes of the form 10...0M0...01 (so that M is a palindrome with <= 2n-1 digits); a(n) = smallest such M.

Original entry on oeis.org

0, 3, 3, 3, 5, 8, 323, 5, 8, 212, 3, 161, 8, 3, 242, 3, 8, 10901, 737, 161, 242, 333, 282, 6, 252, 474, 5, 12921, 8, 131, 18381, 6, 444, 6, 797, 606, 717, 15351, 464, 333, 626, 545, 13031, 161, 747, 191, 323, 636, 32523, 303, 282, 888, 686, 18981, 111, 15951, 12021
Offset: 1

Views

Author

Harvey Dubner (harvey(AT)dubner.com), Nov 20 2004

Keywords

Comments

Is this the same as "Longest palindromic proper substring of A100027(n) or A028989(n+1) that occurs only once in the decimal representation of A100027(n) or A028989(n+1), respectively"? - Felix Fröhlich, Apr 30 2022
A more formal definition may be a(n) = A004151(A028989(n+1) - 10^(2n) - 1) with the convention that A004151(0) = 0. Only in the unlikely situation that A080176 contains undiscovered primes will a(n) = 0 occur for n > 1. - Jeppe Stig Nielsen, Apr 04 2025

Crossrefs

The corresponding palindromic primes are shown in A100027.

Programs

  • Mathematica
    f[n_] := Block[{k = 0, t = Flatten[Join[{1}, Table[0, {n - 1}]]]}, While[s = Drop[t, Min[ -Floor[ Log[10, k]/2], 0]]; k != FromDigits[ Reverse[ IntegerDigits[k]]] || !PrimeQ[ FromDigits[ Join[s, IntegerDigits[k], Reverse[s]]]], k++ ]; k]; Table[ f[n], {n, 56}] (* Robert G. Wilson v, Nov 22 2004 *)

Extensions

More terms from Robert G. Wilson v, Nov 22 2004

A100027 Smallest (2n+1)-digit palindromic prime of the form 10...0M0...01 (thus M is a palindrome with <= 2n-1 digits).

Original entry on oeis.org

101, 10301, 1003001, 100030001, 10000500001, 1000008000001, 100000323000001, 10000000500000001, 1000000008000000001, 100000000212000000001, 10000000000300000000001, 1000000000016100000000001, 100000000000080000000000001, 10000000000000300000000000001, 1000000000000024200000000000001
Offset: 1

Views

Author

Harvey Dubner (harvey(AT)dubner.com), Nov 20 2004

Keywords

Comments

Essentially a duplicate of A028989. - Jeppe Stig Nielsen, Apr 04 2025

Crossrefs

Values of M are given in A100026. Cf. A100028.
Cf. A028989.

A028990 Largest palindromic prime with 2n-1 digits.

Original entry on oeis.org

7, 929, 98689, 9989899, 999727999, 99999199999, 9999987899999, 999999787999999, 99999999299999999, 9999999992999999999, 999999999757999999999, 99999999997579999999999
Offset: 1

Views

Author

Keywords

Comments

For n>1, since 11 is a proper divisor of a palindrome with 2n digits, the numbers a(n) and A028989(n+1) are consecutive in A002385. - Jeppe Stig Nielsen, Feb 20 2021

Crossrefs

Programs

  • PARI
    a(n)=forstep(j=10^n-1,10^(n-1),-1,my(d=digits(j), p=fromdigits(vector(2*n-1,x,if(xJeppe Stig Nielsen, Feb 20 2021

Extensions

Offset changed (as it was in A028989) by Jeppe Stig Nielsen, Feb 20 2021

A056732 Smallest palindromic prime using n digits, or 0 if no such number exists.

Original entry on oeis.org

2, 11, 101, 0, 10301, 0, 1003001, 0, 100030001, 0, 10000500001, 0, 1000008000001, 0, 100000323000001, 0, 10000000500000001, 0, 1000000008000000001, 0, 100000000212000000001, 0, 10000000000300000000001, 0, 1000000000016100000000001, 0
Offset: 1

Views

Author

Robert G. Wilson v, Aug 11 2000

Keywords

Crossrefs

Odd-numbered terms form A028989. - Edward Catmur, May 01 2015

Programs

  • Mathematica
    Do[ k = 10^n; While[ ! PrimeQ[ k*10^n + FromDigits[ Take[ Reverse[ RealDigits[ k ][ [ 1 ] ] ], {2, -1} ] ] ], k++ ]; Print[ k*10^n + FromDigits[ Take[ Reverse[ RealDigits[ k ][ [ 1 ] ] ], {2, -1} ] ] ]; If[ n == 0, Print[ 11 ], Print[ 0 ] ], {n, 0, 12} ]

Formula

a(2*n) = 0 for n >= 2 (palindromes of even length are divisible by 11). - Joerg Arndt, May 01 2022

Extensions

a(25)-a(26) from Michael S. Branicky, Feb 12 2021
Name corrected by Joerg Arndt, May 01 2022

A082521 Least palindromic prime with at least 2n+1 central 0's.

Original entry on oeis.org

101, 1300031, 140000041, 19000000091, 1300000000031, 140000000000041, 16000000000000061, 7100000000000000017, 340000000000000000043, 35000000000000000000053, 7400000000000000000000047, 940000000000000000000000049, 13000000000000000000000000031
Offset: 0

Views

Author

Lekraj Beedassy, Apr 30 2003

Keywords

Comments

Each term has 2n+1 central 0s but it can occur that there are some more 0s adjacent to them. In such cases, successive terms of this sequence are identical. This can be seen in the b-file at n = 20, 40, 54, 66, 80, 97, 146, ... - Jeppe Stig Nielsen, Apr 04 2025

Crossrefs

Programs

  • PARI
    A082521(n)=forstep(j=10^(n+1),+oo,10^(n+1),my(d=digits(j), p=fromdigits(vector(2*#d-1,k,if(k<#d,d[k],d[2*#d-k])))); ispseudoprime(p)&&return(p)) \\ Jeppe Stig Nielsen, Apr 04 2025

Extensions

More terms from Joshua Zucker, May 11 2006
a(12) from Jeppe Stig Nielsen, Apr 04 2025

A309487 Positive integers represented by the quadratic form (the discriminant form) Δ = b^2 - 4ac, where a,b,c are consecutive palindromic primes.

Original entry on oeis.org

4437, 67088885, 608096563245, 6008043480300405, 60017281285205688005, 600012360124320087600005, 6000055320121974202106400005, 60000010840001925680009488000005, 600000005880000160040000148000000005, 6000000035120000052560000001460000000005
Offset: 1

Views

Author

Philip Mizzi, Sep 06 2019

Keywords

Comments

This is an interesting sequence because for most cases Δ<0. The cases where Δ>0 are sparse.
Based on a study of Δ for the case when a,b,c are consecutive primes I conjecture (but have no proof) that now Δ is always negative.
The conjecture in the previous comment is true. It says p(n)^2 <= 4*p(n-1)*p(n+1), and this follows from p(n)^2 <= 4*p(n-1)*p(n), i.e. p(n) <= 4*p(n-1), which is true (see A327447, also Mitrinovic, Sect. VII.18 (b)). - N. J. A. Sloane, Sep 10 2019
The corresponding least palindromic primes are: 11, 929, 98689, 9989899, 999727999, 99999199999, 9999987899999, 999999787999999, ...
Apart from the first term, it appears that the values of "a" and "b" are given by A028990 and A028989, respectively. - Daniel Suteu, Sep 08 2019

Examples

			Consecutive palindromic primes begin with 2,3,5. For a=2, b=3, c=5, Δ=b^2-4ac=-31. Since Δ<0 this is not a member of the sequence.
With consecutive palindromic primes 11,101,131 and a=11, b=101, c=131, Δ=b^2-4ac=4437, the first member of the sequence.
The corresponding values of a,b,c are given in the table bellow.
+----+---------------------+-----------------------+-----------------------+
|  n |          a          |           b           |            c          |
+----+---------------------+-----------------------+-----------------------+
|  1 |                  11 |                   101 |                   131 |
|  2 |                 929 |                 10301 |                 10501 |
|  3 |               98689 |               1003001 |               1008001 |
|  4 |             9989899 |             100030001 |             100050001 |
|  5 |           999727999 |           10000500001 |           10000900001 |
|  6 |         99999199999 |         1000008000001 |         1000017100001 |
|  7 |       9999987899999 |       100000323000001 |       100000353000001 |
|  8 |     999999787999999 |     10000000500000001 |     10000001910000001 |
|  9 |   99999999299999999 |   1000000008000000001 |   1000000032300000001 |
| 10 | 9999999992999999999 | 100000000212000000001 | 100000000252000000001 |
+----+---------------------+-----------------------+-----------------------+
		

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer.

Crossrefs

See also A028990 and A028989.

Extensions

a(6)-a(8) from Daniel Suteu, Sep 08 2019
a(9) from Chai Wah Wu, Sep 09 2019
a(10) from Chai Wah Wu, Sep 12 2019

A071606 Smallest zero-free palindromic prime of 2n + 1 digits.

Original entry on oeis.org

2, 131, 11311, 1114111, 111181111, 11112721111, 1111118111111, 111111151111111, 11111112521111111, 1111111111111111111, 111111111161111111111, 11111111111111111111111, 1111111111129211111111111, 111111111111212111111111111, 11111111111111611111111111111
Offset: 0

Views

Author

Lekraj Beedassy, Jun 21 2002

Keywords

Crossrefs

Cf. A028989.

Programs

  • Mathematica
    a[n_] := Block[{k = (10^(n + 1) - 1)/9}, While[m = FromDigits[ Join[ IntegerDigits[k], Reverse[ Drop[ IntegerDigits[k], -1]]]]; !PrimeQ[m], k++ ]; m]; Table[ a[n], {n, 0, 13}]

Extensions

Edited by Robert G. Wilson v, Jun 21 2002
More terms from Sean A. Irvine, Jul 28 2024

A374350 Least n-digit reversible prime whose difference from its reversal is minimal.

Original entry on oeis.org

2, 11, 101, 1231, 10301, 105601, 1003001, 10012001, 100030001, 1007457001, 10000500001, 100124521001, 1000008000001, 10000523500001, 100000323000001, 1000034344300001, 10000000500000001, 100000188981000001, 1000000008000000001, 10000001189110000001, 100000000212000000001
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2024

Keywords

Comments

Inspired by A084475 and A373349.
For n > 1, a(2n) has a difference of 9*10^n and a(2n-1) has a difference of 0.

Examples

			a(3) = 101 since its reversal is also 101;
a(4) = 1231 since its reversal is 1321 which is also prime and their difference is minimal at 90;
a(6) = 105601 since its reversal is 106501 which is also prime and their difference is minimal at 900;
a(8) = 10012001 since its reversal is 10021001 which is also prime and their difference is minimal at 9000; etc.
		

Crossrefs

Programs

  • Mathematica
    fe[n_] := Block[{k = 1, j, p, q}, While[ j = k(10^IntegerLength[k]) + IntegerReverse[k +1]; p = 10^(2 n -1) + j(10^(n - IntegerLength[j]/2)) + 1; q = IntegerReverse@ p; !PrimeQ@ p || !PrimeQ@ q, k++; If[ Mod[k, 10] == 9, k++]]; p]; fe[1] = 11;
    fo[n_] := Block[{k = 0, j, p}, While[ j = k(10^(IntegerLength[k] -1)) + IntegerReverse@ Quotient[k, 10]; p = 10^(2n -2) + j(10^(n - (IntegerLength[j] + 1)/2)) +1; !PrimeQ@ p, k++]; p];
    a[n_] := If[ OddQ@ n, fo[(n +1)/2], fe[n/2]]; Array[a, 21]

Formula

a(2n-1) = A100027(n) = A028989(n).
Showing 1-8 of 8 results.