The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057199 The first nontrivial (k>n+2) palindromic prime in both bases n and n+2 or -1 if it does not exist. 2

%I #43 Sep 17 2019 20:04:28

%S 5,1667,7517,34853363,116755331881,20537111057,373

%N The first nontrivial (k>n+2) palindromic prime in both bases n and n+2 or -1 if it does not exist.

%C a(9) > 5.5*10^22, a(10) = 181, a(11) = 161292069901, a(12) = 773. - _Giovanni Resta_, Feb 28 2013

%C From _Chai Wah Wu_, Sep 16 2019: (Start)

%C a(13)-a(100) = 56941, 337, 169445909, 433, 578839, 541, 106121443, 661, 582983, 4519, 682764227, 937, 689851, 1093, 741551113, 7177, 2828257, 12043, 24785688133, 8167, 3350657, 6737, 78730410146989, 2053, 26105363, 2281, 8354404853, 2521, 6204901, 10169, 14829078601, 3037, 11169317, 3313, ?, 27611, 18718787, 9103, 771909202297, 21067, 25391137, 74167, ?, 37363, 90483233, 26107, 736007755807927, 5581, 22104937, 5953, 276580159573, 6337, 28246531, 6733, 200524263889, 54751, 131969267, 7561, ?, 7993, 135040879, 19687, 1451803410833, 8893, 462569659, 46807, 792717779333, 22963, 451983979, 10333, ?, 10837, 81892231, 11353, 1873894723213, 59407, 393477817, 12421, 10617265587037, 12973, 663428993, 13537, ?, 51749, 507537761, 34303, 16515848080133, 76507.

%C It seems that when n is of the form 12*m + 11, a(n) tends to be large (if it exists at all).

%C For n > 2, a(n) >= n^2+5n+1 if it exists. Proof: Let a(n) = k. k must have at least 2 digits in base n since k > n+2. If k has 2 digits, then k = an+a which is composite for a > 1. If a = 1, then k = n+1 < n+2. Thus k must have at least 3 digits in base n. If k is a palindrome in base n written as 1x1 where x < 5, then k in base n+2 is a 2 digit palindrome which again would be composite as k > n+3 for n > 2.

%C Suppose n > 6 is even. Then a(n) >= 3*n^2/2 + 3*n + 1 if it exists. If 3*n^2/2 + 3*n + 1 is prime, then a(n) = 3*n^2/2 + 3*n + 1. Proof: by the above, a(n) must be of the form 1x1 in base n = 1y1 in base n+2 with 4 < x < n and y > 0. This corresponds to nx = 4(n+1)+(n+2)y. Solving this linear Diophantine equation in x and y shows that x = n/2 + 3 and y = n/2 - 2 which implies that 1x1 in base n = 3*n^2/2 + 3*n + 1.

%C This also implies that the prime star numbers A083577(n) for n > 3 is a subsequence.

%C Conjecture: a(n) <> -1 for all n.

%C (End)

%e a(3) = 1667 because it is the first prime > 5 which is a palindrome in both base 3 and 5.

%t f[n_] := Block[{k = n + 3}, While[a = IntegerDigits[k, n]; b = IntegerDigits[k, n + 2]; ! PrimeQ[k] || a != Reverse[a] || b != Reverse[b], k++]; k]; Do[ Print[{n, f[n] // Timing}], {n, 2, 10}]

%Y Cf. A048269, A083577.

%K nonn,base,more

%O 2,1

%A _Robert G. Wilson v_, Sep 16 2000

%E a(6)-a(8) from _Giovanni Resta_, Feb 28 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 12:27 EDT 2024. Contains 372712 sequences. (Running on oeis4.)