The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A267299 a(n+1) = least positive integer not occurring earlier which yields a prime when added to the last digit of a(n); a(1) = 1. 3
 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 11, 12, 15, 14, 13, 16, 17, 22, 21, 18, 23, 20, 19, 28, 29, 32, 27, 24, 25, 26, 31, 30, 37, 34, 33, 38, 35, 36, 41, 40, 43, 44, 39, 50, 47, 46, 53, 56, 55, 42, 45, 48, 51, 52, 57, 54, 49, 58, 59, 62, 65, 66, 61, 60, 67, 64, 63, 68, 71, 70, 73, 76, 77, 72, 69, 74, 75, 78, 81, 82, 87, 90, 79, 80, 83, 86, 91, 88, 89, 92, 95 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Lists all positive integers except for the terms of A076150 (which start with 114). From Robert Israel, Jan 20 2016: (Start) Here is a proof of this claim. The only way positive integer x can fail to occur is that eventually all terms end in digits d such that x+d is composite.  Let S be the set of residue classes mod 10 that contain infinitely many terms of the sequence.  Since the sequence is infinite, S is nonempty.  Since there are infinitely many primes in each of the residue classes 1,3,7,9 mod 10, S is closed under the operations t -> 1-t, t -> 3-t, t -> 7-t, t -> 9-t (all mod 10).  Using these operations we have a cycle 0 -> 1 -> 2 -> 5 -> 4 -> 7 -> 6 -> 3 -> 8 -> 9 -> 0 containing all 10 residue classes.  Thus S consists of all 10 residue classes, which means the only way x can fail to occur is that x+0, ..., x+9 are all composite. (End) LINKS Robert Israel, Table of n, a(n) for n = 1..10000 E. Angelini, J. Mason and M. F. Hasler, A light variation, SeqFan list, Jan. 20, 2016 MAPLE N:= 1000: # to get terms before the first term > N V:= Vector(N): Primes:= select(isprime, [2, seq(i, i=3..N, 2)]): A:= 1: V:= 1: for n from 2 do t:= A[n-1] mod 10; r:= select(j -> j > 0 and V[j] = 0, map(`-`, Primes, t));   if r = [] then break fi;   A[n]:= r; V[r]:= 1; od: seq(A[i], i=1..n-1); # Robert Israel, Jan 20 2016 MATHEMATICA a = {1}; Do[k = 1; While[Or[MemberQ[a, k], ! PrimeQ[Last@ IntegerDigits@ a[[n - 1]] + k]], k++]; AppendTo[a, k], {n, 2, 91}]; a (* Michael De Vlieger, Jan 20 2016 *) PROG (PARI) {A267299(n, show=0, a=1/*first term*/, u=0, L=1)=for(n=1, n-1, show&&print1(a", "); bittest(u+=1<

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 26 09:05 EDT 2021. Contains 347664 sequences. (Running on oeis4.)