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.

A176271 The odd numbers as a triangle read by rows.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2010

Keywords

Comments

A108309(n) = number of primes in n-th row.

Examples

			From _Philippe Deléham_, Oct 03 2011: (Start)
Triangle begins:
   1;
   3,  5;
   7,  9, 11;
  13, 15, 17, 19;
  21, 23, 25, 27, 29;
  31, 33, 35, 37, 39, 41;
  43, 45, 47, 49, 51, 53, 55;
  57, 59, 61, 63, 65, 67, 69, 71;
  73, 75, 77, 79, 81, 83, 85, 87, 89; (End)
		

Crossrefs

Programs

  • Haskell
    a176271 n k = a176271_tabl !! (n-1) !! (k-1)
    a176271_row n = a176271_tabl !! (n-1)
    a176271_tabl = f 1 a005408_list where
       f x ws = us : f (x + 1) vs where (us, vs) = splitAt x ws
    -- Reinhard Zumkeller, May 24 2012
    
  • Magma
    [n^2-n+2*k-1: k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 10 2024
    
  • Maple
    A176271 := proc(n,k)
        n^2-n+2*k-1 ;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Table[n^2-n+2*k-1, {n,15}, {k,n}]//Flatten (* G. C. Greubel, Mar 10 2024 *)
  • SageMath
    flatten([[n^2-n+2*k-1 for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 10 2024

Formula

T(n, k) = n^2 - n + 2*k - 1 for 1 <= k <= n.
T(n, k) = A005408(n*(n-1)/2 + k - 1).
T(2*n-1, n) = A016754(n-1) (main diagonal).
T(2*n, n) = A000466(n).
T(2*n, n+1) = A053755(n).
T(n, k) + T(n, n-k+1) = A001105(n), 1 <= k <= n.
T(n, 1) = A002061(n), central polygonal numbers.
T(n, 2) = A027688(n-1) for n > 1.
T(n, 3) = A027690(n-1) for n > 2.
T(n, 4) = A027692(n-1) for n > 3.
T(n, 5) = A027694(n-1) for n > 4.
T(n, 6) = A048058(n-1) for n > 5.
T(n, n-3) = A108195(n-2) for n > 3.
T(n, n-2) = A082111(n-2) for n > 2.
T(n, n-1) = A014209(n-1) for n > 1.
T(n, n) = A028387(n-1).
Sum_{k=1..n} T(n, k) = A000578(n) (Nicomachus's theorem).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A065599(n) (alternating sign row sums).
Sum_{j=1..n} (Sum_{k=1..n} T(j, k)) = A000537(n) (sum of first n rows).

A089610 Number of primes between n^2 and (n+1/2)^2.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, Dec 30 2003

Keywords

Comments

For small values of n, these numbers exhibit higher and lower values as n increases. Conjectures: After n=17 a(n) > 1. There exists an n_1 such that a(n) is < a(n+1) for all n >= n_1.
Same as the number of primes between n^2 and n^2+n. Oppermann conjectured in 1882 that a(n)>0. - T. D. Noe, Sep 16 2008

References

  • Paulo Ribenboim, The New Book of Prime Number Records, 3rd ed., 1995, Springer, p. 248.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 183.

Crossrefs

Programs

  • Haskell
    a089610 n = sum $ map a010051' [n^2 .. n*(n+1)]
    -- Reinhard Zumkeller, Jun 07 2015
  • Mathematica
    a[n_] := PrimePi[(n + 1/2)^2] - PrimePi[n^2]; Table[ a@n, {n, 100}] (* Robert G. Wilson v, May 04 2009 *)
  • PARI
    a(n) = primepi(n^2+n) - primepi(n^2); \\ Michel Marcus, May 18 2020
    

A094189 Number of primes between n^2-n and n^2 (inclusive).

Original entry on oeis.org

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

Views

Author

Jason Earls, May 25 2004

Keywords

Comments

Conjecture: for n>11, a(n)>1.
Oppermann conjectured in 1882 that a(n)>0 for n>1. - T. D. Noe, Sep 16 2008

References

  • Paulo Ribenboim, The New Book of Prime Number Records, 3rd ed., 1995, Springer, p. 248.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 183.

Crossrefs

Programs

  • Haskell
    a094189 n = sum $ map a010051' [n*(n-1) .. n^2]
    -- Reinhard Zumkeller, Jun 07 2015
  • Mathematica
    Table[PrimePi[n^2]-PrimePi[n^2-n-1],{n,100}] (* Harvey P. Dale, Jul 24 2015 *)
  • PARI
    a(n) = sum(k=n^2-n,n^2,isprime(k))
    
  • PARI
    a(n)=my(s);forprime(p=n^2-n,n^2,s++);s \\ Charles R Greathouse IV, Jan 18 2016
    

A246826 Numbers n such that there is no prime of a prime twin pair between n^2 + n and n^2 + 3*n + 2.

Original entry on oeis.org

0, 10, 26, 30, 36, 136, 156, 433
Offset: 1

Views

Author

Pierre CAMI, Sep 04 2014

Keywords

Comments

No more values for n = 434 to 45140.
Conjecture: the sequence is finite and given in full.
a(9), if it exists, is greater than 10^5. - Derek Orr, Sep 19 2014

Examples

			n = 0 only 1 between 0 and 2 so a(1) = 0.
n = 1 between 2 and 6, 3 is the first of twin pair 3, 5.
For n = 2 to 9 always at least one prime of a twin pair between n^2 + n and n^2 + 3*n + 2.
n = 10 no prime of a twin pair between 110 and 132 so a(2) = 10.
		

Crossrefs

Programs

  • PARI
    a(n)=forprime(p=n^2+n,n^2+3*n+2,if(precprime(p-1)==p-2||nextprime(p+1)==p+2,return(0)));return(1)
    n=0;while(n<10^5,if(a(n),print1(n,", "));n++) \\ Derek Orr, Sep 19 2014
Showing 1-4 of 4 results.