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

A239115 Numbers n such that (n-1)*n^2-1 and n^2-(n-1) are both prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 13, 18, 21, 22, 58, 67, 79, 90, 100, 106, 111, 118, 120, 144, 162, 174, 195, 204, 246, 273, 279, 345, 393, 403, 406, 435, 436, 526, 541, 567, 613, 625, 636, 702, 721, 729, 736, 744, 762, 763, 865, 898, 961, 970, 993, 1059, 1099, 1117, 1131
Offset: 1

Views

Author

Ilya Lopatin following a suggestion from Juri-Stepan Gerasimov, Mar 10 2014,

Keywords

Comments

Numbers n such that (n^3-n^2-1)*(n^2-n+1) is semiprime.
Intersection of A162293 and A055494.
Primes in this sequence: 2, 3, 7, 13, 67, 79, 541, 613, 1117, ...
Squares in this sequence: 4, 9, 100, 144, 961, ...

Examples

			13 is in this sequence because (13-1)*13^2-1 = 2027 and 13^2-(13-1) = 157 are both prime.
		

Crossrefs

Programs

  • Magma
    k:=1;
        for n in [1..1000] do
         if IsPrime(k*(n-1)*n^2-1) and IsPrime(k*n^2-n+1) then
                n;
          end if;
        end for; // Juri-Stepan Gerasimov, Mar 18 2014
  • Mathematica
    Select[Range[1000], PrimeQ[#^3 - #^2 - 1] && PrimeQ[#^2 - # + 1] &] (* Giovanni Resta, Mar 10 2014 *)
    Select[Range[1200],PrimeOmega[#^5-2#^4+2#^3-2#^2+#-1]==2&] (* Harvey P. Dale, Sep 24 2014 *)
  • PARI
    isok(n) = isprime(n^3-n^2-1) && isprime(n^2-n+1); \\ Michel Marcus, Mar 10 2014
    

Extensions

More terms from Giovanni Resta, Mar 10 2014

A093575 Smallest prime of the form n^j+(n+1)^k, with j,k integer > 0, max(j,k)>1.

Original entry on oeis.org

3, 7, 13, 29, 31, 43, 71, 73, 109, 131, 14653, 157, 2393, 211, 241, 83537, 307, 379, 419, 421, 463, 1013, 599, 601, 701, 19709, 757, 615497, 929, 991, 1049537, 2113, 1123, 1259, 2521, 51949, 1481, 1483, 3121, 1721, 1723, 3613, 1979, 2069, 2161, 4977017
Offset: 1

Views

Author

Hugo Pfoertner, Apr 01 2004

Keywords

Examples

			a(7)=71 because 7+8^2=71 is prime, whereas 7^2+8=57 is composite.
		

Crossrefs

Cf. A002383 primes of form n^2+n+1, A093574, A093576.

A107317 Semiprimes of the form 2*(m^2 + m + 1) (implying that m^2 + m + 1 is a prime).

Original entry on oeis.org

6, 14, 26, 62, 86, 146, 314, 422, 482, 614, 842, 926, 1202, 1514, 2246, 2966, 3446, 5102, 5942, 6614, 7082, 7814, 8846, 9662, 10226, 11402, 12014, 12326, 12962, 16022, 16382, 19802, 20606, 22262, 24422, 24866, 27614, 28562, 34586, 38366, 40046
Offset: 1

Views

Author

Giovanni Teofilatto, May 21 2005

Keywords

Comments

Twice A002383.
Also semiprimes n such that 2*n - 3 is a square. - Giovanni Teofilatto, Dec 29 2005. This coincidence was noticed by Andrew S. Plewe. Proof that this is the same sequence: If X is n^2+(n+1)^2+1, then 2X-3 is 4n^2+4n+1 = (2n+1)^2. And if 2X-3 is a square, then since it's odd, 2X-3 = (2n+1)^2 and X = n^2+(n+1)^2+1. - Don Reble, Apr 18 2007

Examples

			a(1)=6 because 1^2 + 2^2 + 1 = 6 = 2*3;
a(2)=14 because 2^2 + 3^2 + 1 = 14 = 2*7;
a(3)=26 because 3^2 + 4^2 + 1 = 26 = 13*2.
		

Crossrefs

Programs

  • Mathematica
    2(#^2 + # + 1) & /@ Select[ Range[144], PrimeQ[ #^2 + # + 1] &] (* Robert G. Wilson v, May 28 2005 *)
    fQ[n_] := Plus @@ Last /@ FactorInteger@n == 2 && IntegerQ@Sqrt[2n - 3]; Select[ Range@43513, fQ[ # ] &] (* Robert G. Wilson v *)
  • PARI
    for(n=2,100000,if(bigomega(n)==2&&issquare(2*n-3),print1(n,","))) /* Lambert Herrgesell */

Formula

a(n) = 2*A002383(n).
a(n) = 2*(A002384(n)^2+A002384(n)+1).

Extensions

Edited by Robert G. Wilson v, May 28 2005
Re-edited by N. J. A. Sloane, Apr 18 2007

A128878 Primes of the form 47*n^2 - 1701*n + 10181.

Original entry on oeis.org

10181, 8527, 6967, 5501, 4129, 2851, 1667, 577, 379, 1451, 2617, 3877, 5231, 6679, 8221, 9857, 11587, 13411, 15329, 17341, 19447, 21647, 31387, 34057, 36821, 39679, 45677, 48817, 52051, 65927, 81307, 89561, 102647, 107197, 116579, 126337, 131357
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Apr 17 2007

Keywords

Comments

Primes are given in the order in which they arise for increasing n.
Polynomial generates 22 primes for 0 <= n <= 42, i.e., for n = 0, 1, 2, 3, 4, 5, 6, 7, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42.
If the definition is replaced by "Numbers n of the form 47*k^2 - 1701*k + 10181 such that either n or -n is a prime" we get (essentially) A050267.

Examples

			47k^2 - 1701k + 10181 = 21647 for k = 42.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd edition, Springer, 2004, ISBN 0-387-20860-7, Section A17, page 59.

Crossrefs

Programs

  • Mathematica
    Select[Table[47*n^2 - 1701*n + 10181, {n, 0, 100}], # > 0 && PrimeQ[#] &] (* T. D. Noe, Aug 02 2011 *)

Extensions

Edited by Klaus Brockhaus, Apr 22 2007 and by N. J. A. Sloane, May 05 2007 and May 06 2007

A174967 Smallest number of the form k^2 + k + 1 with n distinct prime divisors.

Original entry on oeis.org

1, 3, 21, 273, 10101, 316407, 6914271, 2424626841, 346084535811, 6177672967557, 1741866776384007, 92264158181274807, 103008522046409631057, 22810816825458528984663, 2220066397007943013450011, 545889722100356705628041121, 73293936170018923619553695493
Offset: 0

Views

Author

Michel Lagneau, Apr 02 2010

Keywords

Comments

If k == 2 (mod 3), all prime divisors of k^2 + k + 1 are congruent to 1 (mod 3), and if k == 1 (mod 3), the number 3 is divisor, and the other divisors are congruent to 1 (mod 3).
Proof: first case: k == 2 (mod 3): let q divide k^2 + k + 1. Then 4q divides 4*(k^2 + k + 1) = (2k+1)^2 + 3, and (-3/q)=1, where (a/b) is the Legendre symbol. By using the law of quadratic reciprocity, we obtain (-3/q) = (-1/q)(3/q) = (-1/q)(q/3)(-1)^((q-1)/2)(3-1)/2)) = ((-1)^(q-1)/2)((-1)^(q-1)/2)(q/3) = (q/3). Suppose q !== 1 (mod 3). Then k^2 + k + 1 !== 0 (mod 3) => q == 2 (mod 3), and then (q/3) = -1 => (-3/q) = -1, a contradiction. So q == 1 (mod 3).
Second case: k == 1 (mod 3) => 3 is divisor of k^2 + k + 1, and the other divisors q == 1 (mod 3).
a(11) <= 4943071434145592163, a(12) <= 2702887058650660754061, a(13) <= 896265629366361887178273, a(14) <= 72053193593257327979705541. - Michael S. Branicky, Mar 21 2021
Is a(n) squarefree? The first 16 terms are. - David A. Corneth, Mar 21 2021

Examples

			21 = 3*7;
273 = 3*7*13;
10101 = 3*7*13*37;
316407 = 3*7*13*19*61;
6914271 = 3*7*13*19*31*43;
2424626841 = 3*7*13*19*61*79*97;
346084535811 = 3*7*19*37*43*67*79*103;
6177672967557 = 3*7*13*19*31*43*61*97*151;
1741866776384007 = 3*7*13*19*31*37*43*67*151*673.
		

References

  • L. Poletti, Le serie dei numeri primi appartenente alle due forme quadratiche (A) n^2+n+1 e (B) n^2+n-1 per l'intervallo compreso entro 121 milioni, e cioè per tutti i valori di n fino a 11000, Atti della Reale Accademia Nazionale dei Lincei, Memorie della Classe di Scienze Fisiche, Matematiche e Naturali, s. 6, v. 3 (1929), pages 193-218.

Crossrefs

Programs

  • Maple
    A174967 := proc(n)
            for k from 1 do
                    a := k^2+k+1 ;
                    if A001221(a) = n then
                            return a;
                    end if;
            end do:
    end proc: # R. J. Mathar, Jul 06 2012
  • Python
    from sympy import primefactors
    def a(n):
      k = 1
      while len(primefactors(k**2 + k + 1)) != n: k += 1
      return k**2 + k + 1
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Mar 21 2021

Extensions

a(10) from Michael S. Branicky, Mar 21 2021
a(0), a(11)-a(16) from David A. Corneth, Mar 21 2021

A249622 a(n) = number of ways to express A117048(n) as the sum of two positive triangular numbers.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 4, 1, 3, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 3, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 1, 6, 2, 1, 1, 1, 1
Offset: 1

Views

Author

Zak Seidov, Nov 03 2014

Keywords

Examples

			a(6) = 2 because A117048(6) = 31 and 31 = 3 + 28 = 10 + 21 (first case of two-way expression).
a(22) = 3 because A117048(22) = 181 and 181 = A000217(i) + A000217(k), for {i,k} = {{4, 18}, {7, 17}, {9, 16}} (first case of three-way expression): 181 = 10 + 171 = 28 + 153 = 45 + 136.
		

Crossrefs

A265006 Twin prime pairs of the form (k^2 + k - 1, k^2 + k + 1).

Original entry on oeis.org

5, 7, 11, 13, 29, 31, 41, 43, 71, 73, 239, 241, 419, 421, 461, 463, 599, 601, 1481, 1483, 1721, 1723, 2549, 2551, 2969, 2971, 3539, 3541, 4421, 4423, 8009, 8011, 10301, 10303, 17291, 17293, 19181, 19183, 20021, 20023, 23561, 23563, 24179, 24181, 27059, 27061, 31151, 31153, 35531, 35533
Offset: 1

Views

Author

Bill McEachen, Nov 29 2015

Keywords

Comments

This is a subset of A002327 and A002383 taken together. Note that 3 is not a member, as the pairing (3, 5) is excluded as defined, as 3 and 5 associate to different centers.
The corresponding n are in A088485.
The average of each twin prime pair is an oblong number (A002378). - Michel Marcus, Feb 04 2017

Examples

			For k = 6, k^2 + k = 6^2 + 6 = 42, and (41,43) is a twin prime pair, so 41 and 43 are in the sequence.
		

Crossrefs

Programs

  • Magma
    &cat[[n^2+n-1, n^2+n+1]: n in [0..250]| IsPrime(n^2+n-1) and IsPrime(n^2+n+1)]; // Vincenzo Librandi, Feb 05 2017
  • Mathematica
    {#^2 + # - 1, #^2 + # + 1} & /@ Select[Range@ 200, PrimeQ[#^2 + # - 1] && PrimeQ[#^2 + # + 1] &] // Flatten (* Michael De Vlieger, Nov 30 2015 *)
    Flatten[Select[Table[n^2 + n + {-1, 1}, {n, 0, 200}], And@@PrimeQ[#] &]] (* Vincenzo Librandi, Feb 05 2017 *)
  • PARI
    genit()={my(maxx=1000);n=0;while(n
    				

Formula

a(2n-1) = A088486(n). a(2n)=2+a(2n-1).

A272571 Primes of the form n^4 + n + 1 with n positive.

Original entry on oeis.org

3, 19, 631, 1303, 6571, 14653, 20749, 38431, 331801, 457003, 1048609, 1679653, 3748141, 4879729, 12960061, 22667191, 26873929, 29986651, 35153119, 62742331, 65610091, 108243319, 131079709, 200534041, 252047503, 294500053, 454372003, 466949029, 639129121
Offset: 1

Views

Author

Vincenzo Librandi, May 03 2016

Keywords

Crossrefs

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is n^4+n+1];
    
  • Mathematica
    Select[Table[n^4 + n + 1, {n, 100}], PrimeQ]
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(p=n^4+n+1), print1(p, ", "))); } \\ Altug Alkan, May 04 2016

A272572 Primes of the form n^4 + n^3 + 1 with n positive.

Original entry on oeis.org

3, 109, 751, 15973, 41161, 54001, 345601, 1543501, 1726273, 2372761, 3833281, 8039359, 10010113, 18125251, 25769593, 63447211, 75609559, 93178009, 147741001, 164490259, 170377561, 270532609, 432967681, 457483993, 509625001, 551562859, 596037313, 1055592001
Offset: 1

Views

Author

Vincenzo Librandi, May 03 2016

Keywords

Crossrefs

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is n^4+n^3+1];
    
  • Mathematica
    Select[Table[n^4 + n^3 + 1, {n, 0, 170}], PrimeQ]
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(p=n^4+n^3+1), print1(p, ", "))); } \\ Altug Alkan, May 04 2016

A343774 Primes of the form (c^k+1)/(c+1) not having a representation in the form (b^q-1)/(b-1), where b, c > 1 and k, q > 2.

Original entry on oeis.org

3, 11, 61, 521, 547, 683, 2731, 9091, 13421, 19141, 43691, 61681, 152381, 174763, 185641, 224071, 398581, 909091, 1151041, 1623931, 1824841, 2031671, 2796203, 3341101, 4778021, 5200081, 7027567, 8987221, 10678711, 15790321, 22796593, 25058741, 31224301, 32222107
Offset: 1

Views

Author

Bernard Schott, Apr 29 2021

Keywords

Comments

The exponents k, q are necessarily primes.
Equivalently: primes of the form (c^k+1)/(c+1) that are not Brazilian: intersection of A059055 and A220627.
Except for 3 where k = 3, all the terms of this sequence are of the form (c^k+1)/(c+1) with k prime >= 5.
The only known prime of this form with k prime >= 5 that is not present is 43 = (2^7+1)/(2+1) because also 43 = (7^3+1)/(7+1) = (6^3-1)/(6-1) = 111_6, so 43 belongs to A002383.

Examples

			3 = (2^3+1)/(2+1) is not Brazilian, hence 3 is a term.
11 = (2^5+1)/(2+1) is not Brazilian, hence 11 is a term.
547 = (3^7+1)/(3+1) is not Brazilian, hence 547 is a term.
9091 = (10^5+1)/(10+1) is not Brazilian, hence 9091 is a term.
		

Crossrefs

Primes of the form (b^k-1)/(b-1) = A085104 (Brazilian primes).
Primes of the form (c^q+1)/(c+1) = A059055.
Primes of the form (b^k-1)/(b-1) and (c^q+1)/(c+1): A002383 \ {3} is a subsequence, but, maybe the intersection (conjecture).
Primes of the form (b^k-1)/(b-1) but not (c^q+1)/(c+1) = A225148.
Primes of the form (c^q+1)/(c+1) but not (b^k-1)/(b-1) = this sequence.
Primes neither of the form (c^q+1)/(c+1) nor (b^k-1)/(b-1) = A343775.

Programs

  • PARI
    isc(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); ); );
    isnotb(p) = for (b=2, p-1, my(d=digits(p, b), md=vecmin(d)); if ((#d > 2) && (md == 1) && (vecmax(d) == 1), return (0)); ); return (1);
    isok(p) = isprime(p) && isc(p) && isnotb(p); \\ Michel Marcus, May 01 2021

Extensions

More terms from Michel Marcus, Apr 30 2021
Previous Showing 31-40 of 54 results. Next