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

A165966 Triangular numbers that are sums of twin prime pairs.

Original entry on oeis.org

36, 120, 276, 300, 2556, 3240, 5460, 8256, 12720, 23436, 26796, 34980, 41616, 46056, 56616, 59340, 103740, 122760, 139656, 147696, 157080, 185136, 195000, 231540, 277140, 333336, 353220, 386760, 401856, 516636, 609960, 860016, 1001820
Offset: 1

Views

Author

Zak Seidov, Oct 01 2009

Keywords

Comments

All terms are multiples of 12.

Examples

			36 = 8*9/2 is a term since it is triangular and the sum of the twin primes 17 and 19.
120 = 15*16/2 is a term since it is triangular and the sum of the twin primes 59 and 61.
		

Crossrefs

Subsequence of A111163 and of A054735.

Programs

  • Mathematica
    tri[n_] := n*(n+1)/2; Select[tri /@ Range[10^3], And @@ PrimeQ[#/2 + {-1, 1}] &] (* Amiram Eldar, Dec 27 2019 *)
  • PARI
    lista(nn) = {for (n = 1, nn, trg = n*(n+1)/2; if (!(trg % 2) && isprime(trg/2-1) && isprime(trg/2+1), print1(trg, ", ")););} \\ Michel Marcus, Oct 16 2013

Formula

a(n) = A105174(n)*(A105174(n) + 1)/2.

A173420 Triangular numbers which are sums of 4 consecutive primes.

Original entry on oeis.org

36, 120, 780, 1596, 1830, 10440, 12090, 20706, 22578, 23436, 34716, 75466, 101926, 107880, 115440, 154290, 191890, 207690, 231540, 261726, 271216, 310866, 313236, 319600, 384126, 408156, 512578, 558096, 653796, 768180, 824970, 936396, 1094460
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [ t: n in [1..25000] | IsSquare(8*t+1) where t is &+[NthPrime(n+s): s in [0..3]] ]; // Bruno Berselli, Apr 28 2011
  • Mathematica
    Select[Table[Prime[n]+Prime[n+1]+Prime[n+2]+Prime[n+3],{n,2*8!}],IntegerQ[Sqrt[1+8# ]]&]
    Select[Total/@Partition[Prime[Range[50000]],4,1],OddQ[Sqrt[1+8#]]&] (* Harvey P. Dale, May 29 2021 *)

A173421 Triangular numbers which are sums of 5 consecutive primes.

Original entry on oeis.org

28, 351, 1891, 4851, 7381, 9453, 15931, 26565, 31125, 68635, 90951, 110685, 130305, 140185, 218791, 224785, 240471, 243253, 309291, 341551, 466095, 497503, 780625, 889111, 899811, 1122751, 1188111, 1214461, 1269621, 1334161, 1408681, 1595791
Offset: 1

Views

Author

Keywords

Examples

			28 = 2 + 3 + 5 + 7 + 11.
		

Crossrefs

Programs

  • Magma
    [ t: n in [1..28000] | IsSquare(8*t+1) where t is &+[NthPrime(n+s): s in [0..4]] ]; // Bruno Berselli, Apr 28 2011
  • Mathematica
    f[n_]:=Prime[n]+Prime[n+1]+Prime[n+2]+Prime[n+3]+Prime[n+4]; Select[Table[f[n],{n,9!}],IntegerQ[Sqrt[1+8# ]]&]
    Select[Total/@Partition[Prime[Range[50000]],5,1],OddQ[Sqrt[1+8#]]&] (* Harvey P. Dale, Feb 08 2020 *)

A203836 Smallest sum s of two consecutive primes such that s = 0 mod prime(n).

Original entry on oeis.org

8, 12, 5, 42, 198, 52, 68, 152, 138, 696, 186, 222, 410, 172, 564, 1272, 472, 1220, 268, 852, 1460, 2212, 1494, 712, 1164, 1818, 618, 1284, 872, 2486, 508, 786, 548, 1668, 1192, 906, 3768, 978, 668, 6228, 3222, 6516, 3820, 772, 4728, 3980, 6330, 892, 5448, 1374
Offset: 1

Views

Author

Zak Seidov, Jan 06 2012

Keywords

Comments

Besides a(3)=5, all terms are even and >=4. - Zak Seidov, Nov 29 2014

Examples

			a(1) = 8 = 3 + 5 is the least sum of two consecutive primes that is a multiple of prime(1) = 2.
a(3) = 5 = 2 + 3 is the least sum of two consecutive primes that is a multiple of prime(3) = 5.
		

Crossrefs

Cf. A001043, A062703, A111163, A247245, A247252, A188815 (the smaller prime), A118134.

Programs

  • Maple
    N := 100: # for a(1)..a(N)
    M := ithprime(N):
    V := Vector(M):
    count:= 0:
    for i from 1 while count < N do
      x:= ithprime(i)+ithprime(i+1);
      Q:= convert(select(t -> t <= M and V[t]=0, numtheory:-factorset(x)), list);
      V[Q]:= x;
      count:= count + nops(Q);
    od:
    seq(V[ithprime(i)], i=1..N); # Robert Israel, May 25 2020
  • Mathematica
    pr=Prime[Range[1000]];rm=Rest[pr]+Most[pr];Table[Select[rm,Mod[#,pr[[n]]]==0&][[1]],{n,50}]
    s = Total /@ Partition[Prime@ Range[10^4], 2, 1]; Table[SelectFirst[s, Divisible[#, Prime@ n] &], {n, 52}] (* Michael De Vlieger, Jul 04 2017 *)
  • PARI
    a(n)=p = 2; pn = prime(n); forprime(q=3, , if (((s=p+q) % pn) == 0, return (s)); p = q;); \\ Michel Marcus, Jul 04 2017
    
  • PARI
    isA001043(n)=precprime((n-1)/2)+nextprime(n/2)==n&&n>2
    a(n,p=prime(n))=if(p==5, return(5)); my(k=2); while(!isA001043(k*p), k+=2); k*p \\ Charles R Greathouse IV, Jul 05 2017

Formula

a(n) = 4*prime(n) if prime(n) is in A118134. - Robert Israel, May 25 2020

A166119 a(n) = A165966(n)/12.

Original entry on oeis.org

3, 10, 23, 25, 213, 270, 455, 688, 1060, 1953, 2233, 2915, 3468, 3838, 4718, 4945, 8645, 10230, 11638, 12308, 13090, 15428, 16250, 19295, 23095, 27778, 29435, 32230, 33488, 43053, 50830, 71668, 83485, 86460, 89365, 96330, 104610, 106600, 127823
Offset: 1

Views

Author

Zak Seidov, Oct 07 2009

Keywords

Comments

The only known primes in the sequence are 3, 23.

Crossrefs

Programs

  • PARI
    lista(nn) = {for (n = 1, nn, trg = n*(n+1)/2; if (!(trg % 2) && isprime(trg/2-1) && isprime(trg/2+1), print1(trg/12, ", ")););} \\ Michel Marcus, Oct 16 2013

Formula

a(n) = (A086816(n) + 1)/6. - Alois P. Heinz, Sep 18 2024

A173423 Triangular numbers which are sums of 6 consecutive primes.

Original entry on oeis.org

630, 990, 2926, 4950, 5886, 12720, 24090, 44850, 60726, 81810, 107416, 128778, 152076, 168490, 177906, 202566, 217470, 258840, 277140, 301476, 314028, 408156, 499500, 613278, 695610, 875826, 903840, 940506, 1205128, 1332528, 1405326
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [ t: n in [1..22000] | IsSquare(8*t+1) where t is &+[NthPrime(n+s): s in [0..5]] ]; // Bruno Berselli, Apr 28 2011
  • Maple
    Primes:= select(isprime, [2,seq(i,i=3..10^7,2)]):
    P6:= Primes[1..-6]+Primes[2..-5]+Primes[3..-4]+Primes[4..-3]+Primes[5..-2]+Primes[6..-1]:
    select(t -> issqr(8*t+1),P6): # Robert Israel, Sep 26 2016
  • Mathematica
    f[n_]:=Prime[n]+Prime[n+1]+Prime[n+2]+Prime[n+3]+Prime[n+4]+Prime[n+5]; Select[Table[f[n],{n,9!}],IntegerQ[Sqrt[1+8# ]]&]
    Select[Total/@Partition[Prime[Range[25000]],6,1],OddQ[Sqrt[8#+1]]&] (* Harvey P. Dale, Mar 06 2023 *)

A298077 Oblong numbers that are the sum of 2 successive primes.

Original entry on oeis.org

12, 30, 42, 90, 210, 240, 462, 600, 702, 930, 1482, 1560, 1722, 2352, 2862, 2970, 6162, 6480, 6642, 7656, 8010, 8556, 10920, 13572, 13806, 14280, 14762, 15006, 15750, 16002, 21462, 22350, 22650, 23562, 24492, 25122, 27060, 27390, 29070, 29412, 34410, 34782
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 11 2018

Keywords

Comments

Is this sequence infinite?
Includes all n*(n+1) for which n*(n+1)/2 - 2 and n*(n+1)/2 + 2 are prime. The generalized Bunyakovsky conjecture implies there are infinitely many of these. - Robert Israel, Feb 11 2018

Examples

			a(4)=90 because 90 is oblong (i.e., 9*10) and the sum of 2 successive primes (i.e., 43+47).
		

Crossrefs

Intersection of A001043 and A002378.

Programs

  • Maple
    filter:= proc(n) not isprime(n/2) and prevprime(n/2)+nextprime(n/2) = n end proc:
    select(filter, [seq(n*(n+1), n=2..200)]); # Robert Israel, Feb 11 2018
  • Mathematica
    Select[Total /@ Partition[Prime@ Range[2^11], 2, 1], IntegerQ@ Sqrt[4 # + 1] &] (* Michael De Vlieger, Jan 11 2018 *)
  • PARI
    isok(n) = my(p = 2); forprime(q=3, n, if (p+q==n, return (1)); p = q);
    lista(nn) = {for (n=1, nn, m = n*(n+1); if (isok(m), print1(m, ", ")););} \\ Michel Marcus, Jan 13 2018
    
  • Python
    from _future_ import division
    from sympy import prevprime,nextprime,isprime
    A298077_list = [n*(n+1) for n in range(3,10**4) if prevprime(n*(n+1)//2) + nextprime(n*(n+1)//2) == n*(n+1)] # Chai Wah Wu, Feb 11 2018
Showing 1-7 of 7 results.