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

A083383 Positions of records in A083382.

Original entry on oeis.org

1, 2, 9, 26, 42, 57, 75, 76, 103, 116, 122, 143, 151, 172, 191, 197, 224, 236, 251, 266, 288, 316, 327, 338, 356, 372, 385, 401, 451, 482, 490, 501, 541, 558, 578, 586, 621, 636, 644, 670, 678, 692, 724, 735, 776, 801, 826, 851, 864, 872, 890, 906, 915, 924
Offset: 0

Views

Author

N. J. A. Sloane, Jun 06 2003

Keywords

Programs

  • Haskell
    a083383 n = a083383_list !! (n-1)
    a083383_list = 1 : f 0 [2..] (tail a083382_list) where
       f m (x:xs) (y:ys) | y <= m    = f m xs ys
                         | otherwise = x : f y xs ys
    -- Reinhard Zumkeller, Jun 10 2012

Extensions

More terms from Vladeta Jovovic, Jun 06 2003

A066888 Number of primes p between triangular numbers T(n) < p <= T(n+1).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 06 2003

Keywords

Comments

It is conjectured that for n > 0, a(n) > 0. See also A190661. - John W. Nicholson, May 18 2011
If the above conjecture is true, then for any k > 1 there is a prime p > k such that p <= (n+1)(n+2)/2, where n = floor(sqrt(2k)+1/2). Ignoring the floor function we can obtain a looser (but nicer) lower bound of p <= 1 + k + 2*sqrt(2k). - Dmitry Kamenetsky, Nov 26 2016

Examples

			Write the numbers 1, 2, ... in a triangle with n terms in the n-th row; a(n) = number of primes in n-th row.
Triangle begins
   1              (0 primes)
   2  3           (2 primes)
   4  5  6        (1 prime)
   7  8  9 10     (1 prime)
  11 12 13 14 15  (2 primes)
		

Crossrefs

Cf. A083382.
Essentially the same as A065382 and A090970.

