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

A190792 Primes p=prime(i) such that prime(i+3)-prime(i)=12.

Original entry on oeis.org

17, 19, 29, 31, 41, 59, 61, 67, 71, 127, 227, 229, 269, 271, 347, 431, 607, 641, 1009, 1091, 1277, 1279, 1289, 1291, 1427, 1447, 1487, 1597, 1601, 1607, 1609, 1657, 1777, 1861, 1987, 2129, 2131, 2339, 2371, 2377, 2381, 2539, 2677, 2687, 2707, 2789, 2791
Offset: 1

Views

Author

Zak Seidov, May 20 2011

Keywords

Comments

Minimal distance between prime(i) and prime(i+3) is 12 if all three consecutive prime gaps are different.
There are 6 possible consecutive prime gap configurations:
{2,4,6}, {2,6,4}, {4,2,6}, {4,6,2}, {6,2,4}, and {6,4,2}.
Least prime quartets with such gap configurations are:
{17,19,23,29}->{2,4,6}
{29,31,37,41}->{2,6,4}
{67,71,73,79}->{4,2,6}
{19,23,29,31}->{4,6,2}
{1601,1607,1609,1613}->{6,2,4}
{31,37,41,43}->{6,4,2}.

Crossrefs

Programs

  • Magma
    [NthPrime(i): i in [2..60000] | NthPrime(i+3)-NthPrime(i) eq 12];  // _Bruno Berselli-, May 20 2011
    
  • Mathematica
    p = Prime[Range[1000]]; First /@ Select[Partition[p, 4, 1], Last[#] - First[#] == 12 &] (* T. D. Noe, May 23 2011 *)
  • PARI
    is(n)=if(!isprime(n), return(0)); my(p=nextprime(n+1),q); if(p-n>6, return(0)); q=nextprime(p+1); q-n<11 && nextprime(q+1)-n==12 \\ Charles R Greathouse IV, Sep 14 2015

A213926 prime(n^2) - prime(n).

Original entry on oeis.org

0, 4, 18, 46, 86, 138, 210, 292, 396, 512, 630, 790, 968, 1150, 1380, 1566, 1820, 2082, 2370, 2670, 3010, 3382, 3720, 4122, 4540, 4950, 5416, 5900, 6372, 6884, 7446, 8030, 8600, 9202, 9782, 10476, 11164, 11886, 12576, 13326, 14148, 14920, 15686, 16554, 17412
Offset: 1

Views

Author

Vincenzo Librandi, Mar 06 2013

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(n^2)-NthPrime(n): n in [1..40]];
    
  • Maple
    A213926 := proc(n) ithprime(n^2)-ithprime(n) ; end proc: seq(A213926(n), n=1..40) ;
  • Mathematica
    Table[Prime[n^2] - Prime[n], {n, 40}]
  • PARI
    a(n)=prime(n^2)-prime(n) \\ Charles R Greathouse IV, Mar 21 2014

Formula

a(n) = A000040(n^2) - A000040(n).

A261469 a(n) = prime(n+3) mod prime(n).

Original entry on oeis.org

1, 2, 3, 3, 8, 10, 12, 12, 14, 12, 12, 10, 12, 16, 14, 14, 12, 12, 12, 12, 16, 18, 18, 14, 10, 8, 10, 20, 22, 24, 12, 18, 14, 18, 14, 16, 16, 16, 14, 18, 14, 16, 8, 18, 26, 28, 18, 10, 12, 12, 18, 18, 22, 18, 14, 14, 12, 12, 16, 26, 28, 20, 10, 20, 24, 30, 18, 16, 12
Offset: 1

Views

Author

Altug Alkan, Aug 20 2015

Keywords

Examples

			a(3) = 13 mod 5 = 3.
		

Crossrefs

Cf. A031165.

Programs

  • Magma
    [NthPrime(n+3) mod NthPrime(n): n in [1.. 70]]; // Vincenzo Librandi, Aug 20 2015
  • Mathematica
    a[n_]:=PowerMod[Prime[n + 3], 1, Prime[n]]; Table[a[n], {n, 80}] (* Vincenzo Librandi, Aug 20 2015 *)
    Mod[Last[#],First[#]]&/@Partition[Prime[Range[80]],4,1] (* Harvey P. Dale, Jun 23 2017 *)
  • PARI
    first(m)=vector(m,i,prime(i+3)%prime(i)) \\ Anders Hellström, Aug 20 2015
    

Formula

a(n) = prime(n+3) mod prime(n).

A261518 a(n+1) = prime(n + a(n)) - prime(n), a(1) = 1.

Original entry on oeis.org

1, 1, 2, 6, 22, 92, 508, 3674, 34452, 408104, 5925564, 103023888, 2102941162, 49588317960, 1332831700026, 40376512041704, 1365483356241318, 51130344360226830, 2104788801045148866, 94659739599219674872, 4625501078986781603540, 244380566194237434434094
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 23 2015

Keywords

Crossrefs

Programs

  • Haskell
    a261518 n = a261518_list !! (n - 1)
    a261518_list = 1 : zipWith (-)
                   (map a000040 (zipWith (+) a261518_list [1..])) a000040_list
    
  • Magma
    [1] cat [n le 1 select 1 else  NthPrime(n + Self(n-1)) - NthPrime(n): n in [1..12]]; // Vincenzo Librandi, Aug 24 2015
    
  • Mathematica
    FoldList[(Prime[#2+#1]-Prime[#2])&,1,Range@15] (* Ivan N. Ianakiev, Aug 23 2015 *)
    RecurrenceTable[{a[n+1] == Prime[n+a[n]] - Prime[n], a[1]==1}, a, {n, 1,16}] (* G. C. Greubel, Aug 24 2015 *)
    nxt[{n_,a_}]:={n+1,Prime[n+a]-Prime[n]}; NestList[nxt,{1,1},16][[All,2]] (* Harvey P. Dale, May 15 2018 *)
  • PARI
    a(n) = if(n==1, 1, prime(n-1 + a(n-1)) - prime(n-1));
    vector(12, n, a(n)) \\ Altug Alkan, Oct 05 2015
    
  • Python
    # see LINKS

Extensions

a(13)-a(16) from Ivan N. Ianakiev, Aug 23 2015
a(17)-a(19) from Jinyuan Wang, Jun 27 2020
a(20)-a(22) from Lucas A. Brown, Mar 18 2024

A141633 Primes of the form j-(p(j+3)-p(j))/(p(j+2)-p(j+1)), where p(j)=j-th prime.

Original entry on oeis.org

2, 3, 7, 13, 17, 19, 23, 29, 31, 41, 43, 59, 61, 67, 73, 83, 101, 103, 107, 109, 113, 127, 163, 167, 179, 193, 199, 223, 233, 239, 241, 257, 281, 307, 311, 353, 373, 401, 409, 419, 443, 449, 461, 463, 487, 491, 499, 523, 541, 547, 569, 599, 607, 613, 659, 661, 677, 701, 709
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 10 2008

Keywords

Comments

Primes of the form j-A031165(j)/A001223(j+1). In cases like j=28 and j=32 which create the same prime (here: 23), the prime is only listed once.

Examples

			If j=12, then 12-(p(12+3)-p(12))/(p(12+2)-p(12+1))=12-(47-37)/(43-41)=7=a(3).
If j=48, then 48-(p(48+3)-p(48))/(p(48+2)-p(48+1))=48-(233-223)/(229-227)=43: prime, in the sequence.
If j=88, then 88-(p(88+3)-p(88))/(p(88+2)-p(88+1))=88-(467-457)/(463-461)=83: prime, in the sequence
		

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    Select[Table[n-(Prime[n+3]-Prime[n])/(Prime[n+2]-Prime[n+1]),{n,1000}],PrimeQ[ #] &&#>0&]//Union (* Harvey P. Dale, Aug 12 2020 *)

Extensions

Corrected definition and examples, added many more terms - R. J. Mathar, Sep 13 2008

A214612 prime(n^3) - prime(n).

Original entry on oeis.org

0, 16, 98, 304, 680, 1308, 2292, 3652, 5496, 7890, 10926, 14716, 19362, 24766, 31272, 38820, 47598, 57498, 68964, 81728, 96064, 112212, 129990, 149628, 171432, 194942, 220758, 248744, 279322, 312470, 347580, 385962, 427032, 470794, 517404, 567720, 620374
Offset: 1

Views

Author

Jonathan Vos Post, Mar 06 2013

Keywords

Comments

This is to exponent 3 as A213926 is to exponent 2.

Examples

			a(1) = prime(1^3) - prime(1) = 2-2 = 0.
a(2) = prime(2^3) - prime(2) = 19-3 = 16.
a(3) = prime(3^3) - prime(3) = 103-5 = 98.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[n^3] - Prime[n], {n, 50}] (* T. D. Noe, Mar 07 2013 *)
Previous Showing 11-16 of 16 results.