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.

Showing 1-10 of 10 results.

A085104 Primes of the form 1 + n + n^2 + n^3 + ... + n^k, n > 1, k > 1.

Original entry on oeis.org

7, 13, 31, 43, 73, 127, 157, 211, 241, 307, 421, 463, 601, 757, 1093, 1123, 1483, 1723, 2551, 2801, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 9901, 10303, 11131, 12211, 12433, 13807, 14281, 17293, 19183, 19531, 20023
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 03 2003

Keywords

Comments

Primes that are base-b repunits with three or more digits for at least one b >= 2: Primes in A053696. Subsequence of A000668 U A076481 U A086122 U A165210 U A102170 U A004022 U ... (for each possible b). - Rick L. Shepherd, Sep 07 2009
From Bernard Schott, Dec 18 2012: (Start)
Also known as Brazilian primes. The primes that are not Brazilian primes are in A220627.
The number of terms k+1 is always an odd prime, but this is not enough to guarantee a prime, for example 111 = 1 + 10 + 100 = 3*37.
The inverses of the Brazilian primes form a convergent series; the sum is slightly larger than 0.33 (see Theorem 4 of Quadrature article in the Links). (End)
It is not known whether there are infinitely many Brazilian primes. See A002383. - Bernard Schott, Jan 11 2013
Primes of the form (n^p - 1)/(n - 1), where p is odd prime and n > 1. - Thomas Ordowski, Apr 25 2013
Number of terms less than 10^n: 1, 5, 14, 34, 83, 205, 542, 1445, 3880, 10831, 30699, 88285, ..., . - Robert G. Wilson v, Mar 31 2014
From Bernard Schott, Apr 08 2017: (Start)
Brazilian primes fall into two classes:
1) when n is prime, we get sequence A023195 except 3 which is not Brazilian,
2) when n is composite, we get sequence A285017. (End)
The conjecture proposed in Quadrature "No Sophie Germain prime is Brazilian (prime)" (see link Bernard Schott, Quadrature, Conjecture 1, page 36) is false. Thanks to Giovanni Resta, who found that a(856) = 28792661 = 1 + 73 + 73^2 + 73^3 + 73^4 = (11111)73 is the 141385th Sophie Germain prime. - _Bernard Schott, Mar 08 2019

Examples

			13 is a term since it is prime and 13 = 1 + 3 + 3^2 = 111_3.
31 is a term since it is prime and 31 = 1 + 2 + 2^2 + 2^3 + 2^4 = 11111_2.
From _Hartmut F. W. Hoft_, May 08 2017: (Start)
The sequence represented as a sparse matrix with the k-th column indexed by A006093(k+1), primes minus 1, and row n by A000027(n+1). Traversing the matrix by counterdiagonals produces a non-monotone ordering.
    2    4      6        10             12          16
2  7    31     127      -              8191        131071
3  13   -      1093     -              797161      -
4  -    -      -        -              -           -
5  31   -      19531    12207031       305175781   -
6  43   -      55987    -              -           -
7  -    2801   -        -              16148168401 -
8  73   -      -        -              -           -
9  -    -      -        -              -           -
10  -    -      -        -              -           -
11  -    -      -        -              -           50544702849929377
12  157  22621  -        -              -           -
13  -    30941  5229043  -              -           -
14  211  -      8108731  -              -           -
15  241  -      -        -              -           -
16 -    -      -        -              -           -
17  307  88741  25646167 2141993519227  -           -
18  -    -      -        -              -           -
19  -    -      -        -              -           -
20  421  -      -        10778947368421 -           689852631578947368421
21  463  -      -        17513875027111 -           1502097124754084594737
22  -    245411 -        -              -           -
23  -    292561 -        -              -           -
24  601  346201 -        -              -           -
Except for the initial values in the respective sequences the rows and columns as labeled in the matrix are:
column  2:  A002383            row 2:  A000668
column  4:  A088548            row 3:  A076481
column  6:  A088550            row 4:  -
column 10:  A162861            row 5:  A086122.
(End)
		

