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 11-20 of 21 results. Next

A213739 Numbers n such that n and n^2 are sums of two successive primes.

Original entry on oeis.org

12, 24, 42, 84, 90, 120, 204, 240, 372, 410, 456, 600, 630, 740, 762, 852, 882, 978, 1088, 1140, 1148, 1272, 1460, 1518, 1584, 1620, 1656, 1758, 1770, 1878, 1900, 1960, 2052, 2316, 2562, 2688, 2886, 2992, 3570, 3634, 3678, 3738, 3750, 3924, 4170, 4314, 4906
Offset: 1

Views

Author

Zak Seidov, Jun 19 2012

Keywords

Comments

First terms not multiple of 6: 410, 740, 1088, 1148, 1460, 1900, 1960.

Examples

			12=5+7, 144=71+73;
24=11+13, 576=283+293;
42=19+23, 1764=881+883.
		

Crossrefs

Intersection of A001043 and A074924.

Programs

  • Mathematica
    Reap[ Do[ If[ (p=NextPrime[n/2, -1]; p+NextPrime[p] == n) && (q=NextPrime[n^2/2, -1]; q+NextPrime[q] == n^2) , Sow[n]], {n, 2, 5000, 2}]][[2, 1]] (* Jean-François Alcover, Jul 17 2012 *)
  • PARI
    p=2;forprime(q=3,1e3,n=p+q;if(precprime(n^2/2)+nextprime((n^2+1)/2)==n^2,print1(n", "));p=q) \\ Charles R Greathouse IV, Jun 21 2012

A213811 Numbers k such that k and k^3 are sums of two twin primes.

Original entry on oeis.org

1044, 1200, 2604, 2964, 4056, 4284, 4476, 7164, 7644, 9300, 9864, 10884, 14616, 15180, 20916, 24084, 40716, 51156, 55056, 65436, 66144, 70104, 74676, 92100, 99060, 104580, 105804, 163944, 164700, 165780, 209604, 218400, 219660, 222540, 226656, 257040, 281676
Offset: 1

Views

Author

Zak Seidov, Jun 20 2012

Keywords

Comments

All terms are multiples of 12.

Examples

			1044=521+523, 1044^3=1137893184=568946591+568946593.
		

Crossrefs

