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-7 of 7 results.

A023195 Prime numbers that are the sum of the divisors of some n.

Original entry on oeis.org

3, 7, 13, 31, 127, 307, 1093, 1723, 2801, 3541, 5113, 8011, 8191, 10303, 17293, 19531, 28057, 30103, 30941, 86143, 88741, 131071, 147073, 292561, 459007, 492103, 524287, 552793, 579883, 598303, 684757, 704761, 732541, 735307, 797161, 830833, 1191373
Offset: 1

Views

Author

Keywords

Comments

If n > 2 and sigma(n) is prime, then n must be an even power of a prime number. For example, 1093 = sigma(3^6). - T. D. Noe, Jan 20 2004
All primes of the form 2^n-1 (Mersenne primes) are in the sequence because if n is a natural number then sigma(2^(n-1)) = 2^n-1. So A000668 is a subsequence of this sequence. If sigma(n) is prime then n is of the form p^(q-1) where both p & q are prime (the proof is easy). - Farideh Firoozbakht, May 28 2005
Primes of the form 1 + p + p^2 + ... + p^k where p is prime.
If n = sigma(p^k) is in the sequence, then k+1 is prime. - Franklin T. Adams-Watters, Dec 19 2011
Primes that are a repunit in a prime base. - Franklin T. Adams-Watters, Dec 19 2011.
Except for 3, these primes are particular Brazilian primes belonging to A085104. These prime numbers are also Brazilian primes of the form (p^x - 1)/(p^y - 1), p prime, belonging to A003424, with here x is prime, and y = 1. [See section V.4 of Quadrature article in Links.] - Bernard Schott, Dec 25 2012
From Bernard Schott, Dec 25 2012: (Start)
Others subsequences of this sequence:
A053183 for 111_p = p^2 + p + 1 when p is prime.
A190527 for 11111_p = p^4 + p^3 + p^2 + p + 1 when p is prime.
A194257 for 1111111_p = p^6 + p^5 + p^4 + p^3 + p^2 + p + 1 when p is prime. (End)
Subsequence of primes from A002191. - Michel Marcus, Jun 10 2014

Examples

			307 = 1 + 17 + 17^2; 307 and 17 are primes.
		

Crossrefs

Intersection of A002191 and A000040.
Cf. A000203, A000668, A023194 (the n that produce these primes), A053696, A085104, A003424, A053183, A190527, A194257.

Programs

  • Mathematica
    t={3}; lim=10^9; n=1; While[p=Prime[n]; k=2; s=1+p+p^2; sHarvey P. Dale, Jun 18 2022 *)
  • PARI
    upto(lim)=my(v=List([3]),t); forprime(p=2,solve(x=1,lim^(1/4), x^4+x^3+x^2+x+1-lim), forprime(e=5,1+log(lim)\log(p), if(isprime(t=sigma(p^(e-1))) && t<=lim, listput(v,t)))); forprime(p=2, solve(x=1,lim^(1/2),x^2+x+1-lim), if(isprime(t=p^2+p+1), listput(v,t))); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Dec 20 2011
    
  • Python
    from sympy import isprime, divisor_sigma
    A023195_list = sorted(set([3]+[n for n in (divisor_sigma(d**2) for d in range(1,10**4)) if isprime(n)])) # Chai Wah Wu, Jul 23 2016

A131992 a(n) = 1 + prime(n) + prime(n)^2 + prime(n)^3 + prime(n)^4.

Original entry on oeis.org

31, 121, 781, 2801, 16105, 30941, 88741, 137561, 292561, 732541, 954305, 1926221, 2896405, 3500201, 4985761, 8042221, 12326281, 14076605, 20456441, 25774705, 28792661, 39449441, 48037081, 63455221, 89451461, 105101005, 113654321
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 06 2007

Keywords

Comments

Thébault shows that a(2) = 121 is the only square in this sequence. - Charles R Greathouse IV, Jul 23 2013
Giovanni Resta has found that 28792661 is the first Sophie Germain prime of this form (and actually of the form p = (n^m-1)/(n-1) for any p-1 > n, m > 1). - M. F. Hasler, Mar 03 2020

Examples

			a(1) = 31 because prime(1) = 2 and 1 + 2 + 2^2 + 2^3 + 2^4 = 1 + 2 + 4 + 8 + 16 = 31.
		

References

  • Victor Thébault, Curiosités arithmétiques, Mathesis 62 (1953), pp. 120-129.

Crossrefs

