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.

Previous Showing 21-30 of 52 results. Next

A098996 a(n) = p*(p + 1)*(2*p + 1) where p is the n-th prime.

Original entry on oeis.org

30, 84, 330, 840, 3036, 4914, 10710, 14820, 25944, 51330, 62496, 105450, 142926, 164604, 214320, 306234, 421260, 465186, 615060, 731016, 794094, 1004880, 1164324, 1433790, 1853670, 2091306, 2217384, 2484540, 2625810, 2924214, 4145280, 4547796, 5199150, 5429340
Offset: 1

Views

Author

Parthasarathy Nambi, Nov 05 2004

Keywords

Comments

The unique primitive Pythagorean triple whose inradius is the n-th prime p and whose short leg is an odd number is (2*p+1, 2*p*(p+1), 2*p*(p+1)+1) and its area is a(n) = p*(p+1)*(2*p+1). - Miguel-Ángel Pérez García-Ortega, Mar 16 2025

Examples

			a(4) = 7*(7+1)*(2*7+1) = 840.
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2025.

Crossrefs

Programs

  • Magma
    [(p*(p+1)*(2*p+1)): p in PrimesUpTo(200)]; // Vincenzo Librandi, Feb 04 2011
  • Mathematica
    #(#+1)(2#+1)&/@Prime[Range[30]] (* Harvey P. Dale, Jun 23 2020 *)

Formula

a(n) = prime(n)*(prime(n)+1)*(2*prime(n)+1).

Extensions

More terms from Klaus Brockhaus, Nov 09 2004

A127921 1/12 of product of three numbers: n-th prime, previous and following number.

Original entry on oeis.org

2, 10, 28, 110, 182, 408, 570, 1012, 2030, 2480, 4218, 5740, 6622, 8648, 12402, 17110, 18910, 25058, 29820, 32412, 41080, 47642, 58740, 76048, 85850, 91052, 102078, 107910, 120232, 170688, 187330, 214268, 223790, 275650, 286900, 322478, 360882, 388108, 431462
Offset: 2

Views

Author

Artur Jasinski, Feb 06 2007

Keywords

Comments

Summation of products of partitions into two parts of prime(n): a(6) = (1*12) + (2*11) + (3*10) + (4*9) + (5*8) + (6*7) = 182. - César Aguilera, Feb 20 2018

Crossrefs

