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

A088634 Index of the first occurrence of n in A066888.

Original entry on oeis.org

1, 3, 2, 9, 17, 28, 30, 36, 41, 54, 74, 51, 65, 92, 100, 112, 118, 132, 108, 154, 158, 161, 172, 175, 210, 197, 215, 255, 248, 239, 236, 316, 297, 291, 340, 321, 330, 345, 334, 400, 406, 402, 423, 394, 445, 452, 509, 493, 507, 481, 526, 546, 561, 584, 565, 598
Offset: 0

Views

Author

Amarnath Murthy, Oct 26 2003

Keywords

Comments

For all 0 < n < 1000, a(n) < A104272(n). - John W. Nicholson, May 22 2011

Crossrefs

Programs

  • Mathematica
    nn=100; k=0; t=Table[0,{nn}]; cnt=0; While[cntT. D. Noe, May 19 2011 *)

Extensions

More terms from David Wasserman, Aug 16 2005

A083419 Positions of records in A066888.

Original entry on oeis.org

0, 1, 8, 16, 27, 29, 35, 40, 50, 64, 91, 99, 107, 153, 157, 160, 171, 174, 196, 214, 235, 290, 320, 329, 333, 393, 444, 451, 480, 525, 545, 560, 564, 593, 662, 667, 708, 713, 730, 761, 791, 805, 865, 926, 1015, 1016, 1035, 1123, 1148, 1165, 1186, 1264, 1366
Offset: 1

Views

Author

Jason Earls, Jun 08 2003

Keywords

Crossrefs

Cf. A066888.