Programs

  • Mathematica
    Table[PrimePi[(n^2 + n)/2] - PrimePi[(n^2 - n)/2], {n, 96}] (* Alonso del Arte, Sep 03 2011 *)
    PrimePi[#[[2]]]-PrimePi[#[[1]]]&/@Partition[Accumulate[Range[0,100]],2,1] (* Harvey P. Dale, Jun 04 2019 *)
  • PARI
    { tp(m)=local(r, t); r=1; for(n=1,m,t=0; for(k=r,n+r-1,if(isprime(k),t++)); print1(t","); r=n+r; ) }
    
  • PARI
    {tpf(m)=local(r, t); r=1; for(n=1,m,t=0; for(k=r,n+r-1,if(isprime(k),t++); print1(k" ")); print1(" ("t" prime)"); print(); r=n+r;) }
    
  • Python
    from sympy import primerange
    def A066888(n): return sum(1 for p in primerange((n*(n+1)>>1)+1,((n+2)*(n+1)>>1)+1)) # Chai Wah Wu, May 22 2025

Formula

a(n) = pi(n*(n+1)/2) - pi(n*(n-1)/2).
a(n) equals the number of occurrences of n+1 in A057062. - Esko Ranta, Jul 29 2011

Extensions

More terms from Vladeta Jovovic and Jason Earls, Jun 06 2003
Offset corrected by Daniel Forgues, Sep 05 2012

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

A083415 Triangle read by rows: T(n,k) is defined as follows. Write the numbers from 1 to n^2 consecutively in n rows of length n; T(n,k) = number of primes in k-th row.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, following a suggestion of Wouter Meeussen, Jun 10 2003

Keywords

Comments

Sum(T(n,k): 1<=k<=n) = A038107(n); T(n,1)=A000720(n); T(n,2)=A060715(n) for n>1. - Reinhard Zumkeller, Jan 07 2004

Examples

			{0}
{1, 1}
{2, 1, 1} from / 1 2 3 / 4 5 6 / 7 8 9 /
{2, 2, 1, 1}
{3, 1, 2, 2, 1}
{3, 2, 2, 2, 1, 1}
		

References

  • Paulo Ribenboim, "The Little Book Of Big Primes," Springer-Verlag, NY 1991, page 185.

Crossrefs

Programs

  • Haskell
    a083415 n k = a083415_row n !! (k-1)
    a083415_row n = f n a010051_list where
       f 0 _     = []
       f k chips = (sum chin) : f (k - 1) chips' where
         (chin,chips') = splitAt n chips
    a083415_tabl = map a083415_row [1..]
    -- Reinhard Zumkeller, Jun 10 2012
  • Mathematica
    Table[PrimePi[m n]-PrimePi[(m-1) n], {n, 17}, {m, n}]

A084927 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 "top view" that can have primes.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jun 12 2003

Keywords

Comments

This is a three-dimensional generalization of A083414.

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 column is (1,10,19), the second is (2,11,20), etc. Only columns whose tops are relatively prime to n are counted. In this case, columns starting with 3, 6 and 9 cannot have primes. a(n) = 0 for n = 1, 25, 55 and the primes from 5 to 83, except 67 and 79. It appears that a(n) > 0 for n > 83. This has been confirmed up to n = 1000.
		

References

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

Crossrefs

Cf. A083382, A083414, A084928 (east-west view), A084929 (north-south view).

Programs

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

A191225 Number of Ramanujan primes R_k between triangular numbers T(n-1) < R_k <= T(n).

Original entry on oeis.org

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

Views

Author

John W. Nicholson, May 27 2011

Keywords

Comments

The function eta(x), A191228, returns the greatest value of k of R_k <= x, and where R_k is the k-th Ramanujan prime (A104272).

Examples

			Write the numbers 1, 2, ... in a triangle with n terms in the n-th row; a(n) = number of Ramanujan primes in n-th row.
Triangle begins
1                 (0 Ramanujan primes, eta(1) = 0)
2  3              (1 Ramanujan primes, eta(3) - eta(1) = 1)
4  5  6           (0 Ramanujan primes, eta(6) - eta(3) = 0)
7  8  9  10       (0 Ramanujan primes, eta(10) - eta(6) = 0)
11 12 13 14 15    (1 Ramanujan primes, eta(15) - eta(10) = 1)
16 17 18 19 20 21 (1 Ramanujan primes, eta(21) - eta(15) = 1)
		

Crossrefs

Programs

  • Mathematica
    terms = 100; nn = terms^2; R = Table[0, {nn}]; s = 0;
    Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s+1]] = k], {k, Prime[3 nn]}];
    A104272 = R + 1;
    eta = Table[Boole[MemberQ[A104272, k]], {k, 1, nn}] // Accumulate;
    T[n_] := n(n+1)/2;
    a[1] = 0; a[n_] := eta[[T[n]]] - eta[[T[n-1]]];
    Array[a, terms] (* Jean-François Alcover, Nov 07 2018, using T. D. Noe's code for A104272 *)
  • Perl
    use ntheory ":all"; sub a191225 { my $n = shift; ramanujan_prime_count( (($n-1)*$n)/2+1, ($n*($n+1))/2 ); } say a191225($) for 1..10; # _Dana Jacobsen, Dec 30 2015

Formula

a(n) = eta(T(n))- eta(T(n-1)).

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

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

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 14 2008

Keywords

Comments

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

Examples

			a(4)=Min{#{3,5,7},#{11,13},#{17,19,23},#{29,31}}=Min{3,2,3,2}=2:
..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

A191226 First occurrence of number n of Ramanujan primes in A191225.

Original entry on oeis.org

1, 2, 12, 22, 29, 36, 65, 69, 117, 118, 73, 100, 108, 154, 161, 200, 254, 172, 274, 239, 340, 321, 334, 330, 345, 471, 378, 481, 357, 526, 522, 515, 610, 635, 612, 655, 648, 792, 809, 731, 797, 594, 806, 851, 988, 886, 963, 933, 1005, 1111, 927, 1124, 970
Offset: 0

Views

Author

John W. Nicholson, May 28 2011

Keywords

Crossrefs

A191227 Last known occurrence of number n of Ramanujan primes in A191225.

Original entry on oeis.org

79, 194, 153, 284, 420, 333, 454, 592, 504, 412, 652, 512, 486, 617, 613, 660, 1130, 753, 1002, 849, 1060, 957, 1034, 1037, 1198, 961, 969, 1056, 1368, 1400, 1264, 1314, 1301, 1683, 1510, 1571, 1532, 1625, 1771, 1810, 1745, 1907, 1961, 1877, 1851, 2104, 2097
Offset: 0

Views

Author

John W. Nicholson, May 28 2011

Keywords

Crossrefs

Showing 1-10 of 11 results. Next