Programs

  • Mathematica
    sttpQ[n_]:=Module[{x=(n-2)/2},AllTrue[{x,x+2},PrimeQ]]; Select[Range[ 12,300000,12],sttpQ[#]&&sttpQ[#^3]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 25 2017 *)
  • PARI
    isok(n) = !(n % 2) && isprime(n/2-1) && isprime(n/2+1) && isprime(n^3/2-1) && isprime(n^3/2+1); \\ Michel Marcus, Oct 19 2013

Formula

k/2 +/-1 and also (k^3)/2 +/- 1 are twin primes.

A225077 Smaller of the two consecutive primes whose sum is a triangular number.

Original entry on oeis.org

17, 37, 59, 103, 137, 149, 313, 467, 491, 883, 911, 1277, 1423, 1619, 1783, 2137, 2473, 2729, 4127, 4933, 5437, 5507, 6043, 6359, 10039, 10453, 11717, 13397, 15809, 17489, 20807, 21821, 23027, 27631, 28307, 28813, 29669, 33029, 36947, 39103, 44203, 48281
Offset: 1

Views

Author

Alex Ratushnyak, May 28 2013

Keywords

Crossrefs

Cf. A175132 (numbers n such that sum of two consecutive primes is triangular(n)).
Cf. A181902 and A154634 (average of two consecutive primes is a triangular number).
Cf. A075190 and A225195 (average of two consecutive primes is a square).
Cf. A074924 and A061275 (sum of two consecutive primes is a square).

Programs

  • Maple
    f:= proc(n) local m,p,q;
      m:= n*(n+1)/2;
      p:= prevprime(ceil(m/2));
      q:= nextprime(p);
      if p+q=m then p fi
    end proc:
    map(f, [$3..500]); # Robert Israel, May 04 2020
  • Mathematica
    tri[n_] := IntegerQ[Sqrt[1 + 8 n]]; t = {}; p1 = 2; While[Length[t] < 50, p2 = NextPrime[p1]; If[tri[p1 + p2], AppendTo[t, p1]]; p1 = p2]; t (* T. D. Noe, May 28 2013 *)

Formula

a(n) + nextprime(a(n)) = A000217(A175132(n)).

A251056 Numbers n such that n^2 is a sum of 8 consecutive primes.

Original entry on oeis.org

38, 414, 466, 514, 714, 844, 850, 1076, 1136, 1186, 1370, 1512, 1544, 1580, 1600, 1700, 1844, 1900, 1918, 2028, 2114, 2250, 2304, 2320, 2330, 2364, 2396, 2404, 2450, 2674, 2846, 2894, 3076, 3314, 3346, 3506, 3612, 3622, 3676, 3718, 3774, 3866, 3912, 3966, 4012, 4126, 4506, 4700
Offset: 1

Views

Author

Zak Seidov, Dec 14 2014

Keywords

Examples

			38^2 = 1444 = prime(38) + ... + prime(45) = 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197,
414^2 = 171396 = prime(2401) + ... + prime(2408) = 21391 + 21397 + 21401 + 21407 + 21419 + 21433 + 21467 + 21481.
		

Crossrefs

Programs

  • Mathematica
    Sqrt[#]&/@Select[Total/@Partition[Prime[Range[250000]],8,1], IntegerQ[ Sqrt[#]]&] (* Harvey P. Dale, Nov 28 2018 *)

A179485 Sums of two successive primes s such that s+-3 are primes.

Original entry on oeis.org

8, 100, 1120, 1220, 1300, 2240, 2380, 2414, 3536, 3634, 4906, 4940, 5566, 5740, 6706, 7240, 8864, 9224, 9394, 10136, 10850, 12040, 12476, 12586, 12920, 13180, 13334, 13754, 14630, 14720, 15134, 16270, 17710, 18430, 18800, 19916, 21014, 21320
Offset: 1

Views

Author

Keywords

Comments

Intersection of A001043 and A087695. - Robert Israel, Oct 25 2017

Examples

			3+5=8,8-3=5(prime),8+3=11(prime),..
		

Crossrefs

Programs

  • Maple
    q:= 2; p:= 3;
    count:= 0:
    while count < 100 do
      q:= p; p:= nextprime(p);
      s:= q+p;
      if isprime(s-3) and isprime(s+3) then
        count:= count+1; A[count]:= s;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Oct 25 2017
  • Mathematica
    q=3;Select[Table[Prime[n]+Prime[n+1],{n,7!}],PrimeQ[ #-q]&&PrimeQ[ #+q]&]
    Select[Total/@Partition[Prime[Range[1400]],2,1],AllTrue[#+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 04 2018 *)

A212430 Numbers n such that n and n^4 are sums of two twin primes.

Original entry on oeis.org

384, 840, 8676, 33300, 34980, 37044, 39984, 42024, 50604, 53760, 55056, 61680, 64380, 71064, 83520, 88176, 97644, 103740, 120204, 129840, 133896, 148764, 154524, 160416, 168120, 173064, 184800, 188880, 199056, 207984, 234744, 266640, 292116, 307044, 356184
Offset: 1

Views

Author

Zak Seidov, Jun 21 2012

Keywords

Comments

All terms are multiples of 12.

Examples

			384=191+193, 384^3=147456=73727+73729.
		

Crossrefs

Programs

  • Mathematica
    Select[12 Range[30000],AllTrue[{#/2+1,#/2-1,#^4/2+1,#^4/2-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 01 2017 *)
  • PARI
    isok(n) = !(n % 2) && isprime(n/2-1) && isprime(n/2+1) && isprime(n^4/2-1) && isprime(n^4/2+1); \\ Michel Marcus, Oct 19 2013

Formula

n/2 +/-1 and (n^4)/2 +/- 1 are primes.

A226533 a(n) = smallest integer m such that m^n is a sum of two successive primes.

Original entry on oeis.org

5, 6, 2, 150, 22, 82, 2, 258, 70, 30, 42, 18, 2, 12, 262, 58, 460, 36, 552, 24, 318, 344, 450, 54, 274, 88, 36, 92, 90, 188, 554, 20, 404, 700, 240, 6, 136, 262, 578, 222, 2182, 276, 162, 60, 142, 326, 176, 198, 930, 1116
Offset: 1

Views

Author

Zak Seidov, Jun 09 2013

Keywords

Examples

			5^1 = 5 = 2 + 3, 6^2 = 36  = 17 + 19, 2^3 = 8 = 3 + 5, 150^4 =506250000 = 253124999 + 253125001.
		

Crossrefs

a(2) = 6 = A074924(1), a(3) = 2 = A074925(1). Cf. A001043, A001597.

Programs

  • Mathematica
    a[n_] := For[m = 2, True, m++, p = m^n/2 // NextPrime[#, -1]&; q = NextPrime[p]; If[p + q == m^n, Print["a(", n, ") = ", m]; Return[m]]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jun 10 2013 *)
    tsp[n_]:=Module[{m=1,t},t=m^n;While[NextPrime[t/2]+NextPrime[t/2, -1]! = t,m++;t=m^n];m]; Array[tsp,50] (* Harvey P. Dale, Nov 10 2014 *)
  • PARI
    a(n)=if(n==1,return(5)); my(m=1,M,p); while(1,M=m++^n;p=precprime(M/2); ispseudoprime(M-p) && M-p==nextprime(M/2) && return(m)) \\ Charles R Greathouse IV, Jun 10 2013

Extensions

a(41)-a(50) from Jean-François Alcover, Jun 10 2013

A297620 Positive numbers n such that n^2 == p (mod q) and n^2 == q (mod p) for some consecutive primes p,q.

Original entry on oeis.org

6, 10, 12, 24, 42, 48, 62, 72, 76, 84, 90, 93, 108, 110, 120, 122, 128, 145, 146, 174, 187, 188, 194, 204, 208, 215, 220, 228, 232, 240, 241, 264, 297, 306, 310, 314, 317, 326, 329, 336, 349, 357, 366, 372, 386, 408, 410, 423, 426, 431, 444, 454, 456, 468, 470, 474, 518, 522, 535, 538, 546, 548
Offset: 1

Views

Author

Robert Israel and Thomas Ordowski, Jan 01 2018

Keywords

Comments

Positive numbers n such that n^2 == p+q mod (p*q) for some consecutive primes p, q.
Each pair of consecutive primes p,q such that p is a quadratic residue mod q and p and q are not both == 3 (mod 4) contributes infinitely many members to the sequence.
Odd terms of this sequence are 93, 145, 187, 215, 241, 297, 317, 329, 349, 357, 423, 431, 535, ... - Altug Alkan, Jan 01 2018

Examples

			a(3) = 12 is in the sequence because 71 and 73 are consecutive primes with 12^2 == 73 (mod 71) and 12^2 == 71 (mod 73).
		

Crossrefs

Contains A074924.

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    R:= {}:
    q:= 3:
    while q < N^2 do
      p:= q;
      q:= nextprime(q);
      if ((p mod 4 <> 3) or (q mod 4 <> 3)) and numtheory:-quadres(q,p) = 1 then
        xp:= numtheory:-msqrt(q,p); xq:= numtheory:-msqrt(p,q);
        for sp in [-1,1] do for sq in [-1,1] do
          v:= chrem([sp*xp,sq*xq],[p,q]);
          R:= R union {seq(v+k*p*q, k = 0..(N-v)/(p*q))}
        od od;
      fi;
    od:
    sort(convert(R,list));

A165744 Numbers k with property that 6^k is the sum of two consecutive primes.

Original entry on oeis.org

2, 3, 7, 36, 54, 143, 1102, 1678
Offset: 1

Views

Author

Zak Seidov, Sep 26 2009

Keywords

Examples

			k=2: 6^2 = 36     = 17 + 19         = prime(7) + prime(8);
k=3: 6^3 = 216    = 107 + 109       = prime(28) + prime(29);
k=7: 6^7 = 279936 = 139967 + 139969 = prime(13005) + prime(13006).
		

Crossrefs

Programs

  • Mathematica
    (* M6 *) Do[If[PreviousPrime[6^n/2]+NextPrime[6^n/2]==6^n,Print[n]],{n,1000}]
  • PARI
    is(k) = my(t=6^k); precprime(t/2)+nextprime(1+t/2)==t; \\ Jinyuan Wang, Feb 18 2021

Extensions

a(7) from Max Alekseyev, Dec 14 2011
a(8) from Amiram Eldar, Apr 06 2019

A175097 Primes in A139013.

Original entry on oeis.org

3, 5, 31, 61, 163, 193, 227, 383, 401, 521, 631, 653, 883, 1019, 1151, 1229, 1433, 1601, 1669, 1801, 1873, 2437, 2729, 3191, 3671, 4013, 4049, 4127, 4447, 5507, 5651, 5701, 5813, 6079, 6199, 6353, 6569, 6823, 6857, 7507, 7529, 7873, 7907, 8291, 8419, 8461
Offset: 1

Views

Author

Zak Seidov, Feb 03 2010

Keywords

Crossrefs

Previous Showing 11-20 of 21 results. Next