Equals A053699 restricted to prime indices. Subsequence of primes is A190527.

Programs

Formula

a(n) = 1 + A131991(n)*A000040(n).
a(n) = (A050997(n) - 1)/A006093(n).
a(n) = A000203(prime(n)^4). - R. J. Mathar, Mar 15 2018
a(n) = (prime(n)^5 - 1)/(prime(n) - 1) = A053699(prime(n)). (This is also meant by the 2nd formula.) - M. F. Hasler, Mar 03 2020

A065509 Primes p such that p^4 + p^3 + p^2 + p + 1 is prime.

Original entry on oeis.org

2, 7, 13, 17, 23, 29, 43, 73, 79, 83, 127, 193, 227, 239, 263, 277, 337, 359, 373, 397, 439, 457, 479, 503, 557, 563, 617, 919, 967, 1009, 1129, 1187, 1249, 1297, 1327, 1429, 1493, 1553, 1579, 1657, 1663, 1979, 1987, 2069, 2243, 2383, 2617, 2663, 2789
Offset: 1

Views

Author

Vladeta Jovovic, Nov 26 2001

Keywords

Comments

Primes in A049409. - Vincenzo Librandi, Aug 07 2010
The generated prime numbers are in A190527. - Bernard Schott, Dec 20 2012

Examples

			a(4) = 17 because 17 is prime and 17^4 + 17^3 + 17^2 + 17 + 1 = 88741 is prime.
		

Crossrefs

Cf. A053182.

Programs

  • Magma
    [n: n in [0..10000]| IsPrime(n) and IsPrime(n^4+n^3+n^2+n+1)] // Vincenzo Librandi, Aug 07 2010
  • Mathematica
    f[n_]:=1+n+n^2+n^3+n^4; lst={}; Do[p=Prime[n]; If[PrimeQ[f[p]], AppendTo[lst,p]], {n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jul 24 2009 *)
    Select[Prime[Range[500]],PrimeQ[Total[#^Range[0,4]]]&] (* Harvey P. Dale, Apr 08 2017 *)
  • PARI
    { n=0; for (m=1, 10^9, p=prime(m); if (isprime(p^4 + p^3 + p^2 + p + 1), write("b065509.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 20 2009
    
  • PARI
    {A065509_vec(N,p=1)=vector(N,i,until(isprime((p^5-1)\(p-1)),p=nextprime(p+1));p)} \\ M. F. Hasler, Mar 03 2020
    

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

A193574 Smallest divisor of sigma(n) that does not divide n.

Original entry on oeis.org

3, 2, 7, 2, 4, 2, 3, 13, 3, 2, 7, 2, 3, 2, 31, 2, 13, 2, 3, 2, 3, 2, 5, 31, 3, 2, 8, 2, 4, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 31, 3, 3, 2, 7, 2, 4, 2, 3, 2, 3, 2, 7, 2, 3, 2, 127, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 5, 2, 4, 2, 3
Offset: 2

Views

Author

Keywords

Comments

a(n) = 2 iff n is an odd number that is not a perfect square.
From Hartmut F. W. Hoft, May 05 2017: (Start)
(1) Every a(n) > n is a prime: Because of the minimality of a(n), a(n) = u*v with gcd(u,v)=1 leads to the contradiction (u*v)|n. Similarly, a(n)=p^k with p prime an k>1 leads to the contradiction (p^k-1)/(p-1) | n.
(2) n=p^(2*k), k>=1 and 2*k+1 prime, when a(n) = sigma(n) for n>2: Because n having two distinct prime factors implies sigma(n) composite, and if n is an odd power of a prime then 2|sigma(n). Finally, if 2*k+1=u*v with u,v > 1 then sigma(p^(u-1)) divides sigma(p^(2*k)), but not p^(2k), for any prime p, contradicting minimality of a(n). For example, no number sigma(p^8) for any prime p is in the sequence.
(3) The converse of (2) is false since, e.g. sigma(7^2) = 3*19 so that a(7^2) = 3, and sigma(2^10) = 23*89 so that a(2^10) = 23.
(4) Conjecture: a(n) > n implies a(n) = sigma(n); tested through n = 20000000.
(5) Subsequences are: A053183 (sigma(p^2) is prime for prime p), A190527 (sigma(p^4) is prime for prime p), A194257 (sigma(p^6) is prime for prime p), A286301 (sigma(p^10) is prime for prime p)
(6) Subsequences are: A000668 (primes of form 2^p-1), A076481 (primes of form (3^p-1)/2), A086122 (primes of form (5^p-1)/4), A102170 (primes of form (7^p-1)/6), all when p is prime.
(End)
Up to n = 10^6, there are 89 distinct elements. For those n, a(n) is prime. If it's not, it's a power of 2, a power of 3 or a perfect square <= 121. - David A. Corneth, May 10 2017

Crossrefs

Programs

  • Haskell
    import Data.List ((\\))
    a193574 n = head [d | d <- [1..sigma] \\ nDivisors, mod sigma d == 0]
       where nDivisors = a027750_row n
             sigma = sum nDivisors
    -- Reinhard Zumkeller, May 20 2015, Aug 28 2011
  • Mathematica
    a193574[n_] := First[Select[Divisors[DivisorSigma[1, n]], Mod[n, #]!=0&]]
    Map[a193574, Range[2, 80]] (* data *) (* Hartmut F. W. Hoft, May 05 2017 *)
  • PARI
    a(n)=local(ds);ds=divisors(sigma(n));for(k=2,#ds,if(n%ds[k],return(ds[k])))
    

A193366 Primes of the form n^4 + n^3 + n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

5, 22621, 245411, 346201, 637421, 837931, 2625641, 3835261, 6377551, 15018571, 16007041, 21700501, 30397351, 35615581, 52822061, 78914411, 97039801, 147753211, 189004141, 195534851, 209102521, 223364311, 279086341, 324842131, 421106401, 445120421, 566124791, 693025471, 727832821, 745720141, 880331261, 943280801, 987082981, 1544755411, 1740422941
Offset: 1

Views

Author

Jonathan Vos Post, Dec 20 2012

Keywords

Comments

Note that there are no primes of the form n^3 + n^2 + n + 1 = (n+1)*(n^2+1) as irreducible components over Z.
From Bernard Schott, May 15 2017: (Start)
These are the primes associated with A286094.
A088548 = A190527 Union {This sequence}.
All the numbers of this sequence n^4 + n^3 + n^2 + n + 1 = 11111_n with n > 1 are Brazilian numbers, so belong to A125134 and A085104. (End)

Examples

			a(1) = 1^4 + 1^3 + 1^2 + 1 + 1 = 5.
a(2) = 12^4 + 12^3 + 12^2 + 12 + 1 = 22621.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 150 do p(n):= 1+n+n^2+n^3+n^4;
    if tau(n)>2 and isprime(p(n)) then print(n,p(n)) else fi od: # Bernard Schott, May 15 2017
  • Mathematica
    Select[Map[Total[#^Range[0, 4]] &, Select[Range@ 204, ! PrimeQ@ # &]], PrimeQ] (* Michael De Vlieger, May 15 2017 *)
  • PARI
    print1(5);forcomposite(n=4,1e3,if(isprime(t=n^4+n^3+n^2+n+1),print1(", "t))) \\ Charles R Greathouse IV, Mar 25 2013

Formula

{n^4 + n^3 + n^2 + n + 1 where n is in A018252}.

A286094 Nonprime numbers n such that n^4 + n^3 + n^2 + n + 1 is prime.

Original entry on oeis.org

1, 12, 22, 24, 28, 30, 40, 44, 50, 62, 63, 68, 74, 77, 85, 94, 99, 110, 117, 118, 120, 122, 129, 134, 143, 145, 154, 162, 164, 165, 172, 175
Offset: 1

Views

Author

Bernard Schott, May 02 2017

Keywords

Comments

A065509 Union {this sequence} = A049409.
The corresponding prime numbers n^4 + n^3 + n^2 + n + 1 = 11111_n are in A193366; these Brazilian primes, except 5 which is not Brazilian, belong to A085104 and A285017.

Examples

			12 is in the sequence because 12^4 + 12^3 + 12^2 + 12 + 1 = 11111_12 = 22621, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 414, And[! PrimeQ@ #, PrimeQ[Total[#^Range[0, 4]]]] &] (* Michael De Vlieger, May 03 2017 *)
  • PARI
    isok(n)=if(n==1,5,if(ispseudoprime(n), 0, isprime(fromdigits([1, 1, 1, 1, 1], n))));
    getfirstterms(n)={my(L:list, c:small); L=List(); c=0; forstep(k=1, +oo, 1, if(isok(k), listput(L, k); if(c++==n, break))); return(Vec(L))} \\ R. J. Cano, May 09 2017
Showing 1-7 of 7 results.