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!)
A350831 a(n) is the least positive integer not listed earlier such that its first digit together with a(n-1)'s last digit can form a prime; a(1) = 1. 1

%I #10 May 06 2022 07:33:42

%S 1,3,2,9,5,31,4,7,6,11,12,32,33,8,34,13,14,15,35,36,16,17,18,37,19,21,

%T 38,39,22,91,41,42,92,93,23,24,71,43,25,94,72,95,96,73,26,74,75,97,44,

%U 76,77,45,98,99,27,46,78,301,47,48,302,303,28,304,79,29

%N a(n) is the least positive integer not listed earlier such that its first digit together with a(n-1)'s last digit can form a prime; a(1) = 1.

%C Conjectured to contain all positive integers not multiple of 10.

%H Éric Angelini, <a href="http://cinquantesignes.blogspot.com/2022/05/prime-bayonets.html">Prime bayonets</a>, personal web site "Cinquante signes" on blogspot.com, May 03 2022.

%o (PARI) u=[a=1]; vector(99,n, if(a>u[1]+1, u=setunion(u,[a]), u[1]=a; while(#u>1 && u[2]==u[1]+1+(u[1]%10==9),u=u[^1])); a%=10; my(k=u[1], d); n>1&& until(k++%10 && !setsearch(u,k) && (isprime(10*a+d=k\10^logint(k,10)) || isprime(10*d+a)), ); a=k)

%Y Cf. A350832 for a more complicated 2-digit variant.

%K nonn,base

%O 1,2

%A _M. F. Hasler_ and _Eric Angelini_, May 03 2022

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 April 23 12:08 EDT 2024. Contains 371912 sequences. (Running on oeis4.)