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.

A163424 Primes of the form (p-1)^3/8 + (p+1)^2/4 where p is prime.

Original entry on oeis.org

5, 17, 43, 593, 829, 2969, 3631, 12743, 27961, 44171, 60919, 127601, 278981, 578843, 737281, 950993, 980299, 1455893, 1969001, 2424329, 2763881, 3605293, 5767739, 7801993, 9305521, 11290049, 12220361, 12704093, 16452089, 22987529, 35720189
Offset: 1

Views

Author

Keywords

Examples

			(3-1)^3/8 + (3+1)^2/4 = 1 + 4 = 5;
(5-1)^3/8 + (5+1)^2/4 = 8 + 9 = 17;
(7-1)^3/8 + (7+1)^2/4 = 27 + 16 = 43.
		

Crossrefs

Subsequence of A100662.
For the corresponding primes p, see A163425.

Programs

  • Mathematica
    f[n_]:=((p-1)/2)^3+((p+1)/2)^2; lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst,f[p]]],{n,7!}];lst
    Select[(#-1)^3/8+(#+1)^2/4&/@Prime[Range[150]],PrimeQ] (* Harvey P. Dale, Oct 05 2018 *)
  • PARI
    list(lim)=my(v=List(),t); forprime(p=3,, t=((p-1)/2)^3 + ((p+1)/2)^2; if(t>lim, break); if(isprime(t), listput(v,t))); Vec(v) \\ Charles R Greathouse IV, Dec 23 2016