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.

Previous Showing 21-24 of 24 results.

A027694 a(n) = n^2 + n + 9.

Original entry on oeis.org

9, 11, 15, 21, 29, 39, 51, 65, 81, 99, 119, 141, 165, 191, 219, 249, 281, 315, 351, 389, 429, 471, 515, 561, 609, 659, 711, 765, 821, 879, 939, 1001, 1065, 1131, 1199, 1269, 1341, 1415, 1491, 1569, 1649, 1731, 1815, 1901, 1989, 2079, 2171, 2265, 2361, 2459, 2559
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

For n > 3, a(n) = A176271(n+1,5). - Reinhard Zumkeller, Apr 13 2010
G.f.: (-9 + 16*x - 9*x^2)/(x-1)^3. - R. J. Mathar, Feb 07 2011
a(0) = 9, a(n) = a(n-1) + 2*n. - Vincenzo Librandi, Feb 07 2011
Sum_{n>=0} 1/a(n) = Pi*tanh(Pi*sqrt(35)/2)/sqrt(35). - Amiram Eldar, Jan 17 2021
From Elmo R. Oliveira, Oct 28 2024: (Start)
E.g.f.: exp(x)*(9 + 2*x + x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A108309 Consider the triangle of odd numbers where the n-th row has the next n odd numbers. The sequence is the number of primes in the n-th row.

Original entry on oeis.org

0, 2, 2, 3, 2, 3, 3, 4, 4, 5, 3, 4, 6, 4, 6, 6, 4, 6, 7, 6, 8, 7, 5, 8, 9, 8, 7, 8, 9, 8, 9, 10, 10, 8, 10, 12, 5, 12, 12, 13, 9, 11, 11, 9, 13, 14, 9, 14, 14, 10, 10, 19, 14, 12, 12, 12, 12, 16, 15, 16, 15, 13, 18, 16, 16, 12, 16, 17, 15, 16, 18, 14, 15, 20, 18, 19, 14, 19, 20, 18, 16
Offset: 1

Views

Author

Giovanni Teofilatto, Jul 25 2005

Keywords

Comments

Except for the initial term, a(n)>=2 because in the interval 2n-1 of odd numbers there are always at least two primes.
For n>2, this is the same as the number of primes between n^2-n and n^2+n, which is the sum of A089610 and A094189. - T. D. Noe, Sep 16 2008
a(n) = SUM(A010051(A176271(n,k)): 1<=k<=n). - Reinhard Zumkeller, Apr 13 2010
From Pierre CAMI, Sep 03 2014: (Start)
For n>1 a(n)~floor(1/2 + n/log(n)).
The number of primes < n^2 is ~ n^2/2/log(n) by the prime number theorem, as a(n) ~ floor(1/2 + n/log(n)) we have:
n^2/2/log(n) ~ 1 + floor(1/2 + 2/log(2)) + floor(1/2 + 3/log(3)) + floor(1/2 + 4/log(4)) + ... + floor(1/2 + (n-1)/log(n-1)) + floor(1/2 + n/log(n)).
For n=16000 the number of primes < n^2 is 13991985, the sum: 1 + floor(1/2 + 2/log(2)) + floor(1/2 + 3/log(3)) + floor(1/2 + 4/log(4))+ ... + floor(1/2 + (n-1)/log(n-1)) + floor(1/2 + n/log(n)) is 13991101 and (n^2)/(2*log(n)) is 13222671.
So between n^2+n and n^2+3*n there are n odd numbers and ~floor(1/2 + n/log(n)) prime numbers.
The twin primes are of the form T1=n^2+n-1 and T2=n^2+n+1, or n^2+n+T1 and n^2+n+T2 with T1<=2*n-1, or n^2+n+P and n^2+n+P(-2 or +2) with P prime <=2*n-1.
(End)

Examples

			Triangle begins:
1: 1 -> 0 primes,
2: 3,5 -> 2 primes,
3: 7,9,11 -> 2 primes,
4: 13,15,17,19 -> 3 primes.
		

Crossrefs

Programs

  • Haskell
    a108309 = sum . (map a010051) . a176271_row
    -- Reinhard Zumkeller, May 24 2012
  • Maple
    seq(numtheory:-pi(n^2+n-1)-numtheory:-pi(n^2-n),n=1..100); # Robert Israel, Sep 03 2014
  • Mathematica
    f[n_] := PrimePi[n^2 + n - 1] - PrimePi[n^2 - n]; Table[f[n], {n, 81}] (* Ray Chandler, Jul 26 2005 *)

Extensions

Edited and extended by Ray Chandler, Jul 26 2005

A065599 If n odd, a(n) = n^2 else a(n) = n.

Original entry on oeis.org

0, 1, 2, 9, 4, 25, 6, 49, 8, 81, 10, 121, 12, 169, 14, 225, 16, 289, 18, 361, 20, 441, 22, 529, 24, 625, 26, 729, 28, 841, 30, 961, 32, 1089, 34, 1225, 36, 1369, 38, 1521, 40, 1681, 42, 1849, 44, 2025, 46, 2209, 48, 2401, 50, 2601, 52, 2809, 54, 3025, 56, 3249
Offset: 0

Views

Author

George E. Antoniou, Dec 01 2001

Keywords

Comments

a(n) = ABS(alternating sum of n-th row of the triangle in A176271), n>0. [Reinhard Zumkeller, Apr 13 2010]

Crossrefs

Programs

  • Mathematica
    Table[ n^(Mod[n, 2] + 1), {n, 1, 60} ]
    LinearRecurrence[{0,3,0,-3,0,1},{0,1,2,9,4,25},80] (* Harvey P. Dale, Sep 10 2017 *)
  • PARI
    a(n) = { if (n%2, n^2, n) } \\ Harry J. Smith, Oct 23 2009

Formula

a(n) = n^( n (mod 2) + 1 ).
O.g.f.: (x + 2*x^2 + 6*x^3 - 2*x^4 + x^5)/(1 - x^2)^3. - Len Smiley, Dec 04 2001
a(n) = A000217(n)-(-1)^n*A000217(n-1) with A000217(-1)=0. - Bruno Berselli, Jun 07 2013
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - Wesley Ivan Hurt, Apr 26 2021
a(n) = n*((n+1)-(n-1)*(-1)^n)/2. - Aaron J Grech, Sep 03 2024
E.g.f.: x*(cosh(x) + (1 + x)*sinh(x)). - Stefano Spezia, Sep 26 2024

A223134 Number of distinct sums i+j+k with i,j,k >= 0, i*j*k <= n.

Original entry on oeis.org

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

Views

Author

Robert Price, Jun 12 2013

Keywords

Comments

Appears to be essentially the same as A176271, A140139, A130773, A062545. - R. J. Mathar, Aug 23 2024

Crossrefs

Programs

  • Mathematica
    f[n_] := Length[Complement[Union[Flatten[Table[If[i*j*k <= n, {i + j + k}], {i, 0, n}, {j, 0, n}, {k, 0, n}], 2]], {Null}]]; Table[f[n], {n, 0, 100}]
Previous Showing 21-24 of 24 results.