Search: id:A111453 Results 1-1 of 1 results found. %I A111453 %S A111453 1,5,9,3,7,11,2,6,10,4,8,12,16,20,14,18,22,13,17,21,15,19,23,27,31,25, %T A111453 29,33,24,28,32,26,30,34,38,42,36,40,44,35,39,43,37,41,45,49,53,47,51, %U A111453 55,46,50,54,48,52,56,60,64,58,62,66,57,61,65,59,63,67,71,75,69,73,77 %N A111453 a(1)=1; for n>1, a(n) is smallest positive integer not occurring earlier in the sequence such that |a(n)-a(n-1)| is composite. %C A111453 Sequence is a permutation of the positive integers. %H A111453 Leroy Quet, Home Page (listed in lieu of email address) %F A111453 a(n)=n for n==1 (mod 11), a(n)=n+3 for n==2 (mod 11), a(n)=n+6 for n==3 (mod 11) %F A111453 a(n)=n-1 for n==4 (mod 11), a(n)=n+2 for n==5 (mod 11), a(n)=n+5 for n==6 (mod 11) %F A111453 a(n)=n-5 for n==7 (mod 11), a(n)=n-2 for n==8 (mod 11), a(n)=n+1 for n==9 (mod 11) %F A111453 a(n)=n-6 for n==10 (mod 11) a(n)=n-3 for n==0 (mod 11). - Robert G. Wilson v. %e A111453 Among those positive integers not among the first 8 terms of the sequence (4,8,10,12,...), a(9) = 10 is the lowest such that |a(9)-a(8)| = |10-6| = 4 is a composite. (|8-6|=2 and |4-6|=2 are both primes. So a(9) is not 4 or 8.) %t A111453 f[n_] := Switch[Mod[n, 11], 0, n - 3, 1, n, 2, n + 3, 3, n + 6, 4, n - 1, 5, n + 2, 6, n + 5, 7, n - 5, 8, n - 2, 9, n + 1, 10, n - 6]; Array[a, 72] (* or *) %t A111453 a[1] = 1; a[n_] := a[n] = Block[{k = 1, t = Table[a[i], {i, n - 1}]}, While[Position[t, k] != {} || PrimeQ[k - a[n - 1]] || Abs[k - a[n - 1]] == 1, k++ ]; k]; Array[a, 72] (* Robert G. Wilson v *) %Y A111453 Cf. A002808. %Y A111453 Sequence in context: A111698 A021948 A154265 this_sequence A153356 A129956 A010774 %Y A111453 Adjacent sequences: A111450 A111451 A111452 this_sequence A111454 A111455 A111456 %K A111453 nonn %O A111453 1,2 %A A111453 Leroy Quet Nov 14 2005 %E A111453 More terms from Robert G. Wilson v (rgwv(at)rgwv.com), Nov 17 2005 Search completed in 0.001 seconds