login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084834 a(n) is the smallest number not previously used such that a(n)+a(n-1), a(n)+a(n-1)+a(n-2), ..., a(n)+...+a(1) are not prime. 5
1, 3, 5, 7, 9, 11, 13, 15, 17, 4, 6, 30, 38, 10, 36, 14, 34, 42, 39, 21, 69, 27, 33, 45, 20, 16, 24, 50, 25, 51, 66, 18, 72, 54, 60, 74, 22, 8, 19, 41, 28, 48, 44, 40, 78, 57, 35, 58, 102, 12, 63, 65, 64, 56, 46, 96, 68, 76, 114, 80, 52, 84, 90, 99, 55, 2, 93, 75, 100, 62, 120, 98 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

No sum of a continuous subsequence is ever prime. Is every integer used? Can an odd number ever be surrounded by two even numbers (and similarly for even numbers)?

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

EXAMPLE

a(4)=7 because 7 is the smallest unused number such that 1+3+5+x, 3+5+x and 5+x are all composite

PROG

(PARI) checkprime(a, b)=local(fl); fl=0; for (i=1, b-1, if (isprime(a+s[i]), fl=1; break)); if (fl==0, for (j=1, b-1, if (a==p[j], fl=1; break))); fl

p=vector(300); p[1]=1; pc=2; while (pc<300, x=1; s=vector(300); for (i=1, pc-1, s[i]=sum(k=i, pc-1, p[k])); i=1; while (checkprime(x, pc), x++); p[pc]=x; pc++); p

CROSSREFS

Cf. A084833, A254337.

Sequence in context: A187232 A187907 A024806 * A118137 A160931 A160924

Adjacent sequences:  A084831 A084832 A084833 * A084835 A084836 A084837

KEYWORD

nonn

AUTHOR

Jon Perry, Jun 06 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 19:30 EDT 2020. Contains 336451 sequences. (Running on oeis4.)