login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Minimal nested base-4 palindromic primes with seed 1.
3

%I #9 Oct 23 2015 13:42:06

%S 1,12121,111212111,31112121113,133111212111331,123133111212111331321,

%T 303123133111212111331321303,3030312313311121211133132130303,

%U 30303031231331112121113313213030303,3303030312313311121211133132130303033,11330303031231331112121113313213030303311

%N Minimal nested base-4 palindromic primes with seed 1.

%C Using only base-4 digits 0,1,2,3, let s be a palindrome and put a(1) = s. Let a(2) be the least palindromic prime having s in the middle; for n > 2, let a(n) be the least palindromic prime have a(n-1) in the middle. Then (a(n)) is the sequence of minimal nested base-4 palindromic primes with seed s.

%H Clark Kimberling, <a href="/A262635/b262635.txt">Table of n, a(n) for n = 1..300</a>

%e a(3) = 111212111 is the least base-4 prime having a(2) = 12121 in its middle. Triangular format:

%e 1

%e 12121

%e 111212111

%e 31112121113

%e 133111212111331

%e 123133111212111331321

%t s = {1}; base = 4; z = 20; Do[NestWhile[# + 1 &, 1, ! PrimeQ[tmp = FromDigits[Join[#, IntegerDigits[Last[s]], Reverse[#]] &[IntegerDigits[#, base]], base]] &];

%t AppendTo[s, FromDigits[IntegerDigits[tmp, base]]], {z}]; s (* A262635 *)

%t Map[FromDigits[ToString[#], base] &, s] (* A262636 *)

%t (* _Peter J. C. Moses_, Sep 01 2015 *)

%Y Cf. A261881 (base 10), A262636, A262627. Subsequence of A117699.

%K nonn,base

%O 1,2

%A _Clark Kimberling_, Oct 02 2015