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 11-20 of 38 results. Next

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
    

A065404 Squares of composite numbers k such that sigma(k) (sum of divisors of k, A000203) is a prime.

Original entry on oeis.org

16, 64, 729, 2401, 4096, 15625, 28561, 65536, 83521, 262144, 279841, 531441, 707281, 3418801, 4826809, 9765625, 24137569, 28398241, 38950081, 47458321, 244140625, 260144641, 887503681, 1073741824, 1387488001, 2655237841
Offset: 1

Views

Author

Labos Elemer, Nov 06 2001

Keywords

Examples

			46 cases below 10^12; for M a Mersenne prime, (M+1)/2 is here: M=8191, 4096=(M+1)/2.
		

Crossrefs

Programs

  • PARI
    { n=0; for (m=1, 10^9, if (isprime(m), next); x=sigma(m^2); if (isprime(x), write("b065404.txt", n++, " ", m^2); if (n==100, return)) ) } \\ Harry J. Smith, Oct 18 2009

Formula

sigma(a(n)) = A065403(n).

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

A182253 Nonprime numbers n such that n^2 + n + 1 is prime.

Original entry on oeis.org

1, 6, 8, 12, 14, 15, 20, 21, 24, 27, 33, 38, 50, 54, 57, 62, 66, 69, 75, 77, 78, 80, 90, 99, 105, 110, 111, 117, 119, 138, 141, 143, 147, 150, 153, 155, 161, 162, 164, 168, 176, 188, 189, 192, 194, 203, 206, 209, 215, 218, 231, 236, 245, 246, 266, 272, 278
Offset: 1

Views

Author

Bernard Schott, Dec 18 2012

Keywords

Comments

All these numbers are in A002384 but not in A053182.
The generated prime numbers n^2 + n + 1 are in A185632.
All the generated numbers n^2 + n + 1 = 111_n are by definition Brazilian numbers: A125134. See Links: "Les nombres brésiliens" - Section V.5 page 35.

Crossrefs

