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-8 of 8 results.

A129545 Triangular numbers T such that T+1 is a prime.

Original entry on oeis.org

1, 6, 10, 28, 36, 66, 78, 136, 190, 210, 276, 378, 630, 820, 946, 990, 1128, 1326, 1596, 1830, 2016, 2080, 2346, 2556, 2850, 2926, 3570, 3916, 4560, 4656, 4950, 5050, 5778, 6216, 6328, 8646, 8778, 9180, 9870, 11026, 12720, 13366, 14028, 14196, 14878
Offset: 1

Views

Author

Zak Seidov, May 30 2007

Keywords

Comments

The only triangular numbers T such that T-1 is a (positive) prime are 3 and 6.

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[200]],PrimeQ[#+1]&] (* Harvey P. Dale, Nov 08 2011 *)
  • Python
    from sympy import isprime
    def T(n): return n*(n+1)//2
    def ok(T): return isprime(T+1)
    print(list(filter(ok, (T(n) for n in range(175))))) # Michael S. Branicky, Jun 18 2021

Formula

a(n) = A000217(A067186(n)). - R. J. Mathar, Dec 10 2007
a(n) = A055469(n) - 1. - Joerg Arndt, Jun 19 2021

A129752 Triangular numbers t which are average of two consecutive primes p and p+4.

Original entry on oeis.org

15, 21, 45, 105, 231, 351, 465, 741, 861, 1431, 1485, 3081, 3321, 4005, 7875, 10731, 11175, 11781, 13695, 14535, 17205, 17391, 18915, 21321, 22155, 23871, 30135, 33411, 36585, 39621, 42195, 51681, 58311, 80601, 90525, 92235, 97461, 108345
Offset: 1

Views

Author

Zak Seidov, May 14 2007

Keywords

Comments

All terms are multiples of 3.

Examples

			15-/+2=(13,17), 21-/+2=(19,23), 45-/+2=(43,47) are pairs of consecutive primes.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t-2) and isprime(t+2), [seq(i*(i+1)/2,i=1..1000)]); # Robert Israel, Oct 18 2020

Formula

t-/+2 are pair of consecutive primes.

A263674 Double interprimes: a(n) = (q+r)/2 = (p+s)/2 with p

Original entry on oeis.org

9, 12, 15, 18, 30, 42, 60, 81, 102, 105, 108, 120, 144, 165, 186, 195, 228, 260, 270, 312, 363, 381, 399, 420, 426, 441, 462, 489, 495, 552, 570, 582, 600, 696, 705, 714, 765, 816, 825, 858, 870, 882, 897, 924, 987, 1026, 1050, 1056, 1092, 1113, 1167, 1230
Offset: 1

Views

Author

Antonio Roldán, Oct 23 2015

Keywords

Comments

Values of p (lesser of consecutive primes) are in the sequence A022885.

Examples

			600 is in this sequence because 593, 599, 601 and 607 are consecutive primes, and 600 = (599+601)/2 = (593+607)/2.
		

Crossrefs

