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.

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.

This page as a plain text file.
%I A083382 #24 Jan 02 2019 11:54:12
%S A083382 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,
%T A083382 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,
%U A083382 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
%N 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.
%C A083382 Conjectured by Schinzel (Hypothesis H2) to be always positive for n > 1.
%C A083382 The conjecture has been verified for n = prime < 790000 by Aguilar.
%C A083382 If this is true, then Legendre's conjecture is true as well. (See A014085). - _Antti Karttunen_, Jan 01 2019
%D A083382 P. Ribenboim, The New Book of Prime Number Records, Chapter 6.
%D A083382 P. Ribenboim, The Little Book Of Big Primes, Springer-Verlag, NY 1991, page 185.
%H A083382 Charles R Greathouse IV, <a href="/A083382/b083382.txt">Table of n, a(n) for n = 1..10000</a>
%H A083382 Carlos Rivera, <a href="http://www.primepuzzles.net/conjectures/conj_026.htm">The calendar-like square conjecture</a>
%H A083382 A. Schinzel and W. Sierpinski, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa4/aa432.pdf">Sur certaines hypothèses concernant les nombres premiers</a>, Acta Arithmetica 4 (1958), 185-208; erratum 5 (1958) p. 259.
%e A083382 For n = 3 the array is
%e A083382 1 2 3 (2 primes)
%e A083382 4 5 6 (1 prime)
%e A083382 7 8 9 (1 prime)
%e A083382 so a(3) = 1
%p A083382 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;
%t A083382 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}]
%t A083382 Table[Min[Count[#,_?PrimeQ]&/@Partition[Range[n^2],n]],{n,110}] (* _Harvey P. Dale_, May 29 2013 *)
%o A083382 (Haskell)
%o A083382 a083382 n = f n n a010051_list where
%o A083382    f m 0 _     = m
%o A083382    f m k chips = f (min m $ sum chin) (k - 1) chips' where
%o A083382      (chin,chips') = splitAt n chips
%o A083382 -- _Reinhard Zumkeller_, Jun 10 2012
%o A083382 (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
%Y A083382 A084927 generalizes this to three dimensions.
%Y A083382 Cf. A083415, A083383, A066888, A092556, A092557. See A083414 for primes in columns.
%Y A083382 Cf. A139326.
%Y A083382 Cf. A000720, A010051, A014085.
%K A083382 nonn,nice
%O A083382 1,9
%A A083382 _James Propp_, Jun 05 2003
%E A083382 Edited by _Charles R Greathouse IV_, Jul 07 2010