Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)

Revision History for A068632

(Underlined text is an addition; strikethrough text is a deletion.)

Showing all changes.
A068632 a(1) = 2; a(n+1) = smallest composite number not in the sequence such that the sum of all the terms is prime.
(history; published version)
#7 by N. J. A. Sloane at Thu Dec 05 19:55:11 EST 2013
AUTHOR

_Amarnath Murthy (amarnath_murthy(AT)yahoo.com), _, Feb 26 2002

Discussion
Thu Dec 05 19:55
OEIS Server: https://oeis.org/edit/global/2075
#6 by Russ Cox at Sat Mar 31 10:22:55 EDT 2012
EXTENSIONS

Corrected and extended by _Sascha Kurz (sascha.kurz(AT)uni-bayreuth.de), _, Mar 26 2002

Discussion
Sat Mar 31 10:22
OEIS Server: https://oeis.org/edit/global/354
#5 by N. J. A. Sloane at Fri Jan 09 03:00:00 EST 2009
MAPLE

a[1] := 2:for i from 2 to 120 do j := 2:while(true)do j := j+1:: if((not isprime(j)) and (not (j=a[i-1]))) then bo := true: for h from 1 to i-1 do if(a[h]=j) then bo := false end if:end do:: if(isprime(sum(a[k], k=1..i-1)+j) and bo=true) then a[i] := j:break:end if:end if:end do:end do:seq(a[k], k=1..120);

KEYWORD

easy,nonn,new

#4 by N. J. A. Sloane at Wed Sep 22 03:00:00 EDT 2004
KEYWORD

easy,nonn,new

EXTENSIONS

Corrected and extended by Sascha Kurz (sascha.kurz(AT)stud.uni-bayreuth.de), Mar 26 2002

#3 by N. J. A. Sloane at Sat Jun 12 03:00:00 EDT 2004
MAPLE

a[1]:=] := 2:for i from 2 to 120 do j:= := 2:while(true)do j:= := j+1:if((not isprime(j)) and (not (j=a[i-1]))) then bo:= := true: for h from 1 to i-1 do if(a[h]=j) then bo:= := false end if:end do:if(isprime(sum(a[k], k=1..i-1)+j) and bo=true) then a[i]:=] := j:break:end if:end if:end do:end do:seq(a[k], k=1..120);

KEYWORD

easy,nonn,new

#2 by N. J. A. Sloane at Sat Sep 13 03:00:00 EDT 2003
KEYWORD

easy,nonn,new

EXTENSIONS

Corrected and extended by Sascha Kurz (ssascha.kurz(AT)tustud.uni-bsbayreuth.de), Mar 26 2002

#1 by N. J. A. Sloane at Fri May 16 03:00:00 EDT 2003
NAME

a(1) = 2; a(n+1) = smallest composite number not in the sequence such that the sum of all the terms is prime.

DATA

2, 9, 6, 12, 8, 4, 18, 14, 10, 20, 24, 22, 30, 32, 16, 36, 44, 40, 26, 28, 38, 48, 34, 42, 50, 46, 60, 54, 56, 52, 66, 62, 78, 64, 72, 68, 70, 86, 76, 74, 96, 84, 90, 82, 80, 58, 92, 88, 104, 102, 106, 98, 100, 110, 112, 120, 132, 108, 140, 94, 116, 114, 124, 126, 128, 136

OFFSET

0,1

EXAMPLE

a(3) = 6 not 4 as 2 + 9 + 6 = 17 is prime, while 2+9 +4 = 15 is composite.

MAPLE

a[1]:=2:for i from 2 to 120 do j:=2:while(true)do j:=j+1:if((not isprime(j)) and (not (j=a[i-1]))) then bo:=true: for h from 1 to i-1 do if(a[h]=j) then bo:=false end if:end do:if(isprime(sum(a[k], k=1..i-1)+j) and bo=true) then a[i]:=j:break:end if:end if:end do:end do:seq(a[k], k=1..120);

CROSSREFS

Cf. A068631.

KEYWORD

easy,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Feb 26 2002

EXTENSIONS

Corrected and extended by Sascha Kurz (s.kurz(AT)tu-bs.de), Mar 26 2002

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 August 18 19:26 EDT 2024. Contains 375273 sequences. (Running on oeis4.)