cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

5, 15, 36, 67, 112, 169, 240, 323, 424, 539, 662, 803, 964, 1133, 1312, 1523, 1746, 1987, 2246, 2519, 2808, 3119, 3436, 3787, 4154, 4529, 4920, 5337, 5770, 6219, 6682, 7173, 7672, 8203, 8760, 9323, 9912, 10517, 11140, 11783, 12450, 13135, 13836
Offset: 1

Views

Author

Zak Seidov, May 04 2005

Keywords

Comments

Terms are squares at only(?) three values of n = 3, 6, 4072: corresponding terms are 6^2, 13^2, and 15735^2.
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.

Crossrefs

Cf. A045943 (triangular matchstick numbers: 3*n*(n+1)/2).
Cf. A045943.
Cf. A166619, A166620. - Zak Seidov, Oct 18 2009

Programs

  • Magma
    [ &+[ NthPrime(n+i): i in [0..n] ]: n in [1..50] ];  // Bruno Berselli, Jul 08 2011
    
  • Mathematica
    a[n_]:=Plus@@Prime[Range[n, 2n]]
    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 *)
    Table[Total[Prime[Range[n,2n]]],{n,50}] (* Harvey P. Dale, Jun 10 2014 *)
  • PARI
    a(n)=my(s=0);forprime(p=prime(n),prime(2*n),s+=p);s \\ Charles R Greathouse IV, Jul 08 2011

Formula

a(n) = p(n) + p(n+1) + ... + p(2n-1) + p(2n), where p(k)=k-th prime.
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

A166619 Primes in A105720.

Original entry on oeis.org

5, 67, 1523, 1987, 3119, 9323, 11783, 14551, 21019, 42929, 108191, 177337, 194527, 225227, 244753, 251417, 265123, 301123, 308569, 450503, 507523, 622067, 655351, 772789, 835249, 860891, 900241, 940403, 995611, 1141241, 1171789, 1534727
Offset: 1

Views

Author

Zak Seidov, Oct 18 2009

Keywords

Crossrefs

Cf. A166620 (Positions of primes in A105720), A105720.

A166708 Squares in A105720.

Original entry on oeis.org

36, 169, 247590225
Offset: 1

Views

Author

Zak Seidov, Oct 18 2009

Keywords

Examples

			36=6^2=A105720(3),
169=13^2=A105720(6),
247590225=15735^2=A105720(4072)
No more terms up to 35746494200563714=A105720(34769014).
		

Crossrefs

Programs

  • Mathematica
    a=5;Do[a=a-Prime[n]+Prime[2n+1]+Prime[2n+2];If[IntegerQ[Sqrt[a]],Print[{a,n+1 }]],{n,1,10^8}];
Showing 1-3 of 3 results.