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

A238399 a(n) is the number of primes occurring between A053182(n) and A053183(n) (excluding the endpoints).

Original entry on oeis.org

2, 3, 7, 55, 255, 478, 663, 984, 1237, 1955, 3021, 3214, 8312, 13519, 38267, 40805, 45400, 47444, 48835, 55269, 56758, 59032, 66067, 92141, 93063, 103620, 106611, 108602, 112713, 140874, 151335, 163314, 178215, 183330, 211350, 235410, 244165, 265160, 275971
Offset: 1

Views

Author

Torlach Rush, Feb 26 2014

Keywords

Crossrefs

Programs

  • Mathematica
    (PrimePi[#^2 + #] - PrimePi[#]) & /@  Select[Prime@Range@500, PrimeQ[#^2 + # + 1] &] (* Giovanni Resta, Feb 27 2014 *)

Extensions

a(33)-a(39) from Giovanni Resta, Feb 27 2014

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

A001001 Number of sublattices of index n in generic 3-dimensional lattice.

Original entry on oeis.org

1, 7, 13, 35, 31, 91, 57, 155, 130, 217, 133, 455, 183, 399, 403, 651, 307, 910, 381, 1085, 741, 931, 553, 2015, 806, 1281, 1210, 1995, 871, 2821, 993, 2667, 1729, 2149, 1767, 4550, 1407, 2667, 2379, 4805, 1723, 5187, 1893, 4655, 4030, 3871, 2257, 8463, 2850, 5642, 3991, 6405, 2863
Offset: 1

Views

Author

Keywords

Comments

These sublattices are in 1-1 correspondence with matrices
[a b d]
[0 c e]
[0 0 f]
with acf = n, b = 0..c-1, d = 0..f-1, e = 0..f-1. The sublattice is primitive if gcd(a,b,c,d,e,f) = 1.
Total area of all distinct rectangles whose side lengths are divisors of n, and whose length is an integer multiple of the width. - Wesley Ivan Hurt, Aug 23 2020

References

  • Richard P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.13(d), pp. 76 and 113.

Crossrefs

Column 3 of A160870.
Cf. A060983, A064987 (Mobius transform).
Primes in this sequence are in A053183.

Programs

  • Haskell
    a001001 n = sum [sum [k * (if k `mod` l == 0 then l else 0) | k <- [1..n], n `mod` k == 0 ] | l <- [1..n]]
    a = [ a001001 n | n <- [1..53]]
    putStrLn $ concat $ map (++ ", ") (map show a) -- Miles Wilson, Apr 04 2025
  • Maple
    nmax := 100:
    L12 := [seq(1,i=1..nmax) ];
    L27 := [seq(i,i=1..nmax) ];
    L290 := [seq(i^2,i=1..nmax) ];
    DIRICHLET(L12,L27) ;
    DIRICHLET(%,L290) ; # R. J. Mathar, Sep 25 2017
  • Mathematica
    a[n_] := Sum[ d*DivisorSigma[1, d], {d, Divisors[n]}]; Table[ a[n], {n, 1, 42}] (* Jean-François Alcover, Jan 20 2012, after Vladeta Jovovic *)
    f[p_, e_] := Product[(p^(e + k) - 1)/(p^k - 1), {k, 1, 2}]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Aug 29 2019 *)
  • PARI
    N=17; default(seriesprecision,N); x=z+O(z^(N+1))
    c=sum(j=1,N,j*x^j);
    t=1/prod(j=1,N, eta(x^(j))^j)
    t=log(t)
    t=serconvol(t,c)
    Vec(t)
    /* Joerg Arndt, May 03 2008 */
    
  • PARI
    a(n)=sumdiv(n,d, d * sumdiv(d,t, t ) );  /* Joerg Arndt, Oct 07 2012 */
    
  • PARI
    a(n)=sumdivmult(n,d, sigma(d)*d) \\ Charles R Greathouse IV, Sep 09 2014
    

Formula

If n = Product p^m, a(n) = Product (p^(m + 1) - 1)(p^(m + 2) - 1)/(p - 1)(p^2 - 1). Or, a(n) = Sum_{d|n} sigma(n/d)*d^2, Dirichlet convolution of A000290 and A000203.
a(n) = Sum_{d|n} d*sigma(d). - Vladeta Jovovic, Apr 06 2001
Multiplicative with a(p^e) = ((p^(e+1)-1)(p^(e+2)-1))/((p-1)(p^2-1)). - David W. Wilson, Sep 01 2001
Dirichlet g.f.: zeta(s)*zeta(s-1)*zeta(s-2).
L.g.f.: -log(Product_{k>=1} (1 - x^k)^sigma(k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 23 2018
a(n) = Sum_{d1|n, d2|n, d1|d2} d1*d2. - Wesley Ivan Hurt, Aug 23 2020
Sum_{k=1..n} a(k) ~ c * n^3, where c = Pi^2*zeta(3)/18 = 0.659101... . - Amiram Eldar, Oct 19 2022
G.f.: Sum_{k>=1} Sum {l>=1} k*l^2*x^(k*l - 1)/(1 - x^(k*l)). - Miles Wilson, Apr 04 2025

A053182 Primes p such that p^2 + p + 1 is prime.

Original entry on oeis.org

2, 3, 5, 17, 41, 59, 71, 89, 101, 131, 167, 173, 293, 383, 677, 701, 743, 761, 773, 827, 839, 857, 911, 1091, 1097, 1163, 1181, 1193, 1217, 1373, 1427, 1487, 1559, 1583, 1709, 1811, 1847, 1931, 1973, 2129, 2273, 2309, 2339, 2411, 2663, 2729, 2789, 2957
Offset: 1

Views

Author

Enoch Haga, Mar 01 2000

Keywords

Comments

Roger Horn computed the first 776 terms of this sequence around 1961 to test (with Paul Bateman) their conjecture on the density of simultaneous primes in polynomials. - Charles R Greathouse IV, Apr 05 2011
Starting with a(3)=5 all terms are of the form 6k-1, k in A147683. - Zak Seidov, Nov 10 2008
Primes p such that the sum of divisors of p^2 (sigma(p^2) = A000203(p^2) = p^2+p+1) is prime. - Claudio Meller, Apr 07 2011
The generated prime numbers p^2 + p + 1 are exactly A053183. - Bernard Schott, Dec 20 2012
Positive squarefree k such that the sum of divisors of k^2 is prime. - Peter Munn, Feb 02 2018

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | IsPrime(p^2+p+1)]; // Vincenzo Librandi, Aug 06 2010
  • Mathematica
    Select[Prime[Range[427]], PrimeQ[#^2+#+1]&] (* Bruno Berselli, Nov 08 2011 *)
  • PARI
    isA053182(n)=isprime(n) && isprime(n^2+n+1)  \\ Michael B. Porter, Apr 23 2010
    
  • PARI
    c=0; forprime(p=1,default(primelimit), isprime(p^2+p+1) & write("/tmp/b053182.txt",c++," "p))  \\ M. F. Hasler, Apr 07 2011
    

Extensions

List changed to cross-reference by Franklin T. Adams-Watters, May 12 2010

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

A065405 Composite numbers k such that the sum of the divisors of k^2 is a prime.

Original entry on oeis.org

4, 8, 27, 49, 64, 125, 169, 256, 289, 512, 529, 729, 841, 1849, 2197, 3125, 4913, 5329, 6241, 6889, 15625, 16129, 29791, 32768, 37249, 51529, 57121, 69169, 76729, 113569, 117649, 128881, 139129, 157609, 192721, 208849, 226981, 229441, 253009
Offset: 1

Views

Author

Labos Elemer, Nov 06 2001

Keywords

Comments

All these composite numbers k should be prime powers because if k=a*b with gcd(a,b)=1, then sigma(aabb) = sigma(aa)*sigma(bb) cannot be a prime; 46 of the 236 prime powers below 1000000 are here.

Crossrefs

Programs

  • Mathematica
    Select[ Range[3 10^5], ! PrimeQ[ # ] && PrimeQ[ DivisorSigma[1, #^2]] & ]
  • PARI
    isok(k) = { !isprime(k) && isprime(sigma(k^2)) } \\ Harry J. Smith, Oct 18 2009

Formula

sigma(a(n)^2) = sigma(A065404(n)) = A065403(n) is prime.

A185632 Primes of the form n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

3, 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, 22651, 23563, 24181, 26083, 26407, 27061, 28393, 31153, 35533
Offset: 1

Views

Author

Bernard Schott, Dec 18 2012

Keywords

Comments

These are the primes associated with A182253.
All these numbers are in A002383 but not in A053183.
All the numbers n^2 + n + 1 = 111_n with n >= 2 are by definition Brazilian numbers: A125134. See Links: "Les nombres brésiliens" - Section V.5 page 35.

Crossrefs

Programs

  • Mathematica
    Select[Table[If[PrimeQ[n],Nothing,n^2+n+1],{n,200}],PrimeQ] (* Harvey P. Dale, Apr 02 2023 *)
  • PARI
    lista(nn) = {for (n = 1, nn, if (! isprime(n) && isprime(p = n^2 + n + 1), print1(p, ", ");););} \\ Michel Marcus, Sep 04 2013

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

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).

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
Showing 1-10 of 18 results. Next