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

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

Original entry on oeis.org

0, 1, 3, 5, 10, 13, 23, 27, 44, 49, 77, 83, 124, 131, 189, 197, 274, 283, 383, 393, 522, 533, 693, 705, 902, 915, 1153, 1167, 1448, 1463, 1791, 1807, 2188, 2205, 2645, 2663, 3164, 3183, 3751, 3771, 4410, 4431, 5143, 5165, 5956, 5979, 6853, 6877, 7840, 7865
Offset: 0

Views

Author

Omar E. Pol, May 29 2009

Keywords

Comments

First differences give A160793. - Omar E. Pol, Oct 31 2011

Crossrefs

Programs

  • Maple
    A160792 := proc(n) option remember: if(n<=1)then return n: fi: if(n mod 2 = 0)then return procname(n-1)+add(ithprime(j),j=1..n/2): fi: return procname(n-1)+ceil(n/2): end: seq(A160792(n),n=0..49); # Nathaniel Johnston, Jun 16 2011

Formula

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

Extensions

Terms after a(10) and edited by Nathaniel Johnston, Jun 16 2011

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

A160795 First differences of A160794.

Original entry on oeis.org

1, 1, 3, 2, 6, 4, 11, 7, 18, 12, 29, 20, 42, 33, 59, 54, 78, 88, 101, 143, 130, 232, 161, 376, 198, 609, 239, 986, 282, 1596, 329, 2583, 382, 4180, 441, 6764, 502, 10945, 569, 17710, 640, 28656, 713, 46367, 792, 75024, 875, 121392, 964, 196417, 1061, 317810, 1162, 514228, 1265, 832039, 1372
Offset: 1

Views

Author

Omar E. Pol, May 29 2009

Keywords

Comments

Length of the n-th edge of a square spiral related to Fibonacci numbers and prime numbers.

Crossrefs

Showing 1-4 of 4 results.