Programs

  • Mathematica
    m = 1500; v = PrimePi[#[[2]]] - PrimePi[#[[1]]] & /@ Partition[Accumulate[Range[0, m + 1]], 2, 1]; seq = {}; vm = -1; Do[If[v[[k + 1]] > vm, vm = v[[k + 1]]; AppendTo[seq, k]], {k, 0, m}]; seq (* Amiram Eldar, Dec 14 2019 after Harvey P. Dale at A066888 *)

Extensions

Data corrected by Amiram Eldar, Dec 14 2019

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

A190661 a(n) is the least number m such that there are at least n primes in the range (T(k-1), T(k)] for all k >= m, where T(k) is the k-th triangular number.

Original entry on oeis.org

1, 7, 16, 33, 52, 66, 79, 72, 109, 93, 121, 119, 130, 153, 169, 194, 180, 222, 235, 275, 294, 267, 256, 296, 329, 339, 333, 420, 383, 373, 372, 454, 396, 443, 449, 504, 463, 574, 559, 512, 592, 602, 596, 541, 652, 585, 683, 656, 687, 689, 708
Offset: 0

Views

Author

John W. Nicholson, May 18 2011

Keywords

Comments

All values and even whether the sequence is well defined are conjectural.
a(n) is the conjectured index of the last occurrence of n in A066888.
It is conjectured that for every n >= 0, a(n) > n.
With R_n the n-th Ramanujan prime (A104272), it is conjectured that for every n >= 0, (1/2) R_n <= a(n) < (20/13) R_n. These bounds have been verified for all n up to 8000. For most n <= 8000, we have a(n) > R_n, with exceptions listed in A190881.

Examples

			Because it appears that A066888(7) = 1 is the last 1 of that sequence, a(1) = 7.
		

Crossrefs

Extensions

Edited by T. D. Noe, May 19 2011

A065382 Number of primes between n(n+1)/2 (exclusive) and (n+1)(n+2)/2 (inclusive).

Original entry on oeis.org

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
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 05 2001

Keywords

Comments

Inspired by the weaker Legendre conjecture that there should be at least one prime between n^2 and (n+1)^2.

Examples

			a(10) = 2 because between 10*(10+1)/2=55 and (10+1)*(10+2)/2=66 there are 2 primes: 59, 61.
		

Crossrefs

Essentially the same as A066888 and A090970.

Programs

  • Mathematica
    Table[ PrimePi[n(n + 1)/2] - PrimePi[n(n - 1)/2], {n, 2, 96}]
  • Python
    from sympy import primerange
    def A065382(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

Extensions

Definition improved by Robert G. Wilson v, Apr 22 2003

A057062 Let R(i,j) be the infinite square array with antidiagonals 1; 2,3; 4,5,6; ...; the n-th prime is in antidiagonal a(n).

Original entry on oeis.org

2, 2, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25
Offset: 1

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

The smallest integer in the j-th antidiagonal is A000124(j-1). So a(n) is the index j such that A000124(j-1) <= prime(n) < A000124(j). - R. J. Mathar, Dec 02 2011

Examples

			The array begins
   1  3  6 10 15 ...
   2  5  9 14 ...
   4  8 13 ...
   7 12 ...
  11 ...
  ...
The third prime, 5, is in the 3rd antidiagonal, so a(3) = 3.
		

Crossrefs

Cf. A057045, A057048, A022846, A057057, A057054. A066888 counts how many times each positive integer appears in this sequence.
Cf. A010051.

Programs

  • Haskell
    a057062 n = a057062_list !! (n-1)
    a057062_list = f 1 [1..] where
       f j xs = (replicate (sum $ map a010051 dia) j) ++ f (j + 1) xs'
         where (dia, xs') = splitAt j xs
    -- Reinhard Zumkeller, Jul 26 2012
    
  • Mathematica
    Table[Round[Sqrt[2*Prime[n]]], {n, 100}] (* T. D. Noe, Dec 03 2011 *)
  • PARI
    a(n)=(sqrtint(8*prime(n))+1)\2 \\ Charles R Greathouse IV, Jul 26 2012
    
  • Python
    from math import isqrt
    from sympy import prime
    def A057062(n): return isqrt(prime(n)<<3)+1>>1 # Chai Wah Wu, Jun 19 2024

Formula

a(n) = round(sqrt(2*prime(n))). - Vladeta Jovovic, Jun 14 2003

A220492 Number of primes p between quarter-squares, Q(n) < p <= Q(n+1), where Q(n) = A002620(n).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 04 2013

Keywords

Comments

It appears that a(n) > 0, if n > 1.
Apparently the above comment is equivalent to the Oppermann's conjecture. - Omar E. Pol, Oct 26 2013
For n > 0, also the number of primes per quarter revolution of the Ulam Spiral. The conjecture implies that there is at least one prime in every turn after the first. - Ruud H.G. van Tol, Jan 30 2024

Examples

			When the nonnegative integers are written as an irregular triangle in which the right border gives the quarter-squares without repetitions, a(n) is the number of primes in the n-th row of triangle. See below (note that the prime numbers are in parenthesis):
---------------------------------------
Triangle                          a(n)
---------------------------------------
0;                                 0
1;                                 0
(2);                               1
(3),   4;                          1
(5),   6;                          1
(7),   8,   9;                     1
10,  (11), 12;                     1
(13), 14,  15,   16;               1
(17), 18, (19),  20;               2
21,   22, (23),  24,  25;          1
26,   27,  28,  (29), 30;          1
...
		

Crossrefs

Programs

A090970 Number of primes strictly between T(n) and T(n+1), where T(n) = n-th triangular number.

Original entry on oeis.org

1, 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: 1

Views

Author

Amarnath Murthy, Jan 03 2004

Keywords

Examples

			a(8)=3 because between T(8)=36 and T(9)=45 we have the prime numbers 37,41 and 43.
		

Crossrefs

Essentially the same as A065382 and A066888.

Programs

  • Maple
    a:= proc(n) local ct,j: ct:=0: for j from n*(n+1)/2+1 to (n+1)*(n+2)/2-1 do if isprime(j)=true then ct:=ct+1 else ct:=ct fi: od: end: seq(a(n),n=1..103); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    With[{trs=Partition[Accumulate[Range[100]],2,1]},Join[{1},Rest[ PrimePi[ #[[2]]]- PrimePi[#[[1]]]&/@trs]]] (* Harvey P. Dale, Aug 25 2015 *)
  • Python
    from sympy import primerange
    def A090970(n): return sum(1 for p in primerange((n*(n+1)>>1)+1,(n+2)*(n+1)>>1)) # Chai Wah Wu, May 22 2025

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A282518 Number of n-element subsets of [n+1] having a prime element sum.

Original entry on oeis.org

0, 1, 2, 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
Offset: 0

Views

Author

Alois P. Heinz, Feb 17 2017

Keywords

Examples

			a(1) = 1: {2}.
a(2) = 2: {1,2}, {2,3}.
a(3) = 1: {1,2,4}.
a(4) = 2: {1,2,3,5}, {1,3,4,5}.
a(5) = 2: {1,2,3,5,6}, {1,3,4,5,6}.
a(6) = 1: {1,2,3,4,6,7}.
a(7) = 2: {1,2,3,4,5,6,8}, {1,2,3,4,6,7,8}.
a(8) = 3: {1,2,3,4,5,6,7,9}, {1,2,3,5,6,7,8,9}, {1,3,4,5,6,7,8,9}.
		

Crossrefs

Similar but different: A065382, A066888, A090970.

Programs

  • Maple
    a:= proc(n) option remember; (t-> add(`if`(isprime(
           t-i), 1, 0), i=1..n+1))((n+1)*(n+2)/2)
        end:
    seq(a(n), n=0..100);

Formula

a(n) = A282516(n+1,n).
a(n) = pi((n+1)*(n+2)/2)-pi(n*(n+1)/2) for n >= 3, pi = A000720.

A083403 Write the numbers 1, 2, ... in a triangle with n terms in the n-th row; a(n) = number of squarefree integers in n-th row.

Original entry on oeis.org

1, 2, 2, 2, 4, 3, 3, 6, 6, 5, 7, 8, 8, 8, 10, 8, 10, 11, 12, 13, 15, 11, 14, 14, 16, 14, 15, 19, 19, 19, 18, 20, 19, 21, 21, 22, 24, 21, 24, 26, 22, 27, 26, 26, 27, 27, 29, 30, 30, 31, 32, 32, 33, 32, 34, 35, 35, 33, 36, 34, 36, 37, 40, 37, 42, 40, 41, 43, 42, 44, 40, 45, 44, 46
Offset: 1

Views

Author

Jason Earls, Jun 07 2003

Keywords

Examples

			Triangle begins
1 (1 squarefree)
2 3 (2 squarefree)
4 5 6 (2 squarefree)
7 8 9 10 (2 squarefree)
11 12 13 14 15 (4 squarefree)
16 17 18 19 20 21 (3 squarefree)
		

Crossrefs

Programs

  • PARI
    {ts(m)=local(r, t); r=1; for(n=1,m,t=0; for(k=r,n+r-1,if(issquarefree(k),t++)); print1(t","); r=n+r;) }
Showing 1-10 of 11 results. Next