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

A108768 Primes that appear in the sequence p:=x^2+x+1, sieved with a quadratic sieve construction.

Original entry on oeis.org

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

Views

Author

Bernhard Helmes (pi(AT)devalco.de), Jun 24 2005

Keywords

Comments

This sequence appears in a website available on web.archive (see Quadratic Sieve Construction link). There is a single appearance of the first term 3, while all other primes appear twice. See A256148 for a version of the sequence consistent with the current version of the website where each prime appears only once. - Ray Chandler, Jul 05 2015

Crossrefs

Programs

  • MuPAD
    // from Quadratic Sieve Construction link.
    liste_max:=10000;
    for x from 1 to liste_max do
        liste_x[x]:=x^2+x+1;
        liste_prim[x]:=1;
    end_for;
    x:=1;
    while (x1) then
         print ("Prim ", p, "x = ", x, isprime (p)) ;
         // Aussiebung
         while (stelleRay Chandler, Jul 05 2015

A178545 Primes p such that q = p^2 + p + 1 is an emirp.

Original entry on oeis.org

3, 5, 41, 59, 839, 857, 1811, 1931, 3011, 3221, 3407, 3671, 8387, 8543, 8627, 9719, 9743, 9803, 10781, 11549, 12647, 13469, 13487, 13499, 13613, 13931, 14087, 17477, 17573, 17837, 18089, 18269, 19319, 19403, 19661, 19991, 27191, 27947, 31223, 33311, 34313
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 29 2010

Keywords

Comments

It is conjectured (but still an open problem) that there exist infinitely many primes of the form n^2 + n + 1 = ((2*n+1)^2 + 3)/4.
Landau's 4th problem from (1912, 5th Congress of Mathematicians in Cambridge) conjectures that there are infinitely many primes of the form n^2 + 1 (also Euler 1760; Mirsky 1949).
Hardy and Littlewood proposed a conjecture about the asymptotic number of primes of the form n^2 + 1.
An emirp ("prime" spelled backwards) is a prime whose reversal is a different prime, the reversal of q is denoted by R(q).
It is conjectured but also unproved that there are infinitely many emirps (see A048054).
For p > 3 necessarily p of the form 6*k + 5 as (6*k+1)^2 + (6*k+1) + 1 a multiple of 3.

Examples

			3^2 + 3 + 1 = 13 = prime(6), R(13) = prime(11), 3 is first term.
5^2 + 5 + 1 = 31 = prime(11), R(31) = prime(6), 5 is 2nd term.
q = 1811^2 + 1811 + 1 = 3281533 = prime(235691), R(q) = prime(240351), first case that p = 1811 = prime(280) = emirp(87) is itself an emirp.
		

References

  • M. Gardner: Die magischen Zahlen des Dr. Matrix, Krueger Verlag, Frankfurt am Main, 1987
  • R. Guy: Unsolved Problems in Number Theory,3rd edition, Springer, New York, 2004
  • G. H. Hardy, E. M. Wright: Einfuehrung in die Zahlentheorie, R. Oldenburg, Muenchen, 1958

Crossrefs

Programs

  • Maple
    filter:= proc(p) local q,qr;
       if not isprime(p) then return false fi;
       q:= p^2+p+1;
       if not isprime(q) then return false fi;
       qr:= revdigs(q);
       qr <> q and isprime(qr);
    end proc:
    select(filter, [3,seq(i,i=5..50000,6)]); # Robert Israel, Dec 04 2016
  • Mathematica
    EmirpQ[n_] := If[ PrimeQ@n, Block[{id = IntegerDigits@n}, rid = Reverse@ id; rid != id && PrimeQ@ FromDigits@ rid]]; Select[ Prime@ Range@ 3700, EmirpQ[ #^2 + # + 1] &] (* Robert G. Wilson v, Jul 26 2010 *)
    p2emrpQ[p_]:=With[{q=p^2+p+1},!PalindromeQ[q]&&AllTrue[{q,IntegerReverse[q]},PrimeQ]]; Select[Prime[Range[3700]],p2emrpQ] (* Harvey P. Dale, Mar 10 2025 *)

Extensions

More terms from Robert G. Wilson v, Jul 26 2010

A212738 a(n) = (7^p - 6^p - 1)/(1806p) where p is the n-th prime.

Original entry on oeis.org

1, 43, 81271, 3570505, 7025726485, 314435374639, 639872336584027, 60775577624897675065, 2794429652350970000851, 276858360603194024261113585, 600808083611945729624598396925, 28083738921571587634894783049047, 61728002094732427074308383210511683
Offset: 3

Views

Author

Michel Lagneau, May 27 2012

Keywords

Comments

7^p - 6^p - 1 is divisible by 1806p = 6*7*43*p where p prime > 3 (see the proof with the general case).
The sequence is generalizable with the form a(n) = ((k^p - (k-1)^p - 1)) /(k*(k-1)*p*q) where p = prime(n), k integer such that q = k*(k-1) + 1 prime (q = A002383(n) with k = A055494(n)).
k*(k-1)*p*q divides k^p - (k-1)^p - 1, proof :
(1) p divides k^p - (k-1)^p - 1 (Fermat’s theorem)
(2) k*(k-1) divides k^p - (k-1)^p - 1
(3) q = k*(k-1) + 1 divides k^p - (k-1)^p - 1. Suppose k^p - (k-1)^p - 1 ==r (mod q). Then ((k-1)^p)*k^p - ((k-1)^p)*(k-1)^p - (k-1)^p ==r*(k-1)^p (mod q). But the first term is congruent to -1 (mod q), the second term is congruent to k^p (mod q) and the last term is congruent to (k-1)^p (mod q). We obtain r (mod q) = r*(k-1)^p (mod q) => r = 0.

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 3 to 25 do:p:=ithprime(n):x:=(7^p - 6^p - 1)/(1806*p): printf(`%d, `, x):od:
  • PARI
    a(n)={my(p=prime(n)); (7^p - 6^p - 1)/(1806*p)} \\ Andrew Howroyd, Feb 25 2018

A256497 Triangle read by rows, sums of 2 distinct nonzero cubes: T(n,k) = (n+1)^3+k^3, 1 <= k <= n.

Original entry on oeis.org

9, 28, 35, 65, 72, 91, 126, 133, 152, 189, 217, 224, 243, 280, 341, 344, 351, 370, 407, 468, 559, 513, 520, 539, 576, 637, 728, 855, 730, 737, 756, 793, 854, 945, 1072, 1241, 1001, 1008, 1027, 1064, 1125, 1216, 1343, 1512, 1729
Offset: 1

Views

Author

Bob Selcoe, Mar 31 2015

Keywords

Comments

When n=k: T(n,k) = (2n+1)(n^2+n+1). Therefore, T(n,k)/(2n+1) = A002061(n+1).
A002383 is the sequence of all primes of the form T(n,k)/(2n+1), n=k.
When starting at T(n,k) n=k, diagonal sums are n^2*(2n+1)^2. For example, starting at T(4,4) = 189: 189+243+351+513 = 4^2*9^2 = 1296.
Coefficients in T(n,k) are multiples of n+k+1; therefore, coefficients in all diagonals starting at T(n,1) are multiples of n+2.
Let T"(n,k) = T(n,k)/(n+k+1). Then reading T"(n,k) by rows:
i. Row sums are A162147(n). For example, T"(3,k) = [65/5, 72/6, 91/7] = [13,12,13]. 13+12+13 = 38; A162147(3) = 38.
ii. Extend the triangle in A215631 to a symmetric array by reflection about the main diagonal, and let that array be T"215631(n,k). Then the diagonal starting with T"215631(n,1) is row n in T"(n,k). For example, the diagonal starting at T"215631(4,1) = [21,19,19,21]; T"(4,k) = [126/6, 133/7, 152/8, 189/9] = [21,19,19,21].
iii. Coefficients in T"(n,k) are a permutation of A024612.

Examples

			Triangle starts:
n\k   1    2    3    4    5    6    7     8    9   10 ...
1:    9
2:    28  35
3:    65  72   91
4:   126  133  152  189
5:   217  224  243  280  341
6:   344  351  370  407  468  559
7:   513  520  539  576  637  728  855
8:   730  737  756  793  854  945  1072 1241
9:   1001 1008 1027 1064 1125 1216 1343 1512 1729
10:  1332 1339 1358 1395 1456 1547 1674 1843 2060 2331
...
The successive terms are (2^3+1^3), (3^3+1^3), (3^3+2^3), (4^3+1^3), (4^3+2^3), (4^3+3^3), ...
		

Crossrefs

Formula

T(n,k) = (n+1)^3+k^3.
T(n,k) = (2k+1)(k^2+k+1) + Sum_{j=k+1..n} A003215(j), n>=k+1. For example, T(8,4) = 9*21 + 91 + 127 + 169 + 217 = 793.

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

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

A343775 Primes that are neither of the form (c^q+1)/(c+1) and nor of the form (b^k-1)/(b-1) for any b, c > 1 and k, q primes > 2.

Original entry on oeis.org

2, 5, 17, 19, 23, 29, 37, 41, 47, 53, 59, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 293, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367
Offset: 1

Views

Author

Bernard Schott, Apr 29 2021

Keywords

Comments

Equivalently, non-Brazilian primes that are not of the form (c^q+1)/(c+1) for some c > 1, q prime > 2.
Equals A220627 \ A059055.

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 also (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) = A343774.
Primes neither of the form (c^q+1)/(c+1) nor (b^k-1)/(b-1) = this sequence.

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

A353056 Composite numbers of the form k^2+k+1 all of whose prime factors are of that same form.

Original entry on oeis.org

21, 91, 273, 343, 507, 651, 1333, 4557, 6321, 6643, 27391, 36673, 50851, 65793, 83811, 105301, 139503, 190533, 194923, 217623, 234741, 391251, 545383, 1647373, 1961401, 2032051, 2376223, 4517751, 6118203, 6484663, 11590621, 13180531, 14535157, 20155611, 28371603, 35646871
Offset: 1

Views

Author

Michel Marcus, Apr 20 2022

Keywords

Examples

			21 = 4^2+4+1 and its factors are 3 and 7, terms of A002383. So 21 is a term.
		

Crossrefs

Subsequence of A174969.
Cf. A002383.

Programs

  • Maple
    q:= n-> not isprime(n) and andmap(p-> issqr(4*p-3), numtheory[factorset](n)):
    select(q, [k*(k+1)+1$k=4..6000])[];  # Alois P. Heinz, Apr 20 2022
  • Mathematica
    Select[Table[n^2 + n + 1, {n, 1, 6000}], CompositeQ[#] && AllTrue[FactorInteger[#][[;; , 1]], IntegerQ@Sqrt[4*#1 - 3] &] &] (* Amiram Eldar, Apr 20 2022 *)
  • PARI
    lista(nn) = {for (n=1, nn, my(x=n^2+n+1); if (! isprime(x), my(fa=factor(x), ok=1); for (k=1, #fa~, my(fk=fa[k,1]); if (! issquare(4*fk-3), ok = 0);); if (ok, print1(x, ", "));););}
    
  • Python
    from sympy import isprime, factorint
    from itertools import count, takewhile
    def agento(N): # generator of terms up to limit N
        form = set(takewhile(lambda x: x<=N, (k**2 + k + 1 for k in count(1))))
        for t in sorted(form):
            if not isprime(t) and all(p in form for p in factorint(t)):
                yield t
    print(list(agento(10**8))) # Michael S. Branicky, Apr 20 2022

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

A144852 a(n) = number of distinct prime divisors (taken together) of numbers of the form 4x^2+1 for x<=10^n.

Original entry on oeis.org

9, 87, 836, 8000, 78124, 766585, 7556731, 74771106, 741554656, 7366252759, 73261462211, 729280694469
Offset: 1

Views

Author

Artur Jasinski & Bernhard Helmes (bhelmes(AT)gmx.de), Sep 22 2008

Keywords

Comments

Primes of the form 4x^2+1 see A121326(n) = A002496(n+1).

Crossrefs

Programs

  • Mathematica
    d = 10; l = 0; p = 4; c = {}; a = {}; Do[k = p x^2 + 1; b = Divisors[k]; Do[If[PrimeQ[b[[n]]], AppendTo[a, b[[n]]]], {n, 1, Length[b]}]; If[x == d, a = Union[a]; l = Length[a]; d = 10 d; Print[l]; AppendTo[c, l]], {x, 1, 10000}]; c (*Artur Jasinski*)

Extensions

Fixed broken link, corrected and extended to agree with website. - Ray Chandler, Jun 30 2015
Previous Showing 41-50 of 54 results. Next