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

A078597 Primes of the form p*(p+4)+2 where p and p+4 are primes.

Original entry on oeis.org

23, 79, 223, 439, 4759, 53359, 77839, 95479, 99223, 159199, 194479, 239119, 378223, 416023, 680623, 2223079, 2595319, 2873023, 3186223, 3515623, 4003999, 5022079, 6456679, 6859159, 8732023, 9235519, 9492559, 10017223, 10595023
Offset: 1

Views

Author

Cino Hilliard, Dec 08 2002

Keywords

Comments

More generally, if a and b are even numbers, let Seq(a,b) be the sequence of primes of the form p*(p+a)+b where p and p+a are primes. Seq(a,b) is finite if either a^2+b == 2 (mod 3) or a^2-4*b is a square. Is it infinite in all other cases?

Crossrefs

Except for the term 23, this is a subsequence of A048880. A051779 is Seq(2, 2). A049002 is Seq(0, -2). A045637 is Seq(0, 4).

Programs

  • Mathematica
    Select[ #(#+4)+2&/@Select[Prime/@Range[500], PrimeQ[ #+4]&], PrimeQ]
  • PARI
    prodtp(n1,n2,a,b)=local(f,x); f=0; forprime(x=n1,n2,if(isprime(x+a),f=x*(x+a)+b; if(isprime(f),print(x" "x+a" "f" "); ); ); ); \ Computes that part of Seq(a,b) with n1<=p<=n2.

Extensions

Edited by Dean Hickerson, Dec 10 2002

A146980 Nonsquarefree numbers such that n-1 is prime and n+1 is square.

Original entry on oeis.org

8, 24, 48, 80, 168, 224, 360, 440, 728, 840, 1088, 1224, 1368, 1848, 2208, 2400, 3024, 3720, 3968, 4760, 5040, 5624, 5928, 7920, 8648, 10608, 11448, 13688, 14160, 14640, 16128, 17160, 18224, 19320, 21024, 24024, 25920, 28560, 29928, 31328, 33488
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 04 2008

Keywords

Comments

Also numbers n > 3 such that n-1 is prime and n+1 is square.
Sequence gives values x of fundamental solution (x,y) to Pellian x^2 - D*y^2 = 1, with D = n-1 = A049002, corresponding values y being sqrt(n+1) = A028870. (Substituting back into the Pellian we indeed have n^2 - (n-1)(n+1) = 1.) - Lekraj Beedassy, Feb 23 2019

Crossrefs

Programs

  • Magma
    [ n: n in [1..35000] | not IsSquarefree(n) and IsPrime(n-1) and IsSquare(n+1) ]; // Klaus Brockhaus, Nov 05 2008
    
  • Mathematica
    Select[Range[35000], !SquareFreeQ[#] && PrimeQ[#-1] && IntegerQ[Sqrt[#+1] ] &] (* G. C. Greubel, Feb 22 2019 *)
    Mean/@SequencePosition[Table[Which[PrimeQ[n],1,IntegerQ[Sqrt[ n]],3,!SquareFreeQ[ n],2,True,0],{n,33500}],{1,2,3}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 03 2020 *)
  • PARI
    list(lim)=my(v=List()); forstep(k=3,sqrtint(lim\1+1),2, if(isprime(k^2-2), listput(v,k^2-1))); Vec(v) \\ Charles R Greathouse IV, Jun 13 2017
    
  • Sage
    [n for n in (1..35000) if not is_squarefree(n) and is_prime(n-1) and is_square(n+1)] # G. C. Greubel, Feb 22 2019

Extensions

Extended beyond a(6) by Klaus Brockhaus, Nov 05 2008

A182474 Primes of the form p^q - q, where p and q are primes.

Original entry on oeis.org

2, 5, 7, 23, 47, 167, 359, 839, 1367, 1847, 2207, 3719, 5039, 7919, 8179, 10607, 11447, 16127, 17159, 19319, 29927, 36479, 44519, 49727, 54287, 57119, 66047, 85847, 97967, 113567, 128879, 177239, 196247, 201599, 218087, 241079, 273527, 292679, 323759, 344567
Offset: 1

Views

Author

Alex Ratushnyak, May 01 2012

Keywords

Examples

			8179 = 2^13 - 13
		

Crossrefs

Cf. A049002 (primes of the form p^2 - 2).
Cf. A057678 (primes of the form 2^p - p).

Programs

  • Mathematica
    nn = 600000; mx = Floor[Log[2, nn]]; t2 = Select[Table[2^n - n, {n, Prime[Range[PrimePi[mx]]]}], PrimeQ]; mx = Floor[Sqrt[nn]]; tp = Select[Table[n^2 - 2, {n, Prime[Range[PrimePi[mx]]]}], PrimeQ]; Union[t2, tp] (* T. D. Noe, May 01 2012 *)
    Module[{upto=350000,r},r=Floor[Sqrt[upto+2]];Select[Union[Select[ (#1[[1]]^#1[[2]]-#1[[2]]&)/@Tuples[Prime[Range[r]],2], PrimeQ]], #1<=upto&]] (* Harvey P. Dale, Dec 07 2012 *)

Formula

Union of A049002 and A057678.
Previous Showing 21-23 of 23 results.