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

A023515 a(n) = prime(n)*prime(n-1) - 1.

Original entry on oeis.org

1, 5, 14, 34, 76, 142, 220, 322, 436, 666, 898, 1146, 1516, 1762, 2020, 2490, 3126, 3598, 4086, 4756, 5182, 5766, 6556, 7386, 8632, 9796, 10402, 11020, 11662, 12316, 14350, 16636, 17946, 19042, 20710, 22498, 23706, 25590, 27220, 28890
Offset: 1

Views

Author

Keywords

Comments

a(1) = 1 assumes the not generally accepted convention prime(0) = 1. - Klaus Brockhaus, Dec 23 2010

Crossrefs

Cf. A120875 (a subsequence).

Programs

  • Magma
    [ NthPrime(n-1)*NthPrime(n)-1: n in [1..50] ]; // Vincenzo Librandi, Dec 23 2010; simplified by Klaus Brockhaus, Dec 23 2010
    
  • Maple
    1,seq(ithprime(n)*ithprime(n-1)-1,n=2..40); # Muniru A Asiru, Apr 27 2019
  • Mathematica
    Prepend[Table[Prime@ n Prime[n - 1] - 1, {n, 2, 12}], 1] (* Michael De Vlieger, Nov 10 2015 *)
    Join[{1},Times@@#-1&/@Partition[Prime[Range[40]],2,1]] (* Harvey P. Dale, Jul 06 2024 *)
  • PARI
    a(n) = if(n==1, 1, prime(n)*prime(n-1)-1) \\ Altug Alkan, Nov 10 2015

Formula

From Jason Kimberley, Oct 23 2015: (Start)
a(n) = A006094(n-1) - 1 = A000040(n-1)*A000040(n)-1, for n>1.
a(n) = 2*A102770(n-2), for n>2.
(End)

A075369 Square associated with twin primes (p,p+2): p(p+2) + 1. Square of the average of twin primes.

Original entry on oeis.org

16, 36, 144, 324, 900, 1764, 3600, 5184, 10404, 11664, 19044, 22500, 32400, 36864, 39204, 51984, 57600, 72900, 79524, 97344, 121104, 176400, 186624, 213444, 272484, 324900, 360000, 381924, 412164, 435600, 656100, 675684, 685584, 736164
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Crossrefs

Programs

  • Haskell
    a075369 = (^ 2) . a014574  -- Reinhard Zumkeller, Feb 10 2015
    
  • Magma
    [a: n in [1..300] | IsSquare(a) where a is NthPrime(n)*NthPrime(n+1)+1]; // Vincenzo Librandi, Nov 19 2015
  • Maple
    P:= select(isprime,{seq(2*i+1,i=1..1000)}):
    T:= P intersect map(`+`,P,2):
    sort(convert(map(t -> (t-1)^2, T), list)); # Robert Israel, Nov 18 2015
  • Mathematica
    f[n_]:=Prime[n]*Prime[n+1]+1; lst={}; Do[If[IntegerQ[Sqrt[f[n]]],AppendTo[lst,f[n]]],{n,4*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 10 2010 *)
  • PARI
    p=2; forprime(b=3, 1e3, if(b-p==2, print1(b*p+1", ")); p=b) \\ Altug Alkan, Nov 10 2015
    

Formula

a(n) = A037074(n) + 1. - Jon E. Schoenfield, Jan 13 2015
a(n) = A014574(n)^2. - Jon E. Schoenfield, Jan 14 2015
a(n) = A120875(n) + 2. - Jason Kimberley, Oct 22 2015

A120876 (Product of twin primes - 1)/2.

Original entry on oeis.org

7, 17, 71, 161, 449, 881, 1799, 2591, 5201, 5831, 9521, 11249, 16199, 18431, 19601, 25991, 28799, 36449, 39761, 48671, 60551, 88199, 93311, 106721, 136241, 162449, 179999, 190961, 206081, 217799, 328049, 337841, 342791, 368081, 388961, 520199, 532511, 551249, 563921
Offset: 1

Views

Author

Lekraj Beedassy, Jul 09 2006

Keywords

Comments

This sequence is a subsequence of A102770.

Crossrefs

Cf. The subsequence A086870.

Programs

  • Mathematica
    (Times@@#-1)/2&/@Select[Partition[Prime[Range[200]], 2,1],Last[#]- First[#]== 2&] (* Harvey P. Dale, Jun 26 2011 *)
  • PARI
    for(n=1, 200, if(prime(n+1)-prime(n)==2, print1((prime(n)*prime(n+1)-1)/2", "))) \\ Altug Alkan, Oct 23 2015
    
  • PARI
    p=2; forprime(q=3, 1e3, if(q-p==2, print1(p*q\2", ")); p=q) \\ Charles R Greathouse IV, Apr 01 2016

Formula

a(n) = A120875(n)/2 = A075369(n)/2-1 = A075369(n)^2/2-1.
a(n) = 18*A002822(n-1)^2-1, for n>1.
a(n) = A102770(A107770(n)). - Jason Kimberley, Nov 10 2015

Extensions

Corrected by T. D. Noe, Oct 25 2006
Edited by Jason Kimberley, Oct 23 2015

A094949 Phi(m)*sigma(m), where m is the product of exactly two primes that differ by 2, where phi=A000010, sigma=A000203.

Original entry on oeis.org

192, 1152, 20160, 103680, 806400, 3104640, 12945600, 26853120, 108201600, 136002240, 362597760, 506160000, 1049630400, 1358807040, 1536796800, 2702128320, 3317529600, 5314118400, 6323748480, 9475464960, 14665694400
Offset: 1

Views

Author

Lekraj Beedassy, Jun 19 2004

Keywords

Comments

If m=p*q for the twin prime pair (p, q), then the relation p^2 + q^2 = 2*(m+2) is evident from equations p*(p+2)=m=q*(q-2). Now phi(m)=(p-1)*(q-1)=p^2 - 1 and sigma(m)=(p+1)*(q+1)=q^2 - 1, so that phi(m)*sigma(m)=(p*q)^2 -(p^2 + q^2)+1=m^2-2*(m+2)+1=(m-3)*(m+1).

Crossrefs

Programs

  • Mathematica
    EulerPhi[#]DivisorSigma[1,#]&/@Times@@@Select[Partition[Prime[ Range[ 200]],2,1],#[[2]]-#[[1]]==2&] (* Harvey P. Dale, Apr 13 2017 *)
  • PARI
    {m=400;p=1;while(p
    				

Formula

a(n)=(m-3)*(m+1), where m=A037074(n).
a(n)=192*A002415(k), where k=A040040(n-1).
a(n) = (A120875(n))^2 - 4 = 4*((A120876(n))^2 - 1). - Lekraj Beedassy, Jul 09 2006

Extensions

Corrected and extended by Jason Earls, Rick L. Shepherd, Vladeta Jovovic and Klaus Brockhaus, Jun 20 2004
Showing 1-4 of 4 results.