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 61-70 of 71 results. Next

A089358 Numbers k such that k^2 - 3*k + 3 is prime.

Original entry on oeis.org

3, 4, 5, 7, 8, 10, 14, 16, 17, 19, 22, 23, 26, 29, 35, 40, 43, 52, 56, 59, 61, 64, 68, 71, 73, 77, 79, 80, 82, 91, 92, 101, 103, 107, 112, 113, 119, 121, 133, 140, 143, 145, 149, 152, 155, 157, 163, 164, 166, 169, 170, 175, 178, 190, 191, 194, 196, 205, 208
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 27 2003

Keywords

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta,UTET, CittaStudiEdizioni, Milano 1997.

Programs

Formula

a(n) = A002384(n)+2.

Extensions

Corrected by Harvey P. Dale, Mar 23 2012

A117307 Numbers for which (phi(n))^2+phi(n)+1 is a prime number.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 13, 14, 15, 16, 18, 20, 21, 24, 25, 26, 28, 30, 33, 35, 36, 39, 42, 44, 45, 50, 52, 56, 66, 67, 70, 72, 78, 79, 81, 84, 90, 121, 123, 134, 139, 151, 158, 162, 163, 164, 165, 176, 193, 200, 203, 215, 220, 221, 242, 243, 245, 246, 249
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 24 2006

Keywords

