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-3 of 3 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

A139325 Triangle read by rows: T(n,k) = number of primes in the k-th row of the square of the first n^2 odd numbers written consecutively in rows of length n, 1<=k<=n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 14 2008

Keywords

Comments

A139326(n) = Min{T(n,k): 1<=k<=n};
A139327(n) = Max{T(n,k): 1<=k<=n};
A139328(n) gives sums of rows;
T(n,1) = A099802(n) - 1.

Crossrefs

Cf. A083415.

A139327 Write the first n^2 odd numbers consecutively in n rows of length n: a(n) = maximal number of primes in a row.

Original entry on oeis.org

0, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 8, 9, 10, 10, 10, 11, 11, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18, 18, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 29, 29, 29, 29, 29, 29, 30, 30, 31, 31, 31, 32, 33, 33, 33, 33, 33
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 14 2008

Keywords

Comments

a(n) = Max{A139325(n,k): 1<=k<=n}.

Examples

			a(4)=Max{#{3,5,7},#{11,13},#{17,19,23},#{29,31}}=Max{3,2,3,2}=3:
..1 ...3 ...5 ...7 ... primes in first row = {3,5,7},
..9 ..11 ..13 ..15 ... primes in 2nd row = {11,13},
.17 ..19 ..21 ..23 ... primes in 3rd row = {17,19},
.25 ..27 ..29 ..31 ... primes in 4th row = {29,31}.
		

Crossrefs

Cf. A139326.
Showing 1-3 of 3 results.