References

  • Daniel Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, Paris, 2012, page 174.

Crossrefs

Cf. A189891 (complement), A125134 (Brazilian numbers), A220627 (Primes that are non-Brazilian).
Cf. A003424 (n restricted to prime powers).
Equals A023195 \3 Union A285017 with empty intersection.
Primes of the form (b^k-1)/(b-1) for b=2: A000668, b=3: A076481, b=5: A086122, b=6: A165210, b=7: A102170, b=10: A004022.
Primes of the form (b^k-1)/(b-1) for k=3: A002383, k=5: A088548, k=7: A088550, k=11: A162861.

Programs

  • Haskell
    a085104 n = a085104_list !! (n-1)
    a085104_list = filter ((> 1) . a088323) a000040_list
    -- Reinhard Zumkeller, Jan 22 2014
  • Mathematica
    max = 140; 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 *)
    f[n_] := Block[{i = 1, d, p = Prime@ n}, d = Rest@ Divisors[p - 1]; While[ id = IntegerDigits[p, d[[i]]]; id != Reverse@ id || Union@ id != {1}, i++]; d[[i]]]; Select[ Range[2, 60], 1 + f@# != Prime@# &] (* Robert G. Wilson v, Mar 31 2014 *)
  • PARI
    list(lim)=my(v=List(),t,k);for(n=2,sqrt(lim), t=1+n;k=1; while((t+=n^k++)<=lim,if(isprime(t), listput(v,t))));vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Jan 08 2013
    
  • PARI
    A085104_vec(N,L=List())=forprime(K=3,logint(N+1,2),for(n=2,sqrtnint(N-1,K-1),isprime((n^K-1)\(n-1))&&listput(L,(n^K-1)\(n-1))));Set(L) \\ M. F. Hasler, Jun 26 2018
    

Formula

A010051(a(n)) * A088323(a(n)) > 1. - Reinhard Zumkeller, Jan 22 2014

Extensions

More terms from David Wasserman, Jan 26 2005

A002383 Primes of form k^2 + k + 1.

Original entry on oeis.org

3, 7, 13, 31, 43, 73, 157, 211, 241, 307, 421, 463, 601, 757, 1123, 1483, 1723, 2551, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 9901, 10303, 11131, 12211, 12433, 13807, 14281, 17293, 19183, 20023, 20593, 21757, 22651, 23563
Offset: 1

Views

Author

Keywords

Comments

Also primes p such that 4p-3 is square. - Giovanni Teofilatto, Sep 07 2005
Also these primes are sums of 1 and some consecutive even numbers starting at 2; e.g., 31 = 1+2+4+6+8+10. - Labos Elemer, Apr 15 2003
Also primes of form n^2 - n + 1 (Prime central polygonal numbers, A002061). - Zak Seidov, Jan 26 2006
Also primes which are of the form TriangularNumber(n) + TriangularNumber(n+2): 7 = 1+6, 13 = 3+10, 31 = 10+21, 43 = 15+28, 73 = 28+45, ... - Vladimir Joseph Stephan Orlovsky, Apr 03 2009
It is not known whether there are infinitely many primes of the form n^2+n+1. See Rose reference. - Daniel Tisdale, Jun 27 2009
These numbers when >= 7 are prime repunits 111_n in a base n >= 2, so except for 3, they are all Brazilian primes belonging to A085104. (See Links "Les nombres brésiliens", Sections V.4 - V.5.) A002383 is generated by A002384 which lists the bases n of 111_n. A002383 = A053183 Union A185632. - Bernard Schott, Dec 22 2012
Conjecture: the set of these numbers, except 3, is the intersection of sets A085104 and A059055. See A225148. - Thomas Ordowski, May 02 2013
For a(n)>13, the fractional part of square root of a(n) starts with digit 5 (see A034101). - Charles Kusniec, Sep 06 2022

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 46.
  • 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.
  • H. E. Rose, A Course in Number Theory, Clarendon Press, 1988, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A237037, A237038, A237039, A237040 (from semiprimes of form n^3 + 1).
See also A034101.

Programs

  • Magma
    [ a: n in [1..100] | IsPrime(a) where a is n^2+n+1 ]; // Wesley Ivan Hurt, Jun 16 2014
    
  • Maple
    select(isprime, [j^2+j+1$j=1..200])[];  # Alois P. Heinz, Apr 20 2022
  • Mathematica
    Select[Table[n^2+n+1, {n,250}], PrimeQ] (* Harvey P. Dale, Mar 23 2012 *)
  • PARI
    list(lim)=select(n->isprime(n),vector((sqrt(4*lim-3)-1)\2,k,k^2+k+1)) \\ Charles R Greathouse IV, Jul 25 2011
    
  • Python
    from sympy import isprime
    print(list(filter(isprime, (n**2 + n + 1 for n in range(150))))) # Michael S. Branicky, Apr 20 2022

Formula

a(n) = A002384(n)^2 + A002384(n) + 1 = (A088503(n-1)^2 + 3)/4 = (A110284(n) + 3)/4. - Ray Chandler, Sep 07 2005

Extensions

Extended by Ray Chandler, Sep 07 2005

A003424 Primes of form (p^x - 1)/(p^y - 1), p prime.

Original entry on oeis.org

3, 5, 7, 13, 17, 31, 73, 127, 257, 307, 757, 1093, 1723, 2801, 3541, 5113, 8011, 8191, 10303, 17293, 19531, 28057, 30103, 30941, 65537, 86143, 88741, 131071, 147073
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A225148 Primes of the form (k^p-1)/(k-1) not having representation in the form (m^q+1)/(m+1), where k,m > 1 and p,q > 2.

Original entry on oeis.org

127, 1093, 2801, 19531, 22621, 30941, 55987, 88741, 131071, 245411, 292561, 346201, 524287, 637421, 732541, 797161, 837931, 2625641, 3500201, 3835261, 5229043, 6377551, 8108731, 12207031, 15018571, 16007041, 21700501, 25646167, 28792661, 30397351, 35615581
Offset: 1

Views

Author

Thomas Ordowski, Apr 30 2013

Keywords

Comments

The exponent p must be a prime p > 3. If p=3 then (k^p-1)/(k-1) = (m^q+1)/(m+1) for m=k+1 and q=3.
Are almost all primes of the form (k^p-1)/(k-1), where k > 1 and p > 3, in the sequence? Except 31 and 8191. See:
31 = (2^5-1)/(2-1) = (5^3-1)/(5-1) = (6^3+1)/(6+1),
8191 = (2^13-1)/(2-1) = (90^3-1)/(90-1) = (91^3+1)/(91+1).

Crossrefs

Formula

Numbers in A085104 but not in A059055.

Extensions

Extended by T. D. Noe, Apr 30 2013

A309532 Numbers k such that (121^k + 1)/122 is prime.

Original entry on oeis.org

5, 13, 97, 1499, 11321, 320483
Offset: 1

Views

Author

Paul Bourdelais, Aug 06 2019

Keywords

Comments

The corresponding primes are terms of A059055. - Bernard Schott, Aug 09 2019

Crossrefs

Cf. A059055.

Programs

  • Mathematica
    Do[p=Prime[n]; If[PrimeQ[(121^p + 1)/122], Print[p]], {n, 1, 1000000}]
  • PARI
    is(n)=ispseudoprime((121^n+1)/122)

A309533 Numbers k such that (144^k + 1)/145 is prime.

Original entry on oeis.org

23, 41, 317, 3371, 45259, 119671
Offset: 1

Views

Author

Paul Bourdelais, Aug 06 2019

Keywords

Comments

The corresponding primes are terms of A059055. - Bernard Schott, Aug 09 2019

Crossrefs

Programs

  • Mathematica
    Do[p=Prime[n]; If[PrimeQ[(144^p + 1)/145], Print[p]], {n, 1, 1000000}]
  • PARI
    is(n)=ispseudoprime((144^n+1)/145)

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

Original entry on oeis.org

1, 3, 7, 11, 13, 21, 31, 43, 57, 61, 73, 91, 111, 133, 157, 171, 183, 205, 211, 241, 273, 307, 343, 381, 421, 463, 507, 521, 547, 553, 601, 651, 683, 703, 757, 813, 871, 931, 993, 1057, 1111, 1123, 1191, 1261, 1333, 1407, 1483, 1561, 1641, 1723, 1807, 1893
Offset: 1

Views

Author

Henry Bottomley, Dec 21 2000

Keywords

Comments

It seems that all values are odd. For (b^k+1)/(b+1) to be an integer, it seems k must be odd. 2=(0^0+1)/(0+1) has been excluded since neither b nor k would be positive.
When k is a composite, a(n) is a composite.
These numbers are in the form of 111...1 (k of 1s) base b. - Lei Zhou, Feb 08 2012

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 = 44; maxdata = (1 + max^3)/(1 + max); a = {}; Do[i = 1; While[i = i + 2; cc = (1 + m^i)/(1 + m); cc <= maxdata, a = Append[a, cc]], {m, 2, max}]; Union[a] (* Lei Zhou, Feb 08 2012 *)

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

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

A206945 Prime numbers Phi(k,m) with integer k > 2, |m| > 1, and k != 2^j (j > 1).

Original entry on oeis.org

3, 7, 11, 13, 31, 43, 61, 73, 127, 151, 157, 211, 241, 307, 331, 421, 463, 521, 547, 601, 683, 757, 1093, 1123, 1483, 1723, 2551, 2731, 2801, 2971, 3307, 3541, 3907, 4423, 4561, 4831, 5113, 5419, 5701, 6007, 6163, 6481, 8011, 8191, 9091, 9901, 10303, 11131
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Comments

Phi(k,m) denotes the cyclotomic polynomial numbers Cyclotomic(k,m).
These are the prime terms of A206944.
A059055 is a subsequence of this sequence.
The Mathematica program can generate this sequence to arbitrary boundary maxdata without a user's choice of parameters. The parameter determination part of this program is explained at A206864.

Examples

			Just taking prime terms from A206944:
A206944(1)=3 is prime, so a(1)=3 ...
		

Crossrefs

Programs

  • Mathematica
    phiinv[n_, pl_] := Module[{i, p, e, pe, val}, If[pl == {}, Return[If[n == 1, {1}, {}]]]; val = {}; p = Last[pl]; For[e = 0; pe = 1, e == 0 || Mod[n, (p - 1) pe/p] == 0, e++; pe *= p, val = Join[val, pe*phiinv[If[e == 0, n, n*p/pe/(p - 1)], Drop[pl, -1]]]]; Sort[val]]; phiinv[n_] := phiinv[n, Select[1 + Divisors[n], PrimeQ]]; maxdata = 12000; max = Ceiling[(1 + Sqrt[1 + 4*(maxdata - 1)])/4]*2; eb = 2*Floor[(Log[2, maxdata])/2 + 0.5]; While[eg = phiinv[eb]; lu = Length[eg]; lu == 0, eb = eb + 2]; t = Select[Range[eg[[Length[eg]]]], ((EulerPhi[#] <= eb) && ((! IntegerQ[Log[2, #]]) || (# <= 2))) &]; t = SortBy[t, Cyclotomic[#, 2] &]; a = {}; Do[i = 2; While[i++; cc = Cyclotomic[t[[i]], m]; cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Union[a]
Showing 1-10 of 10 results.