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.

A160790 Vertex number of a rectangular spiral. The first differences (A160791) are the edge lengths of the spiral. The distances between two nearest edges, that are parallel to the initial edge, are the natural numbers.

Original entry on oeis.org

0, 1, 2, 4, 7, 10, 16, 20, 30, 35, 50, 56, 77, 84, 112, 120, 156, 165, 210, 220, 275, 286, 352, 364, 442, 455, 546, 560, 665, 680, 800, 816, 952, 969, 1122, 1140, 1311, 1330, 1520, 1540, 1750, 1771, 2002, 2024, 2277, 2300, 2576, 2600, 2900, 2925, 3250, 3276, 3627, 3654, 4032, 4060, 4466, 4495, 4930, 4960, 5425
Offset: 0

Views

Author

Omar E. Pol, May 29 2009

Keywords

Crossrefs

Programs

  • Maple
    A160791 := proc(n) if type(n,'odd') then ceil(n/2) ; else A000217(n/2) ; end if; end proc:
    A160790 := proc(n) if n = 0 then 0; else add(A160791(i),i=0..n) ; end if; end proc:
    seq(A160790(n),n=0..60) ;
  • Mathematica
    Table[(2*n + 3 + (-1)^n)*(2*n + 3 - 3*(-1)^n)*(2*n + 15 + 5*(-1)^n)/ 384, {n, 0, 60}] (* Michael De Vlieger, Mar 31 2015 *)
  • PARI
    Vec(-x*(-1-x+x^2) / ( (1+x)^3*(x-1)^4 ) + O(x^80)) \\ Michel Marcus, Apr 01 2015

Formula

a(n) = +a(n-1) +3*a(n-2) -3*a(n-3) -3*a(n-4) +3*a(n-5) +a(n-6) -a(n-7).
G.f.: -x*(-1-x+x^2) / ( (1+x)^3*(x-1)^4 ).
a(n) = (2*n+3+(-1)^n)*(2*n+3-3*(-1)^n)*(2*n+15+5*(-1)^n)/384. - Luce ETIENNE, Mar 31 2015

Extensions

Edited by Omar E. Pol, Feb 08 2010

A160791 a(n) = binomial(N, n - N) where N = 1 + floor(n/2).

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 6, 4, 10, 5, 15, 6, 21, 7, 28, 8, 36, 9, 45, 10, 55, 11, 66, 12, 78, 13, 91, 14, 105, 15, 120, 16, 136, 17, 153, 18, 171, 19, 190, 20, 210, 21, 231, 22, 253, 23, 276, 24, 300, 25, 325, 26, 351, 27, 378, 28, 406, 29, 435, 30, 465
Offset: 0

Views

Author

Omar E. Pol, May 29 2009

Keywords

Crossrefs

First differences of A160790.

Programs

  • Magma
    [(n^2+6*n+4+(n^2-2*n-4)*(-1)^n)/16: n in [0..70]]; // Vincenzo Librandi, Apr 02 2015
  • Maple
    a := proc(n) 1 + floor(n/2); binomial(%, n - %) end:
    seq(a(n), n = 0..60);  # Peter Luschny, Jul 02 2024
  • Mathematica
    Join[{0}, Riffle[Range[30], Range[30] (Range[30] + 1)/2]] (* Bruno Berselli, Jul 15 2013 *)
    LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 1, 1, 2, 3, 3, 6}, 60] (* Vincenzo Librandi, Apr 02 2015 *)
  • PARI
    Vec(x*(1+x-x^2)/(1-x^2)^3 + O(x^80)) \\ Michel Marcus, Apr 01 2015
    

Formula

From R. J. Mathar, Feb 09 2010: (Start)
a(2n+1) = n+1 and a(2n) = A000217(n) with a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
G.f.: x*(1+x-x^2)/(1-x^2)^3. (End)
a(n) = (n^2+6*n+4+(n^2-2*n-4)*(-1)^n)/16. - Luce ETIENNE, Mar 31 2015
E.g.f.: (x*(x+4)*cosh(x) + (3*x+4)*sinh(x))/8. - G. C. Greubel, Apr 26 2018

Extensions

a(0) = 0 prepended and new name by Peter Luschny, Jul 02 2024

A160793 Natural numbers and the sum of first n primes interleaved.

Original entry on oeis.org

1, 2, 2, 5, 3, 10, 4, 17, 5, 28, 6, 41, 7, 58, 8, 77, 9, 100, 10, 129, 11, 160, 12, 197, 13, 238, 14, 281, 15, 328, 16, 381, 17, 440, 18, 501, 19, 568, 20, 639, 21, 712, 22, 791, 23, 874, 24, 963, 25, 1060, 26, 1161, 27, 1264, 28, 1371, 29, 1480
Offset: 1

Views

Author

Omar E. Pol, May 29 2009

Keywords

Comments

Also first differences of A160792: length of edges of a square spiral related to prime numbers A000040 whose vertices are the numbers A160792.
A000027 and A007504 interleaved. - Omar E. Pol, Oct 31 2011

Crossrefs

Programs

  • Mathematica
    Module[{nn=30,sp},sp=Accumulate[Prime[Range[nn]]];Riffle[Range[nn],sp]] (* Harvey P. Dale, May 22 2018 *)

Formula

a(2n-1) = n, a(2n) = A007504(n). - Omar E. Pol, Oct 31 2011

Extensions

More terms from Sean A. Irvine, Oct 31 2011
New definition from Omar E. Pol, Oct 31 2011

A160794 Vertex number of a rectangular spiral related to Fibonacci numbers and prime numbers. The distances between nearest edges of the spiral that are parallel to the initial edge are the Fibonacci numbers, while the distances between nearest edges perpendicular to the initial edge are the prime numbers.

Original entry on oeis.org

0, 1, 2, 5, 7, 13, 17, 28, 35, 53, 65, 94, 114, 156, 189, 248, 302, 380, 468, 569, 712, 842, 1074, 1235, 1611, 1809, 2418, 2657, 3643, 3925, 5521, 5850, 8433, 8815, 12995, 13436, 20200, 20702, 31647, 32216, 49926, 50566, 79222, 79935, 126302, 127094, 202118
Offset: 0

Views

Author

Omar E. Pol, May 29 2009

Keywords

Crossrefs

Programs

  • Maple
    A160794 := proc(n) option remember: if(n<=1)then return n: fi: if(n mod 2 = 0)then return procname(n-1)+add(combinat[fibonacci](j), j=1..n/2): fi: return procname(n-1)+add(ithprime(j), j=1..floor(n/2))+1: end: seq(A160794(n), n=0..46); # Nathaniel Johnston, Jun 16 2011

Formula

a(2n) = a(2n-1) + Sum_{j=1..n} Fibonacci(j); a(2n+1) = a(2n) + 1 + Sum_{j=1..n} prime(j) for n >= 1. - Nathaniel Johnston, Jun 16 2011

Extensions

Terms after a(12) and edited by Nathaniel Johnston, Jun 16 2011
Showing 1-4 of 4 results.