The OEIS is supported by the many generous donors to the OEIS Foundation.

 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 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A249405 Numbers such that any two adjacent digits sum to a prime and such that any digit 0,...,9 can be inserted somewhere preserving this property. 1

%I #18 Feb 11 2021 07:33:00

%S 411203,411205,3202114,4111203,4111205,4112023,4112025,5202114,

%T 30211234,30232114,30234114,30252114,30256114,32021114,32032114,

%U 32034114,32052114,32056114,32074114,32076114,32112034,32112074,32302114,32502114,41111203

%N Numbers such that any two adjacent digits sum to a prime and such that any digit 0,...,9 can be inserted somewhere preserving this property.

%C "Inserted" includes the possibility of appending the digit or prefixing it if nonzero.

%C A subsequence of A182175.

%C There are only two terms, a(1)=411203 and a(2)=411205, below 10^6, and six more terms below 10^7, but many 8-digit terms.

%H M. F. Hasler, <a href="/A249405/b249405.txt">Table of n, a(n) for n = 1..124</a>

%e a(n)=411203 is the least member of A182175 such that each of the digits 0-9 can be inserted somewhere such that another term of A182175 is obtained; e.g., 411203[0], 41[1]1203, 41[2]1203, 4112[3]03, 41[4]1203, 4112[5]03, 41[6]1203, [7]411203, 411203[8], [9]411203.

%o (PARI) is(n)={is_A182175(n)||return; n=digits(n); !for(D=0,9,isprime(n[#n]+D)&&next;D&&isprime(n[1]+D)&&next;for(i=3-!D,#n-1,isprime(n[i-1]+D)&&isprime(n[i]+D)&&next(2));return)} \\ A digit D=0 may not be prefixed but may be inserted after the first digit (which is irrelevant for digits > 0).

%K nonn,base

%O 1,1

%A _M. F. Hasler_, Oct 27 2014

%E Data and b-file corrected thanks to a remark by _Hans Havermann_, _M. F. Hasler_, Oct 29 2014

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.

Last modified December 7 12:41 EST 2023. Contains 367656 sequences. (Running on oeis4.)