Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A085401
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A085401 a(0) = 1; a(n+1) is the smallest positive number (of at most two) such that abs(a(n) - a(n+1)) is the smallest prime not occurring earlier as difference of successive terms and a(n) + a(n+1) is composite. +0
3
1, 3, 6, 19, 14, 7, 18, 37, 20, 43, 14, 51, 82, 41, 84, 37, 96, 149, 88, 155, 226, 299, 220, 137, 48, 155, 58, 159, 56, 165, 52, 179, 310, 173, 34, 183, 32, 189, 26, 193, 20, 199, 18, 217, 26, 219, 416, 205, 428, 201, 434, 205, 444, 193, 434, 177, 446, 183, 454, 731 (list; graph; listen)
OFFSET

0,2

COMMENT

There are numbers which occur more than once, e.g. a(6) = a(42) = 18, a(8) = a(40) = 20.

Problem: Does every positive integer eventually occur?

EXAMPLE

a(4) = 14; the smallest prime not occurring earlier as difference of successive terms is 7; there are two numbers x such that abs(14 - x) = 7 and 14 + x is composite, namely x = 7 and x = 21. The smaller of these numbers is 7, so a(5) = 7.

a(11) = 51; the smallest prime not occurring earlier as difference of successive terms is 31; there are two numbers x such that abs(51 - x) = 31, namely x = 20 and x = 82 and 51 + 20 = 71 is not composite while 51 + 82 = 133 is composite;

hence a(12) = 82.

PROGRAM

(PARI) {in(n, v)=local(j, s, b); j=1; s=matsize(v)[2]; b=1; while(b&&j<=s, if(n==v[j], b=0, j++)); !b}

{print1(a=1, ", "); v=[]; for(n=1, 60, p=2; t=1; while(t>0, if(in(p, v), p=nextprime(p+1), if(p<a&&!isprime(2*a-p), t=0; b=a-p, if(!isprime(2*a+p), t=0; b=a+p, p=nextprime(p+1))))); v=concat(v, p); print1(a=b, ", "))}

CROSSREFS

Cf. A085061, A085402.

Sequence in context: A038060 A135504 A057268 this_sequence A085061 A090956 A108972

Adjacent sequences: A085398 A085399 A085400 this_sequence A085402 A085403 A085404

KEYWORD

nonn

AUTHOR

Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 28 2003

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 17 23:40 EST 2009. Contains 171025 sequences.


AT&T Labs Research