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 54 results. Next

A088548 Primes of the form k^4 + k^3 + k^2 + k + 1.

Original entry on oeis.org

5, 31, 2801, 22621, 30941, 88741, 245411, 292561, 346201, 637421, 732541, 837931, 2625641, 3500201, 3835261, 6377551, 15018571, 16007041, 21700501, 28792661, 30397351, 35615581, 39449441, 48037081, 52822061, 78914411, 97039801, 147753211, 189004141, 195534851
Offset: 1

Views

Author

Cino Hilliard, Nov 17 2003

Keywords

Comments

These numbers when >= 31 are primes repunits 11111_n in a base n >= 2, so except 5, they are all Brazilian primes belonging to A085104. (See Links "Les nombres brésiliens", § V.4 - § V.5.) A008858 is generated by the bases n present in A049409. - Bernard Schott, Dec 19 2012

Examples

			a(2) = 31 is prime and 31 = 2^4 + 2^3 + 2^2 + 2 + 1.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is n^4+n^3+n^2+n+1]; // Vincenzo Librandi, Jul 16 2012
    
  • Mathematica
    lst={}; Do[a=1+n+n^2+n^3+n^4; If[PrimeQ[a], AppendTo[lst,a]], {n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jun 02 2009 *)
    Select[Table[n^4+n^3+n^2+n+1, {n,0,2000}], PrimeQ] (* Vincenzo Librandi, Jul 16 2012 *)
  • PARI
    polypn(n,p) = { for(x=1,n, if(p%2,y=2,y=1); for(m=1,p, y=y+x^m; ); if(isprime(y),print1(y",")); ) }
    
  • Python
    from sympy import isprime
    print(list(filter(isprime, (k**4+k**3+k**2+k+1 for k in range(120))))) # Michael S. Branicky, May 31 2021

Formula

A000040 intersect A053699. - R. J. Mathar, Feb 07 2014

A237040 Semiprimes of the form k^3 + 1.

Original entry on oeis.org

9, 65, 217, 4097, 5833, 10649, 21953, 74089, 195113, 216001, 343001, 373249, 474553, 1000001, 1061209, 1191017, 1404929, 3241793, 3796417, 4251529, 6859001, 9261001, 12487169, 21952001, 29791001, 35937001, 43614209, 45882713, 55742969, 62099137, 89915393, 94818817, 117649001
Offset: 1

Views

Author

Jonathan Sondow, Feb 02 2014

Keywords

Comments

k^3 + 1 is a term iff k + 1 and k^2 - k + 1 are both prime.
Is the sequence infinite? This is an analog of Landau's 4th problem, namely, are there infinitely many primes of the form k^2 + 1?
In other words: are there infinitely many primes p such that p^2 - 3*p + 3 is also prime? - Charles R Greathouse IV, Jul 02 2017

Examples

			9 = 3*3 = 2^3 + 1 is the first semiprime of the form n^3 + 1, so a(1) = 9.
		

Crossrefs

Cf. A242262 (semiprimes of the form k^3 - 1).

Programs

  • Magma
    IsSemiprime:= func; [s: n in [1..500] | IsSemiprime(s) where s is n^3 + 1]; // Vincenzo Librandi, Jul 02 2017
  • Mathematica
    L = Select[Range[500], PrimeQ[# + 1] && PrimeQ[#^2 - # + 1] &]; L^3 + 1
    Select[Range[50]^3 + 1, PrimeOmega[#] == 2 &] (* Zak Seidov, Jun 26 2017 *)
  • PARI
    lista(nn) = for (n=1, nn, if (bigomega(sp=n^3+1) == 2, print1(sp, ", "));); \\ Michel Marcus, Jun 27 2017
    
  • PARI
    list(lim)=my(v=List(),n,t); forprime(p=3,sqrtnint(lim\1-1,3)+1, if(isprime(t=p^2-3*p+3), listput(v,t*p))); Vec(v) \\ Charles R Greathouse IV, Jul 02 2017
    

Formula

a(n) = A096173(n)^3 + 1 = 8*A237037(n)^3 + 1.

A163418 Primes of the form ((p-1)/2)^2+((p+1)/2), where p is prime.

Original entry on oeis.org

3, 7, 13, 31, 43, 73, 211, 241, 421, 463, 1123, 1723, 2551, 2971, 4831, 5701, 6163, 8011, 8191, 9901, 11131, 12433, 14281, 17293, 19183, 20023, 23563, 24181, 28393, 30103, 31153, 35911, 37831, 43891, 46441, 53593, 60271, 77563, 83233, 86143
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A002383. - Charles R Greathouse IV, Aug 11 2009

Examples

			((3-1)/2)^2+((3+1)/2)=1+2=3;
((5-1)/2)^2+((5+1)/2)=4+3=7;
((7-1)/2)^2+((7+1)/2)=9+4=13,..
		

Crossrefs

Cf. A162652.

Programs

  • Mathematica
    f[n_]:=((p-1)/2)^2+((p+1)/2); lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst,f[p]]],{n,6!}];lst
    Select[((#-1)/2)^2+((#+1)/2)&/@Prime[Range[200]],PrimeQ] (* Harvey P. Dale, Aug 06 2012 *)
  • PARI
    forprime(p=3,10^3,if(isprime(q=((p-1)/2)^2+(p+1)/2),print1(q,", "))) \\ Derek Orr, Apr 30 2015

A059055 Primes which can be written as (b^k+1)/(b+1) for positive integers b and k.

Original entry on oeis.org

3, 7, 11, 13, 31, 43, 61, 73, 157, 211, 241, 307, 421, 463, 521, 547, 601, 683, 757, 1123, 1483, 1723, 2551, 2731, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 9091, 9901, 10303, 11131, 12211, 12433, 13421, 13807, 14281
Offset: 1

Views

Author

Henry Bottomley, Dec 21 2000

Keywords

Comments

For (b^k+1)/(b+1) to be a prime, k must be an odd prime. 2=(0^0+1)/(0+1) has been excluded since neither b nor k would be positive.
From Bernard Schott, Apr 30 2021: (Start)
43 is the only known prime to have two such representations (examples).
The next two sequences realize a partition of this set: Brazilian primes of the form (c^q-1)/(c-1) (A002383 \ {3}) and primes that are not Brazilian (A343774). (End)

Examples

			43 is in the sequence since (2^7+1)/(2+1) = 129/3 = 43; indeed also (7^3+1)/(7+1) = 344/8 = 43.
		

Crossrefs

Programs

  • Mathematica
    max = 89; maxdata = (1 + max^3)/(1 + max); a = {}; Do[i = 1; While[i = i + 2; cc = (1 + m^i)/(1 + m); cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Union[a] (* Lei Zhou, Feb 08 2012 *)
  • PARI
    isok(p) = {if (isprime(p), for (b=2, p, my(k=3); while ((x=(b^k+1)/(b+1)) <= p, if (x == p, return (1)); k = nextprime(k+1););););} \\ Michel Marcus, Apr 30 2021

A073337 Primes of the form 4*k^2 - 10*k + 7 with k positive.

Original entry on oeis.org

3, 13, 31, 241, 307, 463, 757, 1123, 1723, 3307, 3541, 4831, 5113, 5701, 6007, 8011, 9901, 10303, 11131, 12433, 13807, 14281, 17293, 20023, 20593, 21757, 23563, 24181, 26083, 28057, 30103, 35911, 41413, 43891, 46441, 53593, 60271, 78121, 82657, 86143, 95791, 108571, 123553, 127807, 136531, 145543, 147073, 156421
Offset: 1

Views

Author

Zak Seidov, Aug 25 2002

Keywords

Comments

Primes of the form k^2 + k + 1 with k odd and positive. - Peter Munn, Jan 27 2018
Primes of the form A000217(2*k) + A000217(2*k+2). - J. M. Bergot, May 09 2018

Examples

			3 is a term because for k=2, 4*k^2 - 10*k + 7 = 3 a prime.
7 is not a term because 7 can only be obtained with k=0 or k=5/2.
		

Crossrefs

Programs

  • GAP
    Filtered(List([2..300],n->4*n^2-10*n+7),IsPrime); # Muniru A Asiru, Apr 15 2018
    
  • Magma
    [a: n in [1..400] | IsPrime(a) where a is 4*n^2 - 10*n + 7]; // Vincenzo Librandi, Dec 23 2019
  • Maple
    select(isprime, [seq(4*n^2-10*n+7 ,n=2..300)]); # Muniru A Asiru, Apr 15 2018
  • Mathematica
    Select[Table[4 n^2 - 10 n + 7, {n, 1, 200}], PrimeQ] (* Vincenzo Librandi, Dec 23 2019 *)
  • PARI
    select(isprime,vector(300,k,4*k^2 - 10*k + 7)) \\ Joerg Arndt, Feb 28 2018
    

Formula

a(n) = A054554(A073338(n)). - Elmo R. Oliveira, Apr 20 2025

Extensions

Edited by Dean Hickerson, Aug 28 2002
a(1)=7 inserted and typo in Mathematica code corrected by Vincenzo Librandi, Dec 09 2011
Incorrect term 7 removed by Joerg Arndt, Feb 28 2018

A185632 Primes of the form n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

3, 43, 73, 157, 211, 241, 421, 463, 601, 757, 1123, 1483, 2551, 2971, 3307, 3907, 4423, 4831, 5701, 6007, 6163, 6481, 8191, 9901, 11131, 12211, 12433, 13807, 14281, 19183, 20023, 20593, 21757, 22651, 23563, 24181, 26083, 26407, 27061, 28393, 31153, 35533
Offset: 1

Views

Author

Bernard Schott, Dec 18 2012

Keywords

Comments

These are the primes associated with A182253.
All these numbers are in A002383 but not in A053183.
All the numbers n^2 + n + 1 = 111_n with n >= 2 are by definition Brazilian numbers: A125134. See Links: "Les nombres brésiliens" - Section V.5 page 35.

Crossrefs

Programs

  • Mathematica
    Select[Table[If[PrimeQ[n],Nothing,n^2+n+1],{n,200}],PrimeQ] (* Harvey P. Dale, Apr 02 2023 *)
  • PARI
    lista(nn) = {for (n = 1, nn, if (! isprime(n) && isprime(p = n^2 + n + 1), print1(p, ", ");););} \\ Michel Marcus, Sep 04 2013

A081257 a(n) is the greatest prime factor of (n^3 - 1).

Original entry on oeis.org

7, 13, 7, 31, 43, 19, 73, 13, 37, 19, 157, 61, 211, 241, 13, 307, 17, 127, 421, 463, 13, 79, 601, 31, 37, 757, 271, 67, 29, 331, 151, 1123, 397, 97, 43, 67, 1483, 223, 547, 1723, 139, 631, 283, 109, 103, 61, 181, 43, 2551, 379, 919, 409, 2971, 79, 103, 3307, 163
Offset: 2

Views

Author

Jan Fricke, Mar 14 2003

Keywords

Comments

The record values here (as well as those for A081256) appear to match the terms of A002383 for n > 1. - Bill McEachen, Jun 19 2023

Examples

			a(7)=19 because 7^3 - 1 = 342 = 2*3*3*19.
		

Crossrefs

Cf. A096175 (n^3-1 is an odd semiprime), A096176 ((n^3-1)/(n-1) is prime).

Programs

Formula

a(n) = A006530(A068601(n)). - Michel Marcus, Jun 19 2023

Extensions

More terms from Hugo Pfoertner, Jun 21 2004

A110284 Squares of the form 4p - 3, where p is a prime.

Original entry on oeis.org

9, 25, 49, 121, 169, 289, 625, 841, 961, 1225, 1681, 1849, 2401, 3025, 4489, 5929, 6889, 10201, 11881, 13225, 14161, 15625, 17689, 19321, 20449, 22801, 24025, 24649, 25921, 32041, 32761, 39601, 41209, 44521, 48841, 49729, 55225, 57121, 69169
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 07 2005

Keywords

Comments

Also: squares of the form 2*s-3, where s is a semiprime, A107317. - Franklin T. Adams-Watters, Jun 28 2010
Squares are less dense then primes and easy to generate so it's faster to check squares if they are of the required form than to check if primes are of the required form. - David A. Corneth, Oct 15 2018

Crossrefs

Programs

  • Magma
    [4*p - 3: p in PrimesUpTo(10^5)|IsSquare (4*p - 3)]; // Vincenzo Librandi, Oct 17 2018
  • Mathematica
    Select[ 4Prime[ Range[2000]] - 3, IntegerQ[ Sqrt[ # ]] &] (* Robert G. Wilson v, Sep 20 2005 *)
  • PARI
    isok(n) = issquare(n) && (p=(n+3)/4) && (frac(p)==0) && isprime(p); \\ Michel Marcus, Oct 15 2018
    
  • PARI
    upto(n) = my(res = List()); forstep(i = 3, sqrtint(n), 2, if(isprime((i^2+3)/4), listput(res, i^2))); res \\ David A. Corneth, Oct 15 2018
    

Formula

a(n) = 4*A002383(n) - 3 = A088503(n-1)^2.

Extensions

Extended by Ray Chandler, Sep 07 2005

A285017 Primes of the form 1 + n + n^2 + n^3 + ... + n^k, n > 1, k > 1 where n is not prime.

Original entry on oeis.org

43, 73, 157, 211, 241, 421, 463, 601, 757, 1123, 1483, 2551, 2971, 3307, 3907, 4423, 4831, 5701, 6007, 6163, 6481, 8191, 9901, 11131, 12211, 12433, 13807, 14281, 19183, 20023, 20593, 21757, 22621, 22651, 23563, 24181, 26083, 26407, 27061, 28393, 31153, 35533
Offset: 1

Views

Author

Bernard Schott, Apr 08 2017

Keywords

Comments

These numbers are Brazilian primes belonging to A085104.
Brazilian primes with n prime are A023195, except 3 which is not Brazilian.
A085104 = This sequence Union { A023195 \ number 3 }.
k + 1 is necessarily prime, but that's not sufficient: 1 + 10 + 100 = 111.
Most of these terms come from A185632 which are prime numbers 111_n with n no prime, the first other term is 22621 = 11111_12, the next one is 245411 = 11111_22.
Number of terms < 10^k: 0, 2, 9, 23, 64, 171, 477, 1310, 3573, 10098, ..., . - Robert G. Wilson v, Apr 15 2017

Examples

			157 = 12^2 + 12 + 1 = 111_12 is prime and 12 is composite.
		

Crossrefs

Programs

  • Maple
    N:= 40000: # to get all terms <= N
    res:= NULL:
    for k from 2 to ilog2(N) do if isprime(k) then
      for n from 2 do
        p:= (n^(k+1)-1)/(n-1);
        if p > N then break fi;
        if isprime(p) and not isprime(n) then res:= res, p fi
    od fi od:
    res:= {res}:
    sort(convert(res,list)); # Robert Israel, Apr 14 2017
  • Mathematica
    mx = 36000; g[n_] := Select[Drop[Accumulate@Table[n^ex, {ex, 0, Log[n, mx]}], 2], PrimeQ]; k = 1; lst = {}; While[k < Sqrt@mx, If[CompositeQ@k, AppendTo[lst, g@k]; lst = Sort@Flatten@lst]; k++]; lst (* Robert G. Wilson v, Apr 15 2017 *)
  • PARI
    isok(n) = {if (isprime(n), forcomposite(b=2, n, d = digits(n, b); if ((#d > 2) && (vecmin(d) == 1) && (vecmax(d)== 1), return(1)););); return(0);} \\ Michel Marcus, Apr 09 2017
    
  • PARI
    A285017_vec(n)={my(h=vector(n,i,1),y,c,z=4,L:list);L=List();forprime(x=3,,forcomposite(m=z,x-1,y=digits(x,m);if((y==h[1..#y])&&2<#y,listput(L,x);z=m;if(c++==n,return(Vec(L))))))} \\ R. J. Cano, Apr 18 2017

A119959 p^2-p+1 central polygonal numbers with prime indices A002061(prime(n)).

Original entry on oeis.org

3, 7, 21, 43, 111, 157, 273, 343, 507, 813, 931, 1333, 1641, 1807, 2163, 2757, 3423, 3661, 4423, 4971, 5257, 6163, 6807, 7833, 9313, 10101, 10507, 11343, 11773, 12657, 16003, 17031, 18633, 19183, 22053, 22651, 24493, 26407, 27723, 29757, 31863
Offset: 1

Views

Author

Alexander Adamchuk, Aug 02 2006

Keywords

Comments

Prime terms belong to A074268, which is a subset of A002383, A087126, A034915, A085104.
In every interval of prime(n)^2 integers, a(n) is the number that are not divisible by prime(n) plus the number that are divisible by prime(n)^2. - Peter Munn, Dec 12 2020

Crossrefs

Programs

  • Mathematica
    Table[Prime[n]^2-Prime[n]+1,{n,1,100}]
  • PARI
    a(n) = {my(p = prime(n)); p^2 - p + 1; } \\ Amiram Eldar, Nov 07 2022

Formula

a(n) = prime(n)^2 - prime(n) + 1.
a(n) = A036689(n)+1. - R. J. Mathar, Aug 13 2019
Product_{n>=1} (1 - 1/a(n)) = zeta(6)/(zeta(2)*zeta(3)) (A068468). - Amiram Eldar, Nov 07 2022
Previous Showing 11-20 of 54 results. Next