Examples

			14 is in the sequence because (phi(14))^2+phi(14)+1 = 6^2+6+1 = 43, which is a prime number.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := x^2 + x + 1; Select[Range[250], PrimeQ[f[EulerPhi[#]]] &] (* Amiram Eldar, Feb 08 2021 *)
  • PARI
    lista(nn) = {for (n = 1, nn, if (isprime((eulerphi(n))^2 + eulerphi(n) + 1), print1(n, ", ")););} \\ Michel Marcus, Jun 01 2013

Extensions

Corrected by Michel Marcus, Jun 01 2013

A245476 Least number k > 1 such that k^n + k + 1 is prime, or 0 if no such number exists.

Original entry on oeis.org

2, 2, 2, 2, 0, 2, 2, 0, 3, 3, 0, 2, 5, 0, 2, 2, 0, 2, 8, 0, 6, 3, 0, 6, 15, 0, 6, 2, 0, 2, 23, 0, 23, 56, 0, 15, 114, 0, 14, 11, 0, 3, 14, 0, 29, 110, 0, 21, 9, 0, 53, 59, 0, 6, 2, 0, 3, 29, 0, 71, 21, 0, 146, 17, 0, 35, 2, 0, 9, 6, 0, 77, 41, 0, 27, 176, 0, 153, 21, 0, 39, 32, 0, 2, 314, 0, 3, 5, 0, 66, 44, 0, 234
Offset: 1

Views

Author

Derek Orr, Jul 23 2014

Keywords

Comments

Except for a(2), a(n) = 0 if n == 2 mod 3 (A016789).
It appears that this is an "if and only if".
a(n) = 2 if and only if n is in A057732.
Many terms in the linked table correspond to probable primes. If n == 2 mod 3 then k^2+k+1 divides k^n+k+1. This is why a(n) = 0 if n > 2 and n == 2 mod 3. - Jens Kruse Andersen, Jul 28 2014

Examples

			2^9 + 2 + 1 = 515 is not prime. 3^9 + 3 + 1 = 19687 is prime. Thus a(9) = 3.
		

Crossrefs

Cf. Numbers n such that n^s + n + 1 is prime: A005097 (s = 1), A002384 (s = 2), A049407 (s = 3), A049408 (s = 4), A075723 (s = 6), A075722 (s = 7), A075720 (s = 9), A075719 (s = 10), A075718 (s = 12), A075717 (s = 13), A075716 (s = 15), A075715 (s = 16), A075714 (s = 18), A075713 (s = 19).

Programs

  • Maple
    f:= proc(n) local k;
       if n mod 3 = 2 and n > 2 then return 0 fi;
       for k from 2 to 10^6 do
          if isprime(k^n+k+1) then return k fi
       od:
      error("no solution found for n = %1",n);
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Jul 27 2014
  • PARI
    a(n) = if(n>2&&n==Mod(2, 3), return(0)); k=2; while(!ispseudoprime(k^n+k+1), k++); k
    vector(150, n, a(n)) \\ Derek Orr with corrections and improvements from Colin Barker, Jul 23 2014

A259631 Numbers k such that the Phi_3(10^10000+k) is prime, where Phi is a cyclic polynomial.

Original entry on oeis.org

8929, 45937, 49256, 50060, 76204, 76855, 125708, 127919, 137050, 137335, 137944, 147466, 163822, 193939, 267131, 295882, 299977, 312610, 322255, 322499, 322988, 370763, 403085, 436060, 458119, 571253, 574597, 601558, 610697, 626978, 627820, 630109, 647039
Offset: 1

Views

Author

Robert Price, Aug 05 2015

Keywords

Comments

a(53) > 10^6.

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 10^6], PrimeQ[(10^10000 + #)^2 + (10^10000 + #) + 1] &]
  • PARI
    is(k)=ispseudoprime(subst('x^2+'x+1,'x,10^10000+k)) \\ Charles R Greathouse IV, Aug 05 2015
    
  • PFGW
    ABC2 (10^10000+$a)^2 + (10^10000+$a) + 1
    a: from 1 to 10000
    Charles R Greathouse IV, Aug 05 2015

A273459 Even numbers such that the sum of the odd divisors is a prime p and the sum of the even divisors is 2p.

Original entry on oeis.org

18, 50, 578, 1458, 3362, 4802, 6962, 10082, 15842, 20402, 31250, 34322, 55778, 57122, 59858, 167042, 171698, 293378, 559682, 916658, 982802, 1062882, 1104098, 1158242, 1195058, 1367858, 1407842, 1414562, 1468898, 1659842, 2380562, 2406818, 2705138, 2789522
Offset: 1

Views

Author

Michel Lagneau, May 30 2016

Keywords

Comments

a(n) is of the form 2q^2 where q is an odd numbers for which sigma(q^2) is prime (A193070).
The corresponding primes p are 13, 31, 307, 1093, 1723, 2801, 3541, 5113, 8011, 10303, 19531, 17293, 28057, 30941, 30103, 88741, 86143, 147073, 292561, 459007, 492103, 797161, 552793, 579883, 598303, 684757, 704761, 732541, 735307, 830833, 1191373, 1204507, ...
We observe an interesting property: each prime p is element of A053183 (primes of the form m^2 + m + 1 when m is prime) or element of A247837 (primes of the form sigma(2m-1) for a number m) or element of both A053183 and A247837.
Examples:
The numbers 13, 31, 307, 1723, 3541, 5113,... are in A053183;
The numbers 13, 31, 307, 1093, 1723, 2801, 3541,...are in A247837;
The numbers 13, 31, 307, 1723, 3541,... are in A053183 and A247837.

Examples

			18 is in the sequence because the divisors of 18 are {1, 2, 3, 6, 9, 18}. The sum of the odd divisors is 1 + 3 + 9 = 13 and the sum of the even divisors is 2 + 6 + 18 = 26 = 2*13.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 2 by 2  to 500000 do:
       y:=divisors(n):n1:=nops(y):s0:=0:s1:=0:
         for k from 1 to n1 do:
           if irem(y[k], 2)=0
            then
            s0:=s0+ y[k]:
            else
            s1:=s1+ y[k]:
          fi:
         od:
         ii:=0:
            if isprime(s1) and s0=2*s1
            then
            printf(`%d, `, n):
             else fi:
         od:
  • Mathematica
    Select[Range[2, 3000000, 2], And[PrimeQ[Total@ Select[#, EvenQ]/2], PrimeQ@ Total@ Select[#, OddQ]] &@ Divisors@ # &] (* Michael De Vlieger, May 30 2016 *)
    sodpQ[n_]:=Module[{d=Divisors[n],s},s=Total[Select[d,OddQ]];PrimeQ[ s] && Total[ Select[d,EvenQ]]==2s]; Select[Range[2,279*10^4,2],sodpQ] (* Harvey P. Dale, Dec 01 2020 *)
    2 * Select[Range[1, 1200, 2]^2, PrimeQ@DivisorSigma[1, #] &] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    is(n)=my(t); n%4==2 && issquare(n/2,&t) && isprime(n/2+t+1) \\ Charles R Greathouse IV, Jun 08 2016

Formula

a(n) >> n^2. - Charles R Greathouse IV, Jun 08 2016
a(n) = 2 * A278911(n) = 2 * A193070(n)^2. - Amiram Eldar, Jul 19 2022

A289356 Least number k such that n^2 + n + k is prime.

Original entry on oeis.org

2, 1, 1, 1, 3, 1, 1, 3, 1, 7, 3, 5, 1, 9, 1, 1, 5, 1, 5, 3, 1, 1, 3, 5, 1, 3, 7, 1, 9, 7, 7, 5, 5, 1, 3, 17, 29, 3, 1, 7, 17, 1, 5, 9, 7, 11, 17, 11, 5, 9, 1, 5, 11, 17, 1, 3, 11, 1, 11, 1, 11, 11, 1, 17, 17, 7, 1, 5, 11, 1, 3, 1, 5, 5, 7, 1, 5, 1, 1, 3, 1, 11, 17, 5, 11, 11
Offset: 0

Views

Author

Gionata Neri, Jul 03 2017

Keywords

Comments

a(A002384(n)) = 1.
a(A027752(n)) = 3, for n > 2.

Crossrefs

Cf. A002378, A002384, A013632, A027752, A182047 (resulting primes).

Programs

  • Maple
    seq(nextprime(n^2+n)-(n^2+n), n=0..100); # Robert Israel, Jul 05 2017
  • Mathematica
    Table[k = 1; While[! PrimeQ[n^2 + n + k], k++]; k, {n, 0, 85}] (* Michael De Vlieger, Jul 04 2017 *)
  • PARI
    for(n=0,85,k={my(k=1);while(!isprime(n^2+n+k),k++);k;};print1(k", "))

Formula

a(n) = A013632(A002378(n)). - Robert Israel, Jul 05 2017

A291689 Numbers n such that n^2 +- n +- 1 are all composite.

Original entry on oeis.org

23, 37, 43, 52, 73, 74, 82, 88, 92, 98, 107, 108, 109, 113, 122, 123, 124, 128, 129, 133, 136, 137, 152, 157, 166, 178, 179, 183, 198, 201, 202, 205, 208, 211, 212, 213, 214, 217, 222, 223, 224, 227, 228, 229, 235, 238, 239, 243, 250, 251, 252, 253, 254, 255, 256, 257, 261, 262, 270, 271, 274
Offset: 1

Views

Author

Robert Israel, Aug 29 2017

Keywords

Comments

Numbers n such that A291654(n)=1.
Complement of union of A002328, A002384, A045546 and A055494.

Examples

			a(1)=23 is in the sequence because 23^2 - 23 - 1 = 505, 23^2 - 23 + 1 = 507, 23^2 + 23 - 1 = 551, 23^2 + 23 + 1 = 553 are all composite.
		

Crossrefs

Programs

  • Maple
    select(t -> not ormap(isprime, {t^2+t+1,t^2+t-1,t^2-t+1,t^2-t-1}), [$1..1000]);
  • Mathematica
    Select[Range@ 300, Function[t, AllTrue[t^2 + Map[Total[{t, 1} #] &, Tuples[{1, -1}, 2]], ! PrimeQ@ # &]]] (* Michael De Vlieger, Aug 29 2017 *)
  • PARI
    is(n)=my(n2=n^2); !isprime(n2+n+1) && !isprime(n2+n-1) && !isprime(n2-n+1) && !isprime(n2-n-1) \\ Charles R Greathouse IV, Aug 30 2017

Formula

a(n) ~ n. - Charles R Greathouse IV, Aug 30 2017

A319228 Number of primes of the form b^2 + b + 1 for b <= 10^n.

Original entry on oeis.org

6, 32, 189, 1410, 10751, 88118, 745582, 6456835, 56988601, 510007598, 4615215645
Offset: 1

Views

Author

Seiichi Manyama, Sep 14 2018

Keywords

Examples

			a(1) = 6 because there are 6 primes of the form b^2 + b + 1 for b <= 10: 3, 7, 13, 31, 43 and 73.
		

Crossrefs

Programs

  • PARI
    {a(n) = sum(k=0, 10^n, isprime(k^2+k+1))}
    
  • Python
    from sympy import isprime
    def A319228(n):
        c, b, b2, n10 = 0, 1, 3, 10**n
        while b <= n10:
            if isprime(b2):
                c += 1
            b += 1
            b2 += 2*b
        return c # Chai Wah Wu, Sep 17 2018

Extensions

a(10) from Chai Wah Wu, Sep 17 2018
a(11) from Chai Wah Wu, Sep 18 2018

A108154 a(n) = n^2 - n + 1 if prime else 0.

Original entry on oeis.org

0, 3, 7, 13, 0, 31, 43, 0, 73, 0, 0, 0, 157, 0, 211, 241, 0, 307, 0, 0, 421, 463, 0, 0, 601, 0, 0, 757, 0, 0, 0, 0, 0, 1123, 0, 0, 0, 0, 1483, 0, 0, 1723, 0, 0, 0, 0, 0, 0, 0, 0, 2551, 0, 0, 0, 2971, 0, 0, 3307, 0, 3541, 0, 0, 3907, 0, 0, 0, 4423, 0, 0, 4831, 0, 5113, 0, 0, 0, 5701, 0
Offset: 1

Views

Author

Pierre CAMI, Jun 06 2005

Keywords

Examples

			1^2 - 1 + 1 = 1, which is not prime, so a(1)=0;
2^2 - 2 + 1 = 3, which is prime, so a(2)=3;
3^3 - 3 + 1 = 7, which is prime, so a(3)=7.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = n^2 - n + 1}, If[ PrimeQ[p], p, 0]]; Table[ f[n], {n, 77}] (* Robert G. Wilson v, Jun 07 2005 *)
  • PARI
    vector(80, n, if (isprime(p=n^2-n+1), p, 0)) \\ Michel Marcus, Jul 31 2015

Extensions

More terms from Robert G. Wilson v, Jun 07 2005

A308316 Numbers m such that q = 2^m - 1 and r = m^2 + m + 1 are both primes.

Original entry on oeis.org

2, 3, 5, 17, 89, 9689, 11213, 2976221
Offset: 1

Views

Author

Jaroslav Krizek, May 19 2019

Keywords

Comments

All terms are primes.
Mersenne exponents p from A000043 such that p^2 + p + 1 is a prime.
Intersection of A000043 and A002384.
Corresponding values of primes q: 3, 7, 31, 131071, 618970019642690137449562111, ...
Corresponding values of primes r: 7, 13, 31, 307, 8011, 93886411, 125742583, 8857894417063, ...

Crossrefs

Programs

  • Magma
    [m: m in [1..1000] | IsPrime(2^m - 1)  and IsPrime(m^2 + m + 1)]
    
  • PARI
    isok(n) = isprime(2^n-1) && isprime(n^2+n+1); \\ Michel Marcus, May 21 2019
Previous Showing 61-70 of 71 results. Next