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!)
A105720 Triangular matchstick numbers in the class of prime numbers: sum of n-th and next n primes. 7

%I #20 Sep 08 2022 08:45:17

%S 5,15,36,67,112,169,240,323,424,539,662,803,964,1133,1312,1523,1746,

%T 1987,2246,2519,2808,3119,3436,3787,4154,4529,4920,5337,5770,6219,

%U 6682,7173,7672,8203,8760,9323,9912,10517,11140,11783,12450,13135,13836

%N Triangular matchstick numbers in the class of prime numbers: sum of n-th and next n primes.

%C Terms are squares at only(?) three values of n = 3, 6, 4072: corresponding terms are 6^2, 13^2, and 15735^2.

%C Terms are prime at many values of n; at n = 1, 4, 16, 18, 22, 36, 40, 44, 52 they are 5, 67, 1523, 1987, 3119, 9323, 11783, 14551, 21019.

%H Harvey P. Dale, <a href="/A105720/b105720.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = p(n) + p(n+1) + ... + p(2n-1) + p(2n), where p(k)=k-th prime.

%F a(1)=5; for n > 1, a(n) = a(n-1) - prime(n-1) + prime(2*n-1) + prime(2*n). - _Zak Seidov_, Oct 18 2009

%t a[n_]:=Plus@@Prime[Range[n, 2n]]

%t a=5;s={5};Do[a=a-Prime[n]+Prime[2n+1]+Prime[2n+2];AppendTo[s,a],{n,10^5}]; (* _Zak Seidov_, Oct 18 2009 *)

%t Table[Total[Prime[Range[n,2n]]],{n,50}] (* _Harvey P. Dale_, Jun 10 2014 *)

%o (Magma) [ &+[ NthPrime(n+i): i in [0..n] ]: n in [1..50] ]; // _Bruno Berselli_, Jul 08 2011

%o (PARI) a(n)=my(s=0);forprime(p=prime(n),prime(2*n),s+=p);s \\ _Charles R Greathouse IV_, Jul 08 2011

%Y Cf. A045943 (triangular matchstick numbers: 3*n*(n+1)/2).

%Y Cf. A045943.

%Y Cf. A166619, A166620. - _Zak Seidov_, Oct 18 2009

%K nonn

%O 1,1

%A _Zak Seidov_, May 04 2005

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 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)