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

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

A100330 Positive integers k such that k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 is prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 13, 14, 17, 26, 31, 38, 40, 46, 56, 60, 61, 66, 68, 72, 73, 80, 87, 89, 93, 95, 115, 122, 126, 128, 146, 149, 156, 158, 160, 163, 180, 186, 192, 203, 206, 208, 220, 221, 235, 237, 238, 251, 264, 266, 280, 282, 290, 294, 300, 303, 320, 341, 349, 350
Offset: 1

Views

Author

Ray G. Opao, Nov 16 2004

Keywords

Comments

The corresponding primes are A088550. - Bernard Schott, Dec 20 2012
k = 5978493 * 2^150006 - 1 is an example of a very large term of this sequence. The generated prime is proved by the N-1 method (because k is prime and k*(k+1) is fully factored and this provides for an exactly 33.33...% factorization for Phi_7(k) - 1). - Serge Batalov, Mar 13 2015

Examples

			2 is in the sequence because 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2 + 1 = 127, which is prime.
		

Crossrefs

Cf. A100331, A250174 (Phi_14(n) = n^6 - n^5 + n^4 - n^3 + n^2 - n + 1 primes; these two sequences can also be considered an extension of each other into negative n values), A250177 (Phi_21(n) primes).

Programs

  • Magma
    [n: n in [1..500]| IsPrime(n^6 + n^5 + n^4 + n^3 + n^2 + n + 1)]; // Vincenzo Librandi, Feb 08 2014
    
  • Maple
    A100330 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isprime(numtheory[cyclotomic](7,a)) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A100330(n),n=1..30) ; # R. J. Mathar, Feb 07 2014
  • Mathematica
    Select[Range[350], PrimeQ[Sum[ #^i, {i, 0, 6}]] &] (* Ray Chandler, Nov 17 2004 *)
    Do[If[PrimeQ[n^6 + n^5 + n^4 + n^3 + n^2 + n + 1], Print[n]], {n, 1, 500}] (* Vincenzo Librandi, Feb 08 2014 *)
  • PARI
    is(n)=isprime(polcyclo(7,n)) \\ Charles R Greathouse IV, Apr 28 2015

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

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

A194257 Primes of the form p^6 + p^5 + p^4 + p^3 + p^2 + p + 1 when p is prime.

Original entry on oeis.org

127, 1093, 19531, 5229043, 25646167, 917087137, 52379047267, 153436090543, 502628805631, 11016462577051, 18871143464293, 251059142817757, 1812169199976451, 1940350890330343
Offset: 1

Views

Author

Bernard Schott, Dec 21 2012

Keywords

Comments

These primes are generated by exactly A163268.
This sequence is included in A088550.
These numbers are repunit primes 1111111_n, so they are Brazilian primes and are terms of A085104.
Subsequence of A088550. - Hartmut F. W. Hoft, May 05 2017

Crossrefs

Programs

  • Maple
    select(isprime, map(p -> add(p^i,i=0..6), select(isprime, [2,seq(i,i=3..1000,2)]))); # Robert Israel, May 05 2017
  • Mathematica
    a194257[n_] := Select[Map[(Prime[#]^7-1)/(Prime[#]-1)&, Range[n]], PrimeQ]
    a194257[70] (* data *) (* Hartmut F. W. Hoft, May 05 2017 *)
    Select[Table[Total[p^Range[0,6]],{p,Prime[Range[100]]}],PrimeQ] (* Harvey P. Dale, Mar 09 2024 *)

Formula

a(n) = A193574(A163268(n)^6). - Hartmut F. W. Hoft, May 08 2017

A163268 Primes p such that 1 + p + p^2 + p^3 + p^4 + p^5 + p^6 is prime.

Original entry on oeis.org

2, 3, 5, 13, 17, 31, 61, 73, 89, 149, 163, 251, 349, 353, 461, 523, 599, 647, 863, 941, 947, 1087, 1117, 1229, 1277, 1291, 1297, 1409, 1439, 1489, 1567, 1579, 1609, 1627, 1753, 1783, 1831, 2039, 2131, 2293, 2531, 2609, 2753, 2861, 3037, 3163, 3167, 3299
Offset: 1

Views

Author

Keywords

Comments

Primes in A100330. The generated prime numbers are exactly A194257. [Bernard Schott, Dec 21 2012]

Crossrefs

Programs

  • Maple
    select(p -> isprime(p) and isprime(1+p+p^2+p^3+p^4+p^5+p^6), [2,seq(i,i=3..10000,2)]); # Robert Israel, May 05 2017
  • Mathematica
    f[n_]:=1+n+n^2+n^3+n^4+n^5+n^6; lst={}; Do[p=Prime[n]; If[PrimeQ[f[p]], AppendTo[lst,p]], {n,7!}]; lst
    Select[Prime[Range[500]],PrimeQ[Total[#^Range[0,6]]]&] (* Harvey P. Dale, Jul 13 2022 *)
  • PARI
    n=0;forprime(p=2,10000,isprime((p^7-1)/(p-1))&&print(n++" "p))\\ Zak Seidov, Mar 09 2013

Extensions

Edited (but not checked) by N. J. A. Sloane, Jul 25 2009

A245393 Primes of the form m^10 - m^9 + m^8 - m^7 + m^6 - m^5 + m^4 - m^3 + m^2 - m + 1.

Original entry on oeis.org

683, 51828151, 57154490053, 128011456717, 39700406579747, 60867245726761, 135938684703251, 2681921038140191, 825977153711699903, 2411248431216834661, 38518333422551932951, 161352769633614478921, 4679818035765747188623, 10926823630072049689441, 13158906479414390795167
Offset: 1

Views

Author

K. D. Bajpai, Jul 21 2014

Keywords

Comments

All the terms in this sequence are primes, but none are congruent to 9 mod 10.
The value of first few m's corresponding to primes listed in data section are: 2, 6, 12, 13, 23, 24, 26, 35, 62, 69, 91, 105, 147, 160, 163, 183, 185, 193... 469, 491, 492 .....

Examples

			m:=2: m^10 - m^9 + m^8 - m^7 + m^6 - m^5 + m^4 - m^3 + m^2 - m + 1 = 683, which is prime, hence appears in the sequence.
m:=6: m^10 - m^9 + m^8 - m^7 + m^6 - m^5 + m^4 - m^3 + m^2 - m + 1 = 51828151, which is prime, hence appears in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[n^10 - n^9 + n^8 - n^7 + n^6 - n^5 + n^4 - n^3 + n^2 - n + 1, {n, 200}], PrimeQ]
  • PARI
    for(n=1,10^3,s=sum(i=0,10,(-n)^i);if(ispseudoprime(s),print1(s,", "))) \\ Derek Orr, Jul 30 2014

A194194 Primes of the form n^6 + n^5 + n^4 + n^3 + n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

7, 55987, 8108731, 321272407, 3092313043, 4201025641, 9684836827, 31401724537, 47446779661, 83925549247, 100343116693, 141276239497, 265462278481, 438668366137, 654022685443, 742912017121, 2333350772341, 3324554405047, 4033516174507, 4432676798593, 9752186278927, 14505760086637, 15656690128843, 16882733081761
Offset: 1

Views

Author

Jonathan Vos Post, Dec 20 2012

Keywords

Comments

Subset of A088550. The n in A018252 for which n^6 + n^5 + n^4 + n^3 + n^2 + n + 1 are prime begin 1, 6, 14, 26, 38, 40.

Examples

			a(1) = 1^6 + 1^5 + 1^4 + 1^3 + 1^2 + 1 + 1 = 7.
a(2) = 6^6 + 6^5 + 6^4 + 6^3 + 6^2 + 6 + 1 = 55987.
a(3) = 14^6 + 14^5 + 14^4 + 14^3 + 14^2 + 14 + 1 = 8108731.
a(4) = 26^6 + 26^5 + 26^4 + 26^3 + 26^2 + 26 + 1 = 321272407.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=200},Select[Total[#^Range[0,6]]&/@Complement[Range[nn], Prime[ Range[PrimePi[nn]]]],PrimeQ]] (* Harvey P. Dale, Nov 15 2013 *)

A245427 Primes of the form n^6 - n^5 + n^4 - n^3 + n^2 - n + 1.

Original entry on oeis.org

43, 547, 909091, 1623931, 7027567, 10678711, 15790321, 22796593, 32222107, 81867661, 183458857, 234750601, 574995877, 2498207293, 6177695707, 7095062437, 9272716111, 13564461457, 19397579293, 24344094727, 50689400581, 81420308971, 137405657593, 149289169177
Offset: 1

Views

Author

K. D. Bajpai, Jul 21 2014

Keywords

Comments

All the terms in this sequence are primes, but none are congruent to 9 mod 10.
All terms == 1 (mod 7). - Robert Israel, Jul 22 2014

Examples

			n = 2: n^6 - n^5 + n^4 - n^3 + n^2 - n + 1 = 43, which is prime.
n = 10: n^6 - n^5 + n^4 - n^3 + n^2 - n + 1 = 909091, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[n^6 - n^5 + n^4 - n^3 + n^2 - n + 1, {n, 200}], PrimeQ]

A288939 Nonprime numbers k such that k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 is prime.

Original entry on oeis.org

1, 6, 14, 26, 38, 40, 46, 56, 60, 66, 68, 72, 80, 87, 93, 95, 115, 122, 126, 128, 146, 156, 158, 160, 180, 186, 192, 203, 206, 208, 220, 221, 235, 237, 238, 264, 266, 280, 282, 290, 294, 300, 303, 320, 341, 350, 363, 381, 395, 399, 404, 405, 417, 418, 436, 438, 447, 450
Offset: 1

Views

Author

Bernard Schott, Jun 19 2017

Keywords

Comments

A163268 Union {This sequence} = A100330.
The corresponding prime numbers k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 = 1111111_k are in A194194; all these Brazilian primes belong to A085104 and A285017.

Examples

			6 is in the sequence because 6^6 + 6^5 + 6^4 + 6^3 + 6^2 + 6 + 1 = 1111111_6 = 55987 which is prime.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 200 do s(n):= 1+n+n^2+n^3+n^4+n^5+n^6;
    if not isprime(n) and isprime(s(n)) then print(n,s(n)) else fi; od:
  • Mathematica
    Select[Range@ 450, And[! PrimeQ@ #, PrimeQ@ Total[#^Range[0, 6]]] &] (* Michael De Vlieger, Jun 19 2017 *)
  • PARI
    isok(n) = !isprime(n) && isprime(1+n+n^2+n^3+n^4+n^5+n^6); \\ Michel Marcus, Jun 19 2017
    
  • Python
    from sympy import isprime
    A288939_list = [n for n in range(10**3) if not isprime(n) and isprime(n*(n*(n*(n*(n*(n + 1) + 1) + 1) + 1) + 1) + 1)] # Chai Wah Wu, Jul 13 2017
Showing 1-10 of 13 results. Next