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”).

A133781
Prime sequence overlaying the central digits of prime numbers. If possible, the value is greater than the previous one. Zero if no such embedding is possible.
1
127, 131, 151, 173, 1117, 2131, 2179, 3191, 4231, 4297, 6311, 6373, 7411, 7433, 7477, 7537, 7591, 9613, 9677, 9719, 9733, 9791, 9833, 2897, 2971, 21011, 21031, 31079, 31091, 31139, 31271, 31319, 31379, 31391, 41491, 41513, 41579, 51631, 51673
OFFSET
1,1
COMMENTS
Breaks occur in the monotonic sequence at 2897, 12277, 12511, 24499, etc.
Each prime is exactly two digits longer than the embedded central prime.
FORMULA
Overlay the prime sequence in the exact center of a larger monotonically increasing prime sequence. If a break occurs resume at the break point and continue.
EXAMPLE
a(5) is 1117 because the 5th prime, 11, overlays the central digits of 1117, exactly. The prime 1117 is in monotonically increasing order beginning 127, 131, 151, 173, 1117, ....
PROG
(UBASIC) 10 C=26:Q=str(C):T=443
20 'monotonically increasing primes
30 'centered in primes
40 'change val(m) in 100
50 'adjust T in line 10 after every break
60 N=101
70 A=3:S=sqrt(N)
80 B=N\A
90 if B*A=N then N=N+2:goto 70
100 A=A+2
110 if A<=sqrt(N) then 80
120 Z=str(N):W=alen(N):W=W-2:M=mid(Z, 3, W): if M=Q then print C, N:stop
130 if val(M)=nxtprm(T) then print Q, M, Z:T=val(M):stop
140 C=C+1:Q=str(C)
150 N=N+2:goto 70
CROSSREFS
Sequence in context: A102636 A335314 A075595 * A255227 A153815 A194634
KEYWORD
easy,nonn,base
AUTHOR
Enoch Haga, Sep 23 2007
EXTENSIONS
Edited by Franklin T. Adams-Watters, Oct 04 2012
STATUS
approved