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

A083382 Write the numbers from 1 to n^2 consecutively in n rows of length n; a(n) = minimal number of primes in a row.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 4, 4, 3, 3, 4, 5, 4, 3, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 6, 4, 5, 6, 6, 5, 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 7, 7, 7, 7, 6, 6, 7, 7, 7
Offset: 1

Views

Author

James Propp, Jun 05 2003

Keywords

Comments

Conjectured by Schinzel (Hypothesis H2) to be always positive for n > 1.
The conjecture has been verified for n = prime < 790000 by Aguilar.
If this is true, then Legendre's conjecture is true as well. (See A014085). - Antti Karttunen, Jan 01 2019

Examples

			For n = 3 the array is
1 2 3 (2 primes)
4 5 6 (1 prime)
7 8 9 (1 prime)
so a(3) = 1
		

References

  • P. Ribenboim, The New Book of Prime Number Records, Chapter 6.
  • P. Ribenboim, The Little Book Of Big Primes, Springer-Verlag, NY 1991, page 185.

Crossrefs

A084927 generalizes this to three dimensions.
Cf. A083415, A083383, A066888, A092556, A092557. See A083414 for primes in columns.
Cf. A139326.

Programs

  • Haskell
    a083382 n = f n n a010051_list where
       f m 0 _     = m
       f m k chips = f (min m $ sum chin) (k - 1) chips' where
         (chin,chips') = splitAt n chips
    -- Reinhard Zumkeller, Jun 10 2012
    
  • Maple
    A083382 := proc(n) local t1,t2,at; t1 := n; at := 0; for i from 1 to n do t2 := 0; for j from 1 to n do at := at+1; if isprime(at) then t2 := t2+1; fi; od; if t2 < t1 then t1 := t2; fi; od; t1; end;
  • Mathematica
    Table[minP=n; Do[s=0; Do[If[PrimeQ[c+(r-1)*n], s++ ], {c, n}]; minP=Min[s, minP], {r, n}]; minP, {n, 100}]
    Table[Min[Count[#,?PrimeQ]&/@Partition[Range[n^2],n]],{n,110}] (* _Harvey P. Dale, May 29 2013 *)
  • PARI
    A083382(n) = { my(m=-1); for(i=0,n-1,my(s=sum(j=(i*n),((i+1)*n)-1,isprime(1+j))); if((m<0) || (s < m), m = s)); (m); }; \\ Antti Karttunen, Jan 01 2019

Extensions

Edited by Charles R Greathouse IV, Jul 07 2010

A083414 Write the numbers from 1 to n^2 consecutively in n rows of length n; let c(k) = number of primes in k-th column; a(n) = minimal c(k) for gcd(k,n) = 1.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 2, 3, 5, 2, 6, 1, 5, 5, 5, 2, 10, 2, 6, 5, 8, 3, 9, 5, 8, 5, 9, 4, 17, 3, 9, 7, 9, 6, 15, 4, 9, 8, 13, 4, 21, 3, 11, 10, 11, 4, 17, 5, 15, 9, 14, 5, 20, 8, 14, 9, 14, 6, 27, 6, 15, 12, 14, 9, 26, 6, 15, 12, 23, 5, 25, 3, 15, 13, 17, 8, 29, 7, 20, 12, 17, 7, 32
Offset: 1

Views

Author

N. J. A. Sloane, Jun 10 2003

Keywords

Comments

Conjectured to be always positive for n>1.
Note that a(n) is large when phi(n), the number of integers relatively prime to n, is small and vice versa. - T. D. Noe, Jun 10 2003
The conjecture is true for all n <= 40000.

Examples

			For n = 4 the array is
.   1  2  3  4
.   5  6  7  8
.   9 10 11 12
.  13 14 15 16
in which columns 1 and 3 contain 2 and 3 primes; therefore a(4) = 2.
		

References

  • See A083382 for references and links.

Crossrefs

Cf. A083415 and A083382 for primes in rows.
A084927 generalizes this to three dimensions.
Cf. A010051.

Programs

  • Haskell
    a083414 n = minimum $ map c $ filter ((== 1) . (gcd n)) [1..n] where
       c k = sum $ map a010051 $ enumFromThenTo k (k + n) (n ^ 2)
    -- Reinhard Zumkeller, Jun 10 2012
  • Mathematica
    Table[minP=n; Do[If[GCD[c, n]==1, s=0; Do[If[PrimeQ[c+(r-1)*n], s++ ], {r, n}]; minP=Min[s, minP]], {c, n}]; minP, {n, 100}]

Extensions

More terms from Vladeta Jovovic and T. D. Noe, Jun 10 2003

A084928 If the numbers 1 to n^3 are arranged in a cubic array, a(n) is the minimum number of primes in each row of the n^2 rows in the "east-west view" that can have primes.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2
Offset: 1

Views

Author

T. D. Noe, Jun 12 2003

Keywords

Comments

This is a three-dimensional generalization of A083382.

Examples

			For the case n=3, the numbers are arranged in a cubic array as follows:
1..2..3........10.11.12........19.20.21
4..5..6........13.14.15........22.23.24
7..8..9........16.17.18........25.26.27
The first row is (1,2,3), the second is (4,5,6), etc. Surprisingly, a(n) = 0 for all n from 3 to 66. It appears that a(n) > 0 for n > 128. This has been confirmed up to n = 1000.
		

References

  • See A083382 for references and links to the two-dimensional case.

Crossrefs

Cf. A083382, A083414, A084927 (top view), A084929 (north-south view).

Programs

  • Mathematica
    Table[minP=n; Do[s=0; Do[If[PrimeQ[n*(c-1)+r], s++ ], {r, n}]; minP=Min[s, minP], {c, n^2}]; minP, {n, 100}]
  • PARI
    A084928(n) = { my(m=-1); for(i=0,(n^2)-1,my(s=sum(j=(i*n),((i+1)*n)-1,isprime(1+j))); if((m<0) || (s < m), m = s)); (m); }; \\ Antti Karttunen, Jan 01 2019

Extensions

More terms from Antti Karttunen, Jan 01 2019

A084929 If the numbers 1 to n^3 are arranged in a cubic array, a(n) is the minimum number of primes in each column of the n^2 columns in the "north-south view" that can have primes.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 0, 1, 0, 2, 0, 3, 0, 2, 1, 1, 0, 3, 0, 2, 1, 2, 0, 5, 0, 3, 0, 3, 0, 7, 0, 2, 1, 2, 0, 5, 0, 3, 2, 4, 0, 8, 0, 1, 2, 4, 0, 6, 0, 4, 2, 4, 0, 6, 1, 5, 2, 3, 1, 10, 0, 4, 4, 3, 1, 9, 0, 5, 3, 9, 0, 9, 1, 4, 3, 5, 2, 8, 1, 6, 2, 4, 1, 13, 2, 6, 3, 7, 1, 14, 2, 6, 3, 5, 2, 12, 1, 9, 4, 9
Offset: 1

Views

Author

T. D. Noe, Jun 12 2003

Keywords

Comments

The first column is (1,4,7), the second is (2,5,8), etc. Only columns whose tops are relatively prime to n are counted. In this case, columns starting with 3, 12 and 21 cannot have primes. a(n) = 0 for n = 1, 9, 25, 27, 35, 49 and the primes from 5 to 71, except 59. It appears that a(n) > 0 for n > 109. This has been confirmed up to n = 1000.

References

  • See A083382 for references and links to the two-dimensional case.

Crossrefs

Cf. A083382, A083414, A084927 (top view), A084928 (east-west view).

Programs

  • Mathematica
    Table[minP=n; Do[c=a+(b-1)n^2; If[GCD[c, n]==1, s=0; Do[If[PrimeQ[c+(r-1)*n], s++ ], {r, n}]; minP=Min[s, minP]], {a, n}, {b, n}]; minP, {n, 100}]
Showing 1-4 of 4 results.