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 41-50 of 174 results. Next

A127339 Numbers that are the sum of 12 consecutive primes.

Original entry on oeis.org

197, 236, 276, 318, 364, 412, 460, 510, 562, 612, 662, 714, 766, 822, 880, 936, 990, 1040, 1092, 1152, 1212, 1276, 1336, 1402, 1464, 1524, 1586, 1650, 1716, 1786, 1854, 1918, 1980, 2040, 2100, 2162, 2234, 2304, 2370, 2436, 2502, 2564, 2634, 2700, 2770
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) = absolute value of coefficient of x^11 of the polynomial Product_{j=0..11} (x - prime(n+j)) of degree 12; the roots of this polynomial are prime(n), ..., prime(n+11).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..11] ]: n in [1..100] ]; // Vincenzo Librandi, Apr 03 2011
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 11}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],12,1] (* Harvey P. Dale, May 05 2018 *)
  • PARI
    {m=45;k=12;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=45;k=12;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A071215 Number of distinct prime factors of sum of 2 successive primes.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 2, 3, 1, 3, 2, 2, 2, 2, 3, 3, 3, 4, 2, 3, 3, 3, 2, 3, 2, 3, 3, 2, 4, 3, 2, 3, 3, 2, 4, 3, 3, 3, 3, 3, 4, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 2, 3, 3, 3, 2, 3, 3, 2, 3, 2, 3, 4, 3, 3, 4, 3, 2, 2, 3, 2, 3, 3, 4, 4, 3, 4, 3, 4, 3, 3, 3, 3, 3, 2, 3, 3, 2, 4, 3
Offset: 1

Views

Author

Labos Elemer, May 17 2002

Keywords

Examples

			Prime(6) = 13 and prime(7) = 17. 13 + 17 = 30 = 2 * 3 * 5, which has three distinct prime factors, hence a(6) = 3.
		

Crossrefs

Cf. A001043, A001221, A071216, A251609 (greedy inverse).

Programs

Formula

a(n) = omega(prime(n) + prime(n + 1)) = A001221(A001043(n)), where omega is the number of distinct prime factors function.

A092738 Primes of the form prime(x)+prime(x+1)+1.

Original entry on oeis.org

13, 19, 31, 37, 43, 53, 61, 79, 101, 113, 139, 163, 173, 199, 211, 223, 241, 269, 277, 331, 353, 373, 397, 457, 463, 509, 521, 541, 577, 601, 619, 631, 727, 773, 787, 811, 829, 853, 883, 907, 919, 947, 967, 991, 1013, 1031, 1181, 1193, 1201, 1231, 1237
Offset: 1

Views

Author

Jorge Coveiro, Apr 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Prime[n] + Prime[n + 1] + 1; f[ # ] & /@ Select[ Range[120], PrimeQ[ f[ # ]] &] (* Robert G. Wilson v, Apr 14 2004 *)
  • PARI
    list(lim)=my(v=List(),p=2,t);forprime(q=3,,t=p+q+1;if(t>lim,return(Vec(v)));if(isprime(t),listput(v,t))) \\ Charles R Greathouse IV, Mar 19 2013

Extensions

More terms from Robert G. Wilson v, Apr 14 2004

A111163 Triangular numbers that are sums of two consecutive primes.

Original entry on oeis.org

36, 78, 120, 210, 276, 300, 630, 946, 990, 1770, 1830, 2556, 2850, 3240, 3570, 4278, 4950, 5460, 8256, 9870, 10878, 11026, 12090, 12720, 20100, 20910, 23436, 26796, 31626, 34980, 41616, 43660, 46056, 55278, 56616, 57630, 59340, 66066, 73920
Offset: 1

Views

Author

Joseph L. Pe, Oct 20 2005

Keywords

Comments

Intersection of A000217 and A001043. - Michel Marcus, May 18 2015

Examples

			36 = 8(8+1)/2 = 17 + 19. Therefore 36 belongs to the sequence.
		

Crossrefs

Cf. A000217 (triangular numbers), A001043 (sums of consecutive primes).

Programs

  • Maple
    P:=proc()local i,a,b,c;c:=1;for i from 1 to 1200000 do;
    a:=ithprime(i)+ithprime(i+1);b:=(-1+(sqrt(8*a+1)))/2;
    if  b=floor(b) then lprint(c,a);c:=c+1;fi; od;end:P();
    # K. D. Bajpai, Jun 30 2013
  • Mathematica
    Select[Table[Prime[n] + Prime[n + 1], {n, 4500}], IntegerQ[Sqrt[1 + 8# ]] &] (* Ray Chandler, Oct 22 2005 *)
    t = {}; n = 0; While[Length[t] < 100, n++; s = Prime[n] + Prime[n + 1]; If[TriangularQ[s], AppendTo[t, s]]]; t (* T. D. Noe, Jun 30 2013 *)
  • PARI
    {p=2; ct=0; while(ct<66, q=nextprime(p+1); s=p+q; if( issquare(8*s+1), print1(s, ", "); ct++); p=q)} \\ Klaus Brockhaus, Oct 22 2005
    
  • Python
    from sympy import nextprime as np
    from sympy import prevprime as pp
    n=1
    t=n*(n+1)//2
    while t>0:
        if t%2==0 and t>3:
            i=t//2
            p=pp(i); q=np(p)
            if p+q==t :
                print(t)
        n=n+1
        t=n*(n+1)//2 # Abhiram R Devesh, May 17 2015
    
  • Python
    from sympy import prevprime,nextprime,isprime
    A111163_list = [n*(n+1)//2 for n in range(3,10**4) if not isprime(n*(n+1)//4) and prevprime(n*(n+1)//4)+nextprime(n*(n+1)//4) == n*(n+1)//2] # Chai Wah Wu, Feb 11 2018

Extensions

Extended by Ray Chandler and Klaus Brockhaus, Oct 22 2005

A116366 Triangle read by rows: even numbers as sums of two odd primes.

Original entry on oeis.org

6, 8, 10, 10, 12, 14, 14, 16, 18, 22, 16, 18, 20, 24, 26, 20, 22, 24, 28, 30, 34, 22, 24, 26, 30, 32, 36, 38, 26, 28, 30, 34, 36, 40, 42, 46, 32, 34, 36, 40, 42, 46, 48, 52, 58, 34, 36, 38, 42, 44, 48, 50, 54, 60, 62, 40, 42, 44, 48, 50, 54, 56, 60, 66, 68, 74, 44, 46, 48, 52, 54, 58, 60, 64, 70, 72, 78, 82
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 06 2006

Keywords

Comments

T(n,k) = 2*A065305(n,k) = A065342(n+1,k+1);
Row sums give A116367; central terms give A116368;
T(n,1) = A113935(n+1);
T(n,n-2) = A048448(n) for n>2;
T(n,n-1) = A001043(n) for n>1;
T(n,n) = A001747(n+2) = A100484(n+1).

Examples

			Triangle begins:
  6;
  8,  10;
  10, 12, 14;
  14, 16, 18, 22;
  16, 18, 20, 24, 26;
  20, 22, 24, 28, 30, 34;
  22, 24, 26, 30, 32, 36, 38;
  26, 28, 30, 34, 36, 40, 42, 46;
  32, 34, 36, 40, 42, 46, 48, 52, 58;
  34, 36, 38, 42, 44, 48, 50, 54, 60, 62;
  40, 42, 44, 48, 50, 54, 56, 60, 66, 68, 74;
  44, 46, 48, 52, 54, 58, 60, 64, 70, 72, 78, 82; etc. - _Bruno Berselli_, Aug 16 2013
		

Crossrefs

Programs

  • Magma
    [NthPrime(n+1)+NthPrime(k+1): k in [1..n], n in [1..15]]; // Bruno Berselli, Aug 16 2013
    
  • Mathematica
    Table[Prime[n+1] + Prime[k+1], {n,1,12}, {k,1,n}]//Flatten (* G. C. Greubel, May 12 2019 *)
  • PARI
    {T(n,k) = prime(n+1) + prime(k+1)}; \\ G. C. Greubel, May 12 2019
    
  • Sage
    [[nth_prime(n+1) + nth_prime(k+1) for k in (1..n)] for n in (1..12)] # G. C. Greubel, May 12 2019

Formula

T(n,k) = prime(n+1) + prime(k+1), 1 <= k <= n.

A163487 Primes p such that 6*p is the sum of two consecutive primes.

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 31, 37, 43, 103, 127, 131, 151, 163, 167, 229, 241, 257, 293, 311, 313, 337, 389, 433, 509, 521, 523, 613, 647, 661, 719, 739, 743, 757, 797, 821, 887, 937, 953, 971, 1013, 1033, 1063, 1151, 1153, 1217, 1283, 1303, 1307, 1319, 1373, 1451
Offset: 1

Views

Author

Keywords

Examples

			2*6=12=5+7, 3*6=18=7+11, 5*6=30=13+17, ..
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime, [seq(i,i=3..10^4, 2)]):
    select(t -> t::integer and isprime(t), (Primes[1..-2]+Primes[2..-1])/6); # Robert Israel, Jun 19 2018
  • Mathematica
    Select[ListConvolve[{1,1},Prime[Range[1000]]]/6,PrimeQ] (* Paolo Xausa, Nov 03 2023 *)

Extensions

Edited by N. J. A. Sloane, Aug 08 2009

A036441 a(n+1) = next number having largest prime dividing a(n) as a factor, with a(1) = 2.

Original entry on oeis.org

2, 4, 6, 9, 12, 15, 20, 25, 30, 35, 42, 49, 56, 63, 70, 77, 88, 99, 110, 121, 132, 143, 156, 169, 182, 195, 208, 221, 238, 255, 272, 289, 306, 323, 342, 361, 380, 399, 418, 437, 460, 483, 506, 529, 552, 575, 598, 621, 644, 667, 696, 725, 754, 783, 812, 841, 870
Offset: 1

Views

Author

Frederick Magata (frederick.magata(AT)uni-muenster.de)

Keywords

Comments

a(n) satisfies the following inequality: (1/4)*(n^2 + 3*n + 1) <= a(n) <= (1/4)*(n+2)^2. [Corrected by M. F. Hasler, Apr 08 2015]
The present sequence is the special case a(n) = a(2,n) with a more general a(m, n) := a(m, n-1) + gpf(a(m, n-1)), a(m, 1) := m, where gpf(x) := "greatest prime factor of x" = A006530(x). Also a(a(r,k), n) = a(r,n+k-1), for all n,k in N\{0} and all r in N\{0,1}; a(prime(k), n) = a(prime(i), n + prime(k) - prime(i)), for all k,i,n in N\{0}, with k >= i, n >= prime(k-1) and with prime(x) := x-th prime.
Essentially the same as A076271 and A180107, cf. formula.

Examples

			a(2,2) = 4 because 2 + gpf(2) = 2 + 2 = 4;
a(2,3) = 6 because 4 + gpf(4) = 4 + 2 = 6.
		

Crossrefs

Cf. A006530. See A076271 and A180107 for other versions.
Cf. A123581.
Partial sums of A076973.

Programs

  • Haskell
    a036441 n = a036441_list !! (n-1)
    a036441_list = tail a076271_list
    -- Reinhard Zumkeller, Nov 08 2015, Nov 14 2011
    
  • Mathematica
    f[n_]:=Last[First/@FactorInteger[n]];Join[{a=2},Table[a+=f[a],{n,2,100}]] (* Vladimir Joseph Stephan Orlovsky, Feb 08 2011*)
    NestList[#+FactorInteger[#][[-1,1]]&,2,60] (* Harvey P. Dale, Dec 02 2012 *)
  • PARI
    a(n)=(n+2-if(n\2+1<(p=nextprime(n\2+1))&&n+1M. F. Hasler, Apr 08 2015

Formula

a(n) = p(m)*(n+2-p(m)), where p(k) is the k-th prime and m is the smallest index such that n+2 <= p(m) + p(m+1). - Max Alekseyev, Oct 21 2008
a(n) = A076271(n+1) = A180107(n+2). - M. F. Hasler, Apr 08 2015
a(n+1) = A070229(a(n)). - Reinhard Zumkeller, Nov 07 2015

Extensions

Better description from Reinhard Zumkeller, Feb 04 2002
Edited by M. F. Hasler, Apr 08 2015

A061802 Sum of n-th row of triangle of primes: 2; 2 3 2; 2 3 5 3 2; 2 3 5 7 5 3 2; ...; where n-th row contains 2n+1 terms.

Original entry on oeis.org

2, 7, 15, 27, 45, 69, 99, 135, 177, 229, 289, 357, 435, 519, 609, 709, 821, 941, 1069, 1207, 1351, 1503, 1665, 1837, 2023, 2221, 2425, 2635, 2851, 3073, 3313, 3571, 3839, 4115, 4403, 4703, 5011, 5331, 5661, 6001, 6353, 6713, 7085, 7469, 7859, 8255, 8665
Offset: 0

Views

Author

Amarnath Murthy, May 28 2001

Keywords

Comments

Row sums of A138143. - Omar E. Pol, Feb 13 2014
For n = 3..9, a(n) = 3*(n^2 - 3*n + 5). - Nicholas Drozd, Apr 10 2021

Crossrefs

Cf. A001043 (first differences), A007504, A138143.
Partial sums of A011974.

Programs

  • Mathematica
    Accumulate[Join[{2},ListConvolve[{1,1},Prime[Range[100]]]]] (* Paolo Xausa, Oct 31 2023 *)
  • PARI
    { n=-1; a=q=0; forprime (p=2, prime(1001), write("b061802.txt", n++, " ", a+=p + q); q=p ) } \\ Harry J. Smith, Jul 28 2009

Formula

a(n) = a(n-1) + prime(n) + prime(n-1).
a(n) = A007504(n) + A007504(n+1) so we have the asymptotic expansion a(n) ~ n^2*log(n). - Henry Bottomley, May 30 2001

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 29 2001

A071220 Numbers n such that prime(n) + prime(n+1) is a cube.

Original entry on oeis.org

2, 28, 1332, 3928, 16886, 157576, 192181, 369440, 378904, 438814, 504718, 539873, 847252, 1291597, 1708511, 1837979, 3416685, 3914319, 5739049, 6021420, 7370101, 7634355, 8608315, 9660008, 10378270, 14797144, 15423070, 18450693
Offset: 1

Views

Author

Labos Elemer, May 17 2002

Keywords

Comments

The corresponding primes are in A061308; n^3 is a sum of two successive primes in A074925.
Prime(n)+ Prime(n+1) is a square in A064397; n^2 is a sum of two successive primes in A074924;

Examples

			28 is in the list because prime(28)+prime(29) = 107+109 =216 = 6^3.
n=1291597: prime(1291597)+prime(1291598) = 344*344*344.
		

Crossrefs

Programs

  • Mathematica
    PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ If[ n^3 == PrevPrim[Floor[(n^3)/2]] + NextPrim[Floor[(n^3)/2]], Print[ PrimePi[ Floor[(n^3)/2]]]], {n, 2, 10^4}]
    Flatten[Position[Total/@Partition[Prime[Range[20000000]],2,1],?(IntegerQ[ Surd[ #,3]]&)]] (* _Harvey P. Dale, May 28 2014 *)
  • Python
    from _future_ import division
    from sympy import isprime, prevprime, nextprime, primepi
    A071220_list, i = [], 2
    while i < 10**6:
        n = i**3
        m = n//2
        if not isprime(m) and prevprime(m) + nextprime(m) == n:
            A071220_list.append(primepi(m))
        i += 1 # Chai Wah Wu, May 31 2017

Formula

A001043(x)=m^3 for some m; if p(x+1)+p(x) is a cube, then x is here.
a(n) = primepi(A061308(n)). - Michel Marcus, Oct 24 2014

Extensions

Edited and extended by Robert G. Wilson v, Oct 07 2002

A076273 a(0) = 1, a(1) = 2; for n>1, a(n) = prime(n)+prime(n-1)-1.

Original entry on oeis.org

1, 2, 4, 7, 11, 17, 23, 29, 35, 41, 51, 59, 67, 77, 83, 89, 99, 111, 119, 127, 137, 143, 151, 161, 171, 185, 197, 203, 209, 215, 221, 239, 257, 267, 275, 287, 299, 307, 319, 329, 339, 351, 359, 371, 383, 389, 395, 409, 433, 449, 455, 461, 471, 479, 491, 507, 519, 531
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 04 2002

Keywords

Comments

Least m such that A076272(m) > A076272(m-1) for n>0; a(0)=1.
A076272(a(k)+j) = A008578(k) for k>0 and 0<=j < A075527(k-1).

Crossrefs

Cf. A001043.

Programs

  • Mathematica
    nxt[{a_,b_}]:={a+1,Prime[a+1]+Prime[a]-1}; Join[{1},Transpose[ NestList[ nxt,{1,2},60]][[2]]] (* or *) Join[{1,2},Total/@Partition[Prime[ Range[ 60]],2,1]-1] (* Harvey P. Dale, Jun 12 2012 *)
  • PARI
    a(n)=if(n<1,1,if(n==1,2,prime(n)+prime(n-1)-1)) \\ Lambert Klasen, Jan 14 2005; corrected by Michel Marcus, Nov 05 2023

Formula

a(n) = A001043(n-1)-1, n>1. - R. J. Mathar, Jun 04 2020

Extensions

Simpler description from Vladeta Jovovic, Mar 29 2003
More terms from Lambert Klasen (lambert.klasen(AT)gmx.de), Jan 14 2005
Previous Showing 41-50 of 174 results. Next