Programs

  • Magma
    [(NthPrime(n) + 1)*NthPrime(n)*(NthPrime(n) - 1)/12: n in [2..50]]; // G. C. Greubel, Apr 30 2018
  • Maple
    a:= n-> (p->p*(p^2-1)/12)(ithprime(n)):
    seq(a(n), n=2..40);  # Alois P. Heinz, Mar 08 2022
  • Mathematica
    Table[(Prime[n] + 1) Prime[n](Prime[n] - 1)/12, {n, 2, 100}]
    ((#-1)#(#+1))/12&/@Prime[Range[2,40]] (* Harvey P. Dale, Mar 08 2022 *)
  • PARI
    a(n,p=prime(n))=binomial(p+1,3)/2 \\ Charles R Greathouse IV, Feb 28 2018
    

Formula

a(n) ~ (n log n)^3/12. - Charles R Greathouse IV, Feb 28 2018

A138383 If prime(i) = i-th prime, a(n) = prime(n)+1 + prime(n)+2 + ... + prime(n+1). a(0) = 3 by convention.

Original entry on oeis.org

3, 3, 9, 13, 38, 25, 62, 37, 86, 159, 61, 207, 158, 85, 182, 303, 339, 121, 387, 278, 145, 459, 326, 519, 748, 398, 205, 422, 217, 446, 1687, 518, 807, 277, 1445, 301, 927, 963, 662, 1023, 1059, 361, 1865, 385, 782, 397, 2466, 2610, 902, 457, 926, 1419, 481, 2465, 1527
Offset: 0

Views

Author

Odimar Fabeny, May 08 2008

Keywords

Comments

First differences of A034953 for n > 0. - Gionata Neri, May 17 2015

Examples

			3 = 1 + 2;
3 = 3;
9 = 4 + 5;
13 = 6 + 7;
38 = 8 + 9 + 10 + 11;
...
		

Crossrefs

Cf. A000040.

Programs

  • Magma
    [3] cat [(NthPrime(n+1) - NthPrime(n))*(NthPrime(n+1) + NthPrime(n)+1)/2: n in [1..60]]; // Vincenzo Librandi, May 18 2015
    
  • Maple
    3, seq((ithprime(n+1)-ithprime(n))*(ithprime(n+1)+ithprime(n)+1)/2, n=1..100); # Robert Israel, May 17 2015
  • Mathematica
    Join[{3}, Table[(Prime[n+1] - Prime[n]) (Prime[n+1] + Prime[n] + 1)/2, {n, 60}]] (* Vincenzo Librandi, May 18 2015 *)
    Join[{3},(#[[2]]-#[[1]]) (Total[#]+1)/2&/@Partition[Prime[Range[ 60]],2,1]] (* Harvey P. Dale, Oct 27 2020 *)
  • Python
    from sympy import prime, nextprime
    def A138383(n):
        if n == 0: return 3
        q = nextprime(p:=prime(n))
        return (q-p)*(p+q+1)>>1 # Chai Wah Wu, Jun 01 2024

Formula

a(n) = (prime(n+1)-prime(n))*(prime(n+1)+prime(n)+1)/2 for n >= 1. - N. J. A. Sloane, May 08 2008

A203263 Primes p such that 29*p + 14 and 41*p + 20 are also prime.

Original entry on oeis.org

61, 103, 127, 271, 313, 331, 373, 457, 547, 571, 577, 613, 877, 967, 997, 1201, 1423, 1597, 2251, 2287, 2311, 2713, 2791, 2887, 3307, 3433, 3511, 3697, 3733, 3847, 4261, 4327, 4363, 4483, 4861, 4951, 5023, 5407, 5563, 5743, 6553, 6571, 6781, 6991, 7177, 7333
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 13 2012

Keywords

Comments

p*(p + 1)/2 is the first number in a set of three triangular numbers with prime indices in arithmetic progression with difference 420*p*(p + 1) + 105. - Arkadiusz Wesolowski, Oct 29 2013

References

  • Wacław Sierpiński, 200 zadan z elementarnej teorii liczb, Warsaw: PZWS, 1964, pp. 12, 61.
  • Wacław Sierpiński, 250 Problems in Elementary Number Theory. (Modern Analytic and Computational Methods in Science and Mathematics, No. 26), American Elsevier Publishing Co., Inc., New York; PWN Polish Scientific Publishers, Warsaw, 1970, pp. 7, 50.

Crossrefs

Cf. A034953.

Programs

  • Magma
    [p : p in PrimesUpTo(7333) | IsPrime(29*p+14) and IsPrime(41*p+20)]; // Arkadiusz Wesolowski, Oct 29 2013
  • Mathematica
    lst = {}; Do[p = Prime[n]; If[PrimeQ[29*p + 14] && PrimeQ[41*p + 20], AppendTo[lst, p]], {n, 10^3}]; lst
    Select[Prime[Range[1000]],AllTrue[{29#+14,41#+20},PrimeQ]&] (* Harvey P. Dale, Oct 05 2022 *)

A382070 Semiperimeter of the unique primitive Pythagorean triple whose inradius is the n-th prime and whose short leg is an odd number.

Original entry on oeis.org

15, 28, 66, 120, 276, 378, 630, 780, 1128, 1770, 2016, 2850, 3486, 3828, 4560, 5778, 7140, 7626, 9180, 10296, 10878, 12720, 14028, 16110, 19110, 20706, 21528, 23220, 24090, 25878, 32640, 34716, 37950, 39060, 44850, 46056, 49770, 53628, 56280, 60378
Offset: 1

Views

Author

Keywords

Examples

			For n=2, the short leg is A367573(2,1) = 7, the long leg is A367573(2,2) = 24 and the hypotenuse is A367573(2,3) = 25 so the semiperimeter is then a(2) = (7 + 24 + 25)/2 = 28.
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2025.

Crossrefs

Programs

  • Mathematica
    a=Table[Prime[n],{n,1,40}];Apply[Join,Map[{(#+1)(2#+1)}&,a]]

Formula

a(n) = (prime(n)+1) * (2*prime(n)+1).
a(n) = (A367573(n,1) + A367573(n,2) + A367573(n,3))/2.

A382097 Sum of the legs of the unique primitive Pythagorean triple whose inradius is the n-th prime and whose short leg is an odd number.

Original entry on oeis.org

17, 31, 71, 127, 287, 391, 647, 799, 1151, 1799, 2047, 2887, 3527, 3871, 4607, 5831, 7199, 7687, 9247, 10367, 10951, 12799, 14111, 16199, 19207, 20807, 21631, 23327, 24199, 25991, 32767, 34847, 38087, 39199, 44999, 46207, 49927, 53791, 56447, 60551
Offset: 1

Views

Author

Keywords

Examples

			For n=2, the short leg is A367573(2,1) = 7 and the long leg is A367573(2,2) = 24 so the sum of the legs is then a(2) = 7 + 24 = 31.
		

References

  • Miguel Ángel Pérez García-Ortega, José Manuel Sánchez Muñoz and José Miguel Blanco Casado, El Libro de las Ternas Pitagóricas, Preprint 2025.

Crossrefs

Programs

  • Mathematica
    a=Table[Prime[n],{n,1,40}];Apply[Join,Map[{2#^2+4#+1}&,a]]

Formula

a(n) = 2*(prime(n))^2 + 4*prime(n) + 1.
a(n) = A367573(n,1) + A367573(n,2).

A079725 Sum of composite numbers less than n-th prime.

Original entry on oeis.org

0, 0, 4, 10, 37, 49, 94, 112, 175, 305, 335, 505, 622, 664, 799, 1049, 1329, 1389, 1709, 1916, 1988, 2368, 2611, 3041, 3692, 3989, 4091, 4406, 4514, 4847, 6407, 6794, 7464, 7602, 8898, 9048, 9818, 10618, 11113, 11963, 12843, 13023, 14697, 14889, 15474
Offset: 1

Views

Author

N. J. A. Sloane, Feb 18 2003

Keywords

Examples

			Prime(6) = 13, so a(6) = 4 + 6 + 8 + 9 + 1 0 + 12 = 49 = 13*14/2 - 13 - 11 - 7 - 5 - 3 - 2 - 1.
		

Crossrefs

Equals A000217(Prime_n) - A007504(n) - 1 = A034953 - A007504 - A000012.
Partial sums of A054265.

Programs

  • Maple
    with(numtheory): A079725 := proc(n) local i:
    RETURN(ithprime(n)*(ithprime(n)+1)/2 add(ithprime(i),i=1..n)-1):
    end;
  • Mathematica
    a[n_] := Block[{p = Prime[n], k}, k = p(p + 1)/2 - 1 - Sum[Prime[i], {i, 1, n}]]; Table[ a[n], {n, 1, 45}]

Formula

a(n) = prime(n)*(prime(n)+1)/2 - sum_{1..n} prime(k) - 1.
Asymptotic expression: a(n) ~ n^2 * log(n)^2 / 2.

Extensions

Edited and extended by Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Robert G. Wilson v and T. D. Noe, Feb 18 2003

A096333 Prime numbers that are 2 less than a prime-indexed odd triangular number or 1 more than a prime-indexed even triangular number.

Original entry on oeis.org

7, 13, 29, 67, 89, 151, 191, 277, 433, 701, 859, 947, 1129, 1429, 1889, 2557, 2699, 4003, 4751, 5779, 8647, 11173, 12401, 13367, 14029, 16111, 18719, 19501, 22367, 24977, 27259, 31627, 33151, 36313, 36857, 38501, 39619, 47279, 49139, 56951
Offset: 1

Views

Author

Alonso del Arte, Aug 02 2004

Keywords

Examples

			a(2) = 13 because 15 is the 5th triangular number and since it is odd and we take 2 away from it, it yields the prime 13.
a(3) = 29 because 28 is the 7th triangular number and since it is even and we add 1 to it, it yields the prime 29.
497 is not on the list because although 496 is the 31st triangular number, but 496 + 1 = 7 * 71.
That sequence continues: 1771, 2279, 3161, 3487, 5149, 5357, 5993, 6439, 8129, 9451, 9731, ....
		

References

  • David Wells, The Penguin Dictionary of Curious & Interesting Numbers. In the entry for 496 he remarks that 496 is the smallest counterexample to the conjecture that an even, prime-indexed triangular plus 1 equals a prime, since 497 is not prime.

Crossrefs

Cf. A034953.

Programs

  • Mathematica
    tri[n_] := n(n + 1)/2; tp = Table[ tri[ Prime[n]], {n, 2, 70}]; f[n_] := If[ OddQ[n], n - 2, n + 1]; Select[f /@ tp, PrimeQ[ # ] &] (* Robert G. Wilson v, Aug 12 2004 *)
    Select[If[OddQ[#],#-2,#+1]&/@Table[(n(n+1))/2,{n,Prime[Range[ 100]]}], PrimeQ] (* Harvey P. Dale, Sep 19 2016 *)

Formula

Given the numbers of A034953, triangular numbers with prime indices, subtract 2 from the odd numbers on the list and add 1 to the even numbers on the list, then remove from the list the composite numbers.

Extensions

Edited and extended by Robert G. Wilson v, Aug 12 2004

A098033 Parity of p*(p+1)/2 for n-th prime p.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Jeremy Gardiner, Sep 10 2004

Keywords

Comments

The following sequences (possibly with a different offset for first term) all appear to have the same parity: A034953 = triangular numbers with prime indices; A054269 = length of period of continued fraction for sqrt(p), p prime; A082749 = difference between the sum of the next prime(n) natural numbers and the sum of the next n primes; A006254 = numbers n such that 2n-1 is prime; A067076 = numbers n such that 2n+3 is a prime.
Analogous to the prime race (mod 3). - Robert G. Wilson v, Sep 17 2004
See also A089253 = 2n-5 is a prime.
For n > 1, if A000040(n) == 1 (mod 4), then a(n) = 1, otherwise a(n)=0, so (for n>1) also a(n) = number of representations of A000040(n) as a difference of hexagonal numbers (A000384) (cf. [Nyblom, p. 262]). - L. Edson Jeffery, Feb 16 2013

Examples

			a(1) = parity of (2*(2+1)/2 = 3) = 1 (odd).
		

Crossrefs

Programs

Formula

a(n) = parity of p*(p+1)/2 for n-th prime p.
a(n) = 1 - A100672(n), n > 1. - Steven G. Johnson (stevenj(AT)math.mit.edu), Sep 18 2008
For n > 1, a(n) = (prime(n) mod 4) mod 3. - Gary Detlefs, Oct 27 2011

Extensions

More terms from Robert G. Wilson v, Sep 17 2004

A116994 Prime partial sums of triangular numbers with prime indices.

Original entry on oeis.org

3, 1759, 3323, 469303, 605113, 641969, 1110587, 1426669, 11148289, 18352349, 20473721, 21820391, 24710753, 30048589, 36690923, 40785301, 97060681, 155135369, 160593239, 168132247, 361391623, 377965069, 416572171, 645803201
Offset: 1

Views

Author

Jonathan Vos Post, Apr 02 2006

Keywords

Examples

			a(1) = Sum_{i=1..1} prime(i)*(prime(i)+1)/2 = T(2) = 3.
a(2) = Sum_{i=1..11} prime(i)*(prime(i)+1)/2 = T(2)+T(3)+T(5)+T(7)+T(11)+T(13)+T(17)+T(19)+T(23)+T(29)+T(31) = 1759.
a(3) = Sum_{i=1..13} prime(i)*(prime(i)+1)/2 = 3323.
a(4) = Sum_{i=1..53} prime(i)*(prime(i)+1)/2 = T(2) + ... + T(241) = 469303.
a(5) = Sum_{i=1..57} prime(i)*(prime(i)+1)/2 = T(2) + ... + T(269) = 605113.
a(6) = Sum_{i=1..58} prime(i)*(prime(i)+1)/2 = T(2) + ... + T(271) = 641969.
a(7) = Sum_{i=1..68} prime(i)*(prime(i)+1)/2 = T(2) + ... + T(337) = 1110587.
		

Crossrefs

Programs

  • Maple
    T:=n->n*(n+1)/2: a:=proc(n): if isprime(sum(T(ithprime(j)),j=1..n))=true then sum(T(ithprime(j)),j=1..n) else fi end: seq(a(n),n=1..500); # Emeric Deutsch, Apr 06 2006
  • Mathematica
    Select[Accumulate[Table[(n(n+1))/2,{n,Prime[Range[500]]}]],PrimeQ] (* Harvey P. Dale, Jan 25 2015 *)

Formula

A000040 INTERSECTION A085739. Primes in A085739.

Extensions

More terms from Emeric Deutsch, Apr 06 2006
Previous Showing 21-30 of 52 results. Next