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.

A107124 Numbers k such that (10^(2*k+1)+27*10^k-1)/9 is prime.

Original entry on oeis.org

2, 3, 32, 45, 1544
Offset: 1

Views

Author

Farideh Firoozbakht, May 19 2005

Keywords

Comments

k is in the sequence iff the palindromic number 1(k).4.1(k) is prime (dot between numbers means concatenation). If k is in the sequence then k is not of the forms 3m+1, 16m+11, 16m+12, 18m+11, 18m+15, etc. (the proof is easy).

Examples

			32 is in the sequence because the palindromic number (10^(2*32+1)+27*10^32-1)/9 = 1(32).4.1(32) =
11111111111111111111111111111111411111111111111111111111111111111 is prime.
		

References

  • C. Caldwell and H. Dubner, "Journal of Recreational Mathematics", Volume 28, No. 1, 1996-97, pp. 1-9.

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[(10^(2n + 1) + 27*10^n - 1)/9], Print[n]], {n, 2200}]
    Select[Range[1600],PrimeQ[FromDigits[Join[PadRight[{},#,1],{4},PadRight[ {},#,1]]]]&] (* Harvey P. Dale, Aug 01 2017 *)
  • PARI
    is(n)=ispseudoprime((10^(2*n+1)+27*10^n-1)/9) \\ Charles R Greathouse IV, May 22 2017

Formula

a(n) = (A077780(n)-1)/2.

Extensions

Edited by Ray Chandler, Dec 28 2010