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!)
A064799 Sum of n-th prime number and n-th composite number. 7
6, 9, 13, 16, 21, 25, 31, 34, 39, 47, 51, 58, 63, 67, 72, 79, 86, 89, 97, 103, 106, 113, 118, 125, 135, 140, 143, 149, 153, 158, 173, 179, 186, 189, 200, 203, 211, 218, 223, 230, 237, 241, 253, 256, 261, 264, 277, 291, 296, 299, 305, 313, 316, 327, 334, 341 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
REFERENCES
Ivan Grischenko, ivansasha(AT)mtu-net.ru, private communication.
LINKS
FORMULA
a(n) = prime(n) + composite(n).
From Jaroslav Krizek, Dec 13 2009: (Start)
a(n) = A000040(n) + A002808(n).
a(n) = A171639(n+1). (End)
EXAMPLE
a(1)=6 because the first prime is 2 and the first composite is 4; 2 + 4 = 6
a(2)=9 because prime(2)=3 and composite(2)=6; 3 + 6 = 9.
MATHEMATICA
Module[{nn=100, cmps}, cmps=Select[Range[nn], CompositeQ]; Total/@Thread[{Prime[Range[ Length[ cmps]]], cmps}]] (* Harvey P. Dale, Mar 31 2024 *)
PROG
(PARI)
nextComp(n)= { if (!isprime(n), return(n)); return(n + 1) }
{ p=1; c=3; for (n=1, 100, p=nextprime(p + 1); c=nextComp(c + 1); print1(p + c, ", ") ) } \\ Harry J. Smith, Sep 25 2009
(Python)
from sympy import prime, composite
def A064799(n): return prime(n)+composite(n) # Chai Wah Wu, Aug 30 2021
CROSSREFS
Sequence in context: A242874 A284800 A242295 * A236763 A030499 A181428
KEYWORD
nonn,easy
AUTHOR
Konstantin Knop, Oct 21 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Nov 12 2001
Offset changed from 0 to 1 by Harry J. Smith, Sep 25 2009
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 May 5 16:17 EDT 2024. Contains 372275 sequences. (Running on oeis4.)