Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A055265
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A055265 Smallest positive integer not already in sequence with a(n)+a(n-1) prime. +0
8
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, 31, 28, 25, 34, 27, 26, 33, 38, 35, 32, 39, 40, 43, 36, 37, 42, 41, 48, 49, 52, 45, 44, 53, 50, 47, 54, 55, 46, 51, 56, 57, 70, 61, 66, 65, 62, 69, 58, 73, 64, 63, 68, 59, 72, 67, 60 (list; graph; listen)
OFFSET

1,2

COMMENT

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.

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

Index entries for sequences that are permutations of the natural numbers

EXAMPLE

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.

MATHEMATICA

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]

PROGRAM

(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]

CROSSREFS

Inverse permutation: A117922; fixed points: A117925; A117923=a(a(n)). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Apr 03 2006

Cf. A036440, A051237, A051239, A055266, A088643.

Sequence in context: A072275 A122989 A077223 this_sequence A117922 A073666 A092842

Adjacent sequences: A055262 A055263 A055264 this_sequence A055266 A055267 A055268

KEYWORD

easy,nice,nonn

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), May 09 2000

EXTENSIONS

Corrected by Hans Havermann (pxp(AT)rogers.com), Sep 24 2002

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 10 12:37 EST 2009. Contains 170569 sequences.


AT&T Labs Research