Programs

  • Mathematica
    (Prime@ # + Prime[# + 3])/2 & /@ Select[Range@ 240, (First@ # + Last@ #)/2 == (#[[2]] + #[[3]])/2 &@ Prime@ Range[#, # + 3] &] (* Michael De Vlieger, Nov 18 2015 *)
    Mean/@Select[Partition[Prime[Range[300]],4,1],(#[[2]]+#[[3]])/2==(#[[1]]+#[[4]])/2&] (* Harvey P. Dale, Aug 18 2024 *)
  • PARI
    {forprime(q=3,2000,p=precprime(q-1); r=nextprime(q+1); s=nextprime(r+1);m=(q+r)/2;if(m==(p+s)/2,print1(m,", ")))}

A263676 Numbers that are both interprime and oblong.

Original entry on oeis.org

6, 12, 30, 42, 56, 72, 240, 342, 420, 462, 506, 552, 600, 650, 870, 1056, 1190, 1482, 1722, 1806, 2550, 2652, 2970, 3540, 4422, 6320, 7140, 8010, 10302, 12656, 13572, 14042, 17292, 18360, 19182, 19460, 20022, 22952, 23562, 24180, 27060, 29070, 29756, 31152, 33306, 35156, 35532, 39006
Offset: 1

Views

Author

Antonio Roldán, Oct 23 2015

Keywords

Examples

			342 is in this sequence because 342 = 18*19 is oblong, and 342 = (337 + 347)/2, with 337 and 347 consecutive primes.
		

Crossrefs

Intersection of A024675 and A002378. - Omar E. Pol, Oct 24 2015
Lesser of consecutive primes is in the sequence A242383.

Programs

  • Mathematica
    lim = 40000; Intersection[Plus @@@ Partition[Table[Prime@ n, {n, 2, PrimePi@ lim}], 2, 1]/2, Table[n (n + 1), {n, 0, lim}]] (* Michael De Vlieger, Nov 18 2015, after Clark Kimberling at A024675 and Robert G. Wilson v at A002378 *)
    obQ[n_]:=With[{divs=Partition[Divisors[n],2,1]},Length[Select[divs,#[[2]]-#[[1]]== 1 && Times@@#==n&]]>0]; Select[Mean/@Partition[Prime[ Range[ 2,40000]],2,1],obQ] (* Harvey P. Dale, Nov 01 2022 *)
  • PARI
    {for(i=1,500,n=i*(i+1);if(n==(precprime(n-1)+nextprime(n+1))/2, print1(n,", ")))}

A263675 Numbers that are both averages of consecutive primes and nontrivial prime powers.

Original entry on oeis.org

4, 9, 64, 81, 625, 1681, 4096, 822649, 1324801, 2411809, 2588881, 2778889, 3243601, 3636649, 3736489, 5527201, 6115729, 6405961, 8720209, 9006001, 12752041, 16056049, 16589329, 18088009, 21743569, 25230529, 29343889, 34586161, 37736449, 39150049
Offset: 1

Views

Author

Antonio Roldán, Oct 23 2015

Keywords

Comments

Intersection of A024675 and A025475.
Lesser of consecutive primes is in the sequence A084289.

Examples

			625 is in this sequence because 625 = 5^4, nontrivial prime power, and 625 = (619+631)/2, with 619 and 631 consecutive primes.
		

Crossrefs

Programs

  • Maple
    N:= 10^10: # to get all terms <= N
    Primes:= select(isprime, [2,seq(i,i=3..isqrt(N),2)]):
    S:= select(t -> t - prevprime(t) = nextprime(t)-t, {seq(seq(p^j, j=2..floor(log[p](N))),p=Primes)}):
    sort(convert(S,list)); # Robert Israel, Dec 27 2015
  • Mathematica
    (* version >= 6 *)(#/2 + NextPrime[#]/2) & /@
    Select[Prime[Range[5000000]], PrimePowerQ[#/2 + NextPrime[#]/2] &]
    (* Wouter Meeussen, Oct 26 2015 *)
  • PARI
    {for(i=1,10^8,if(isprimepower(i)>1&&i==(precprime(i-1)+nextprime(i+1))/2,print1(i,", ")))}

A129546 Numbers k such that T(k)+10 is the next prime after T(k), where T(k) = A000217(k).

Original entry on oeis.org

58, 61, 98, 138, 193, 217, 222, 233, 253, 266, 338, 358, 373, 393, 398, 402, 453, 461, 466, 477, 481, 542, 553, 557, 586, 597, 602, 618, 633, 646, 662, 761, 822, 838, 853, 857, 877, 898, 901, 913, 918, 926, 941, 986, 1006, 1041, 1061, 1077, 1126, 1157, 1161
Offset: 1

Views

Author

Zak Seidov, May 30 2007

Keywords

Examples

			T(58)=1711 and 1711+10=1721 is the least prime > 1711;
T(61)=1891 and 1891+10=1901 is the least prime > 1891.
		

Crossrefs

Programs

  • Mathematica
    nptQ[n_]:=Module[{tr=(n(n+1))/2},NextPrime[tr]-tr==10]; Select[ Range[ 1200], nptQ] (* Harvey P. Dale, Dec 19 2017 *)
  • PARI
    isok(n) = t = n*(n+1)/2; nextprime(t+1) == (t + 10); \\ Michel Marcus, Oct 13 2013

A226109 Triangular numbers t such that t - 4, t - 2, t + 2, t + 4 are four primes.

Original entry on oeis.org

15, 105, 1485, 18915, 666435, 2143485, 4174605, 10059855, 10440165, 28196295, 95295915, 124591005, 155064855, 171023265, 206258205, 298400235, 311737965, 347701635, 389470095, 459332895, 460424685, 498948255, 526517475, 537575655, 615496155, 645500415, 885763005, 963144105
Offset: 1

Views

Author

Alex Ratushnyak, May 26 2013

Keywords

Comments

Subsequence of A129752.
Proper subsequence of A226196. - Alex Ratushnyak, May 30 2013

Crossrefs

Programs

  • Java
    import java.math.BigInteger;
    public class A226109 {
        public static void main (String[] args) {
          for (long n = 1; n < (1L << 31); n++) {
              long p2 = n * (n + 1)/2 + 2, m2 = p2 - 4;
              BigInteger b = BigInteger.valueOf(p2);
              if (!b.isProbablePrime(80)) continue;
              b = BigInteger.valueOf(m2);
              if (!b.isProbablePrime(80)) continue;
              b = BigInteger.valueOf(p2 + 2);
              if (!b.isProbablePrime(80)) continue;
              b = BigInteger.valueOf(m2 - 2);
              if (!b.isProbablePrime(80)) continue;
              System.out.printf("%d, ", p2 - 2);
          }
        }
    }
    
  • Magma
    A000217:=func; [A000217(t): t in [0..10^5] | forall{A000217(t)+i: i in [-4,-2,2,4] | IsPrime(A000217(t)+i)}]; // Bruno Berselli, May 27 2013
  • Mathematica
    Select[Accumulate[Range[0, 70]], Union[PrimeQ[{# - 4, # - 2, # + 2, # + 4}]] == {True} &] (* Alonso del Arte, May 27 2013 *)

A382133 Products of 4 distinct primes that are the average of two consecutive primes.

Original entry on oeis.org

462, 570, 714, 858, 870, 1190, 1230, 1254, 1290, 1302, 1482, 1590, 1722, 1785, 1806, 1995, 2046, 2130, 2170, 2210, 2470, 2490, 2870, 3030, 3045, 3255, 3390, 3410, 3705, 3774, 3795, 3885, 3930, 4002, 4218, 4242, 4278, 4422, 4510, 4515, 4641, 4785, 4935, 5010, 5110
Offset: 1

Views

Author

Massimo Kofler, Mar 17 2025

Keywords

Examples

			462 is a term because 462=2*3*7*11 is the product of four distinct primes and 462 = (461+463)/2.
714 is a term because 714=2*3*7*17 is the product of four distinct primes and 714 = (709+719)/2.
210 is not a term because although 210=2*3*5*7 is the product of four distinct primes 210 != (199 + 211)/2.
		

Crossrefs

Intersection of A024675 and A046386.

Programs

  • Mathematica
    Select[Range[5200], 2*# == Plus @@ NextPrime[#, {-1, 1}] && FactorInteger[#][[;; , 2]] == {1, 1, 1, 1} &] (* Amiram Eldar, Mar 17 2025 *)
Showing 1-8 of 8 results.