Programs

  • Mathematica
    Select[Range@ 280, And[! PrimeQ@ #, PrimeQ[#^2 + # + 1]] &] (* Michael De Vlieger, Jul 30 2017 *)
  • PARI
    isok(n) = ! isprime(n) && isprime(n^2 + n + 1); \\ Michel Marcus, Sep 04 2013

A240971 Primes p such that (p^2 + p + 1)/3 is prime.

Original entry on oeis.org

7, 13, 19, 31, 43, 73, 97, 103, 127, 157, 199, 223, 241, 271, 409, 421, 661, 673, 727, 859, 883, 937, 1021, 1039, 1051, 1063, 1093, 1447, 1483, 1609, 1657, 1669, 1723, 1753, 1861, 1879, 1993, 2029, 2203, 2437, 2539, 2677, 2719, 2803, 2833, 2953, 3079, 3121
Offset: 1

Views

Author

Vincenzo Librandi, Aug 05 2014

Keywords

Comments

Under Schinzel's hypothesis, there are infinitely many primes of this form.
p must be of form 6k+1 to give an integer. A053182 lists when p^2 + p + 1 is prime. - Jens Kruse Andersen, Aug 06 2014

Crossrefs

Cf. A053182.

Programs

  • Magma
    [p: p in PrimesInInterval(3,3500)| IsPrime((p^2+p+1) div 3)];
    
  • Maple
    select(n -> isprime(n) and isprime((n^2 + n + 1)/3), [seq(6*k+1,k=1..1000)]); # Robert Israel, Aug 05 2014
  • Mathematica
    Select[Prime[Range[500]], PrimeQ[(#^2 + # + 1)/3] &]
  • PARI
    forprime(p=1,10^4,s=(p^2+p+1)/3;if(floor(s)==s,if(isprime(s),print1(p,", ")))) \\ Derek Orr, Aug 05 2014

A259417 Even powers of the odd primes listed in increasing order.

Original entry on oeis.org

1, 9, 25, 49, 81, 121, 169, 289, 361, 529, 625, 729, 841, 961, 1369, 1681, 1849, 2209, 2401, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6561, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 14641, 15625, 16129, 17161, 18769, 19321, 22201, 22801, 24649
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 26 2015

Keywords

Comments

Each of the following sequences, p^(q-1) with p >= 2 and q > 2 primes, except their respective first elements, powers of 2, is a subsequence:
A001248(p) = p^2, A030514(p) = p^4, A030516(p) = p^6,
A030629(p) = p^10, A030631(p) = p^12, A030635(p) = p^16,
A030637(p) = p^18, A137486(p) = p^22, A137492(p) = p^28,
A139571(p) = p^30, A139572(p) = p^36, A139573(p) = p^40,
A139574(p) = p^42, A139575(p) = p^46, A173533(p) = p^52,
A183062(p) = p^58, A183085(p) = p^60.
See also the link to the OEIS Wiki.
The sequences A053182(n)^2, A065509(n)^4, A163268(n)^6 and A240693(n)^10 are subsequences of this sequence.
The odd numbers in A023194 are a subsequence of this sequence.

Examples

			a(11) = 5^4 = 625 is followed by a(12) = 3^6 = 729 since no even power of an odd prime falls between them.
		

Programs

  • Mathematica
    a259417[bound_] := Module[{q, h, column = {}}, For[q = Prime[2], q^2 <= bound, q = NextPrime[q], For[h = 1, q^(2*h) <= bound, h++, AppendTo[column, q^(2*h)]]]; Prepend[Sort[column], 1]]
    a259417[25000] (* data *)
    With[{upto=25000},Select[Union[Flatten[Table[Prime[Range[2,Floor[ Sqrt[ upto]]]]^n,{n,0,Log[2,upto],2}]]],#<=upto&]] (* Harvey P. Dale, Nov 25 2017 *)

Formula

Sum_{n>=1} 1/a(n) = 1 + Sum_{k>=1} (P(2*k) - 1/2^(2*k)) = 1.21835996432366585110..., where P is the prime zeta function. - Amiram Eldar, Jul 10 2022

A096527 Number of permutations of divisors of n such that all sums of triple adjacent divisors are primes.

Original entry on oeis.org

0, 0, 0, 6, 0, 0, 0, 12, 6, 4, 0, 12, 0, 4, 4, 4, 0, 0, 0, 16, 12, 0, 0, 20, 6, 4, 12, 20, 0, 0, 0, 0, 4, 4, 24, 48, 0, 4, 12, 50, 0, 0, 0, 4, 12, 0, 0, 0, 0, 0, 0, 16, 0, 0, 24, 136, 12, 4, 0, 286, 0, 0, 96, 0, 24, 0, 0, 30, 0, 0, 0, 0, 0, 0, 32, 16, 4, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2004

Keywords

Comments

a(A096530(n)) = 0, a(A096529(n)) > 0.
For square of terms of A053182(n), a(n) = 6. - Michel Marcus, May 08 2014

Examples

			Divisors of n=10 are {1,2,5,10}:
[1,2,10,5]->(1+2+10,2+5+10)=(13,17), [1,10,2,5]->(1+10+2,10+2+5)=(13,17)
[5,2,10,1]->(5+2+10,2+10+1)=(17,13) and
[5,10,2,1]->(5+10+2,10+2+1)=(17,13): therefore a(10)=4.
		

Crossrefs

Programs

  • PARI
    isokperm(v, nbd, d) = {for (j=1, nbd-2, if (! isprime(d[v[j]] + d[v[j+1]] + d[v[j+2]]), return (0));); return (1);}
    a(n) = {d = divisors(n); nbd = #d; if (nbd > 2, sum(i=1, nbd!, isokperm(numtoperm(nbd, i), nbd, d)));} \\ Michel Marcus, May 03 2014

Extensions

More terms from Michel Marcus, May 03 2014

A096529 Numbers whose divisors can be permuted so that all sums of triple adjacent divisors are primes.

Original entry on oeis.org

4, 8, 9, 10, 12, 14, 15, 16, 20, 21, 24, 25, 26, 27, 28, 33, 34, 35, 36, 38, 39, 40, 44, 45, 52, 55, 56, 57, 58, 60, 63, 65, 68, 75, 76, 77, 81, 84, 85, 86, 88, 92, 93, 99, 100, 104, 105, 111, 115, 117, 119, 123, 124, 125, 129, 132, 135, 136, 140, 143, 145, 147
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2004

Keywords

Comments

Square of terms of A053182 are in this sequence. - Michel Marcus, May 08 2014
From Amiram Eldar, Nov 08 2024: (Start)
The possible values of the number of even divisors of even terms of this sequence is restricted by the number of odd divisors.
Let k be a term and d_odd(k) = A001227(k) and d_even(k) = A183063 be its number of odd divisors and number of even divisors, respectively. When k is even, in a valid permutation of its divisors there must be two even divisors between two odd divisors, at most 2 before the first odd divisor, and at most 2 after the last odd divisor.
Therefore, d_even(k) - 2*(d_odd(k) - 1) <= 4. Let d(k) = A000005(k) = d_odd(k) + d_even(k), and let e = A007814(k) and m = A000265(k). Then, k = 2^e * m, d(k) = (e+1) * d(m) = (e+1) * d_odd(k), so d_even(k) = e * d_odd(k), and |e-2| * d_odd(k) <= 2.
If m = 1, then d_odd(k) = 1 and e <= 4, so 16 = 2^4 is the largest power of 2 in this sequence.
If m = p is a prime, then d_odd(k) = 2 and e <= 3, and therefore only terms of the form 2*p, 4*p or 8*p are possible. 2*p is a term if and only if p is a term of A106067.
If m is composite, then d_odd(k) > 2 and e <= 2, and therefore k is not divisible by 8. (End)

Examples

			Divisors of 24 are {1,2,3,4,6,8,12,24}: [2,8,3,12,4,1,24,6] -> (2+8+3,8+3+12,3+12+4,12+4+1,4+1+24,1+24+6) = (13,23,19,17,29,31): therefore 24 is a term.
		

Crossrefs

Programs

  • PARI
    isok(p) = {my(n = #p); if(n < 3, return(0)); for(k = 1, n-2, if(!isprime(p[k]+p[k+1]+p[k+2]), return(0))); 1;}
    is2(n) = {my(d = divisors(n)); forperm(d, p, if(isok(p), return(1))); 0;}
    is1(k) = {my(e = valuation(k,2), o = k >> e); (e == 0) || (o == 1 && e <= 4) || (abs(e-2) * numdiv(o) <= 2);}
    is(k) = is1(k) && is2(k); \\ Amiram Eldar, Nov 08 2024

Formula

A096527(a(n)) > 0.

Extensions

a(30)-a(51) from Michel Marcus, May 03 2014
a(52) onwards from Amiram Eldar, Nov 08 2024

A136242 Numbers k among A008864 such that k^2 - k + 1 is prime.

Original entry on oeis.org

3, 4, 6, 18, 42, 60, 72, 90, 102, 132, 168, 174, 294, 384, 678, 702, 744, 762, 774, 828, 840, 858, 912, 1092, 1098, 1164, 1182, 1194, 1218, 1374, 1428, 1488, 1560, 1584, 1710, 1812, 1848, 1932, 1974, 2130, 2274, 2310, 2340, 2412, 2664, 2730, 2790, 2958
Offset: 1

Views

Author

Lekraj Beedassy, Dec 24 2007

Keywords

Comments

See A053183 for the primes associated with a(n).

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]] + 1, PrimeQ[#^2 - # + 1] &] (* Amiram Eldar, Apr 19 2024 *)
  • PARI
    lista(pmax) = forprime(p=1, pmax, if(isprime(p^2+p+1), print1(p+1, ", "))); \\ Amiram Eldar, Apr 19 2024

Formula

a(n) = A053182(n) + 1.

A181149 a(n) = prime(n)^3 + prime(n)^2 + prime(n).

Original entry on oeis.org

14, 39, 155, 399, 1463, 2379, 5219, 7239, 12719, 25259, 30783, 52059, 70643, 81399, 106079, 151739, 208919, 230763, 305319, 363023, 394419, 499359, 578759, 712979, 922179, 1040603, 1103439, 1236599, 1307019
Offset: 1

Views

Author

Jani Melik, Jan 24 2011

Keywords

Comments

a(n) is semiprime just when prime(n) is in A053182. - Charles R Greathouse IV, Apr 23 2022

Examples

			a(4)=399 because the 4th prime is 7, 7^3 = 343, 7^2 = 49, and 343 + 49 + 7 = 399.
		

Crossrefs

Cf. p: A000040; p^2: A001248; p^3: A030078; p^2+p: A036690; p^3+p^2: A135178.

Programs

Formula

a(n) = A135178(n) + A000040(n). - Elmo R. Oliveira, Mar 22 2023
Previous Showing 11-20 of 38 results. Next