%I A055265
%S A055265 1,2,3,4,7,6,5,8,9,10,13,16,15,14,17,12,11,18,19,22,21,20,23,24,29,30,
%T A055265 31,28,25,34,27,26,33,38,35,32,39,40,43,36,37,42,41,48,49,52,45,44,53,
%U A055265 50,47,54,55,46,51,56,57,70,61,66,65,62,69,58,73,64,63,68,59,72,67,60
%N A055265 Smallest positive integer not already in sequence with a(n)+a(n-1) prime.
%C A055265 Does every positive integer eventually occur? - Dmitry Kamenetsky, May
27 2009. Reply from Robert G. Wilson, v., May 27 2009: The answer
is almost certainly yes, on probabilistic grounds.
%H A055265 T. D. Noe, <a href="b055265.txt">Table of n, a(n) for n=1..1000</a>
%H A055265 <a href="Sindx_Per.html#IntegerPermutation">Index entries for sequences
that are permutations of the natural numbers</a>
%e A055265 a(5)=7 because 1, 2, 3 and 4 have already been used and neither 4+5=9
nor 4+6=10 are prime while 4+7=11 is prime.
%t A055265 f[s_List] := Block[{k = 1, a = s[[ -1]]}, While[ MemberQ[s, k] || ! PrimeQ[a
+ k], k++ ]; Append[s, k]]; Nest[f, {1}, 71] [From Robert G. Wilson
v (rgwv(AT)rgwv.com), May 27 2009]
%o A055265 (Other) HP 50G Calculator << DUPDUP + 2 -> N M L << { 1 } 1 N 1 - FOR
i L M FOR j DUP j POS NOT IF THEN j DUP 'L' STO M 'j' STO END NEXT
OVER i GET SWAP WHILE DUP2 + DUP ISPRIME? NOT REPEAT DROP DO 1 +
3 PICK OVER POS NOT UNTIL END END ROT DROP2 + NEXT >> >> [From Gerald
Hillier (adr.rabbicat(AT)gmail.com), Oct 28 2008]
%Y A055265 Inverse permutation: A117922; fixed points: A117925; A117923=a(a(n)).
- Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Apr 03 2006
%Y A055265 Cf. A036440, A051237, A051239, A055266, A088643.
%Y A055265 Sequence in context: A072275 A122989 A077223 this_sequence A117922 A073666
A092842
%Y A055265 Adjacent sequences: A055262 A055263 A055264 this_sequence A055266 A055267
A055268
%K A055265 easy,nice,nonn
%O A055265 1,2
%A A055265 Henry Bottomley (se16(AT)btinternet.com), May 09 2000
%E A055265 Corrected by Hans Havermann (pxp(AT)rogers.com), Sep 24 2002
|