login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075594 a(1) = 1, a(2n) = composite, a(2n+1) = prime and sum of two successive terms is alternately prime or composite. 7
1, 4, 2, 9, 3, 8, 7, 6, 19, 10, 5, 12, 13, 16, 11, 18, 17, 14, 31, 22, 23, 20, 29, 24, 41, 26, 37, 30, 47, 32, 43, 28, 53, 36, 59, 38, 61, 40, 71, 42, 73, 34, 83, 44, 67, 46, 79, 48, 97, 52, 89, 50, 103, 54, 101, 56, 109, 58, 107, 60, 127, 64, 113, 66, 137, 62, 139, 72, 131 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Conjecture: a(n+r)= A075593(n) for n > k for some k and r. What is the value of k and r?
This is not a permutation of the positive integers; odd composites > 9 will not appear in the sequence. - Klaus Brockhaus, Feb 06 2006
LINKS
EXAMPLE
After terms 1, 4, 2, 9, 3, we seek the next term (n = 6). The requirement is the smallest composite not already seen that summed with a(5) is prime. That number is 8 and becomes a(6). Similarly, for n = 7, we require the smallest prime not already seen that summed with a(6) is composite. As 8 + 5 is not composite, a(7) = 7. - Bill McEachen, Feb 13 2023
PROG
(PARI) genit(nterms=69)={arr=List(); listput(arr, 1); listput(arr, 4); summ=arr[#arr]+arr[#arr-1]; for(ptr=3, +oo, if(#arr>nterms, break); for(i=2, +oo, if(ptr%2!=0&&isprime(i), q=arr[ptr-1]+i; z=Set(arr); if(setsearch(z, i)>0, next); z=Set(); if(isprime(summ)&& !isprime(q), listput(arr, i); summ=arr[#arr]+arr[#arr-1]; break)); if(ptr%2==0&&!isprime(i), q=arr[ptr-1]+i; z=Set(arr); if(setsearch(z, i)>0, next); z=Set(); if(!isprime(summ)&& isprime(q), listput(arr, i); summ=arr[#arr]+arr[#arr-1]; break)))); arr} \\ Bill McEachen, Apr 09 2023
CROSSREFS
Sequence in context: A201281 A095303 A060734 * A076022 A064421 A051494
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 27 2002
EXTENSIONS
Extended by Ray Chandler Feb 16 2005
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)