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 91-93 of 93 results.

A174007 a(2n+1)=2. a(2n)= 1-n.

Original entry on oeis.org

2, 0, 2, -1, 2, -2, 2, -3, 2, -4, 2, -5, 2, -6, 2, -7, 2, -8, 2, -9, 2, -10, 2, -11, 2, -12, 2, -13, 2, -14, 2, -15, 2, -16, 2, -17, 2, -18, 2, -19, 2, -20, 2, -21, 2, -22, 2, -23, 2, -24, 2, -25, 2, -26, 2, -27, 2, -28, 2, -29, 2, -30, 2, -31, 2, -32, 2, -33, 2, -34, 2, -35, 2
Offset: 1

Views

Author

Paul Curtz, Mar 05 2010

Keywords

Comments

A064680(n)+A022998(n-1) =c(n) = 2, 2, 10, 5, 18, 8, 26, 11,.. has differences c(2n)-c(2n-1) = -5*(n-1) = -A008587(n-1).

Crossrefs

Cf. A147657.

Formula

a(n) = n/4+3/2-(-1)^n*(n/4+1/2).
a(n)= +2*a(n-2) -a(n-4). G.f.: -x*(-2+2*x^2+x^3) / ( (x-1)^2*(1+x)^2 ).
a(n+1)-a(n) = (-1)^n*A008619(n+1).
a(n) = A064680(n)-A022998(n-1).

A261790 Regular triangle read by rows: T(n,k) is the least positive number m such that k*m and k*m*(m+1)/2 are both divisible by n, with 0<=k<=n and T(0,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 3, 3, 1, 1, 8, 4, 8, 1, 1, 5, 5, 5, 5, 1, 1, 12, 3, 4, 3, 12, 1, 1, 7, 7, 7, 7, 7, 7, 1, 1, 16, 8, 16, 4, 16, 8, 16, 1, 1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 1, 20, 5, 20, 5, 4, 5, 20, 5, 20, 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 24, 12, 8, 3, 24, 4, 24, 3, 8, 12, 24, 1
Offset: 0

Views

Author

Michel Marcus, Sep 01 2015

Keywords

Comments

T(360,k) is the number of steps for a Logo turtle to return to the same orientation and same heading when using the INSPIR program with starting angle and angular increment k.

Examples

			Triangle starts:
1;
1, 1;
1, 4, 1;
1, 3, 3, 1;
1, 8, 4, 8, 1;
1, 5, 5, 5, 5, 1;
1, 12, 3, 4, 3, 12, 1;
1, 7, 7, 7, 7, 7, 7, 1;
1, 16, 8, 16, 4, 16, 8, 16, 1;
...
		

References

  • Harold Abelson and Andrea diSessa, Turtle Geometry, Artificial Intelligence Series, MIT Press, July 1986, pp. 20 and 36.
  • Brian Hayes, La tortue vagabonde, in Récréations Informatiques, Pour La Science, Belin, Paris, 1987, pp. 24-28, in French, translation from Computer Recreations, February 1984, Scientific American Volume 250, Issue 2.

Crossrefs

Cf. A011772, A022998 (2nd column).

Programs

  • Mathematica
    {1}~Join~Table[m = 1; While[Nand[Mod[k m, n] == 0, Mod[k m (m + 1)/2, n] == 0], m++]; m, {n, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 01 2015 *)
  • PARI
    T(n, k) = {if (n==0, return (1)); m=1; while(((k*m*(m+1)/2) % n) || (k*m % n), m++); m;}
    row(n) = vector(n+1, k, k--; T(n,k));
    tabl(nn) = for(n=0, nn, print(row(n)));

A267942 Interleave (n-1)^2 + 2 and (n+1)^2 + 2.

Original entry on oeis.org

3, 3, 2, 6, 3, 11, 6, 18, 11, 27, 18, 38, 27, 51, 38, 66, 51, 83, 66, 102, 83, 123, 102, 146, 123, 171, 146, 198, 171, 227, 198, 258, 227, 291, 258, 326, 291, 363, 326, 402, 363, 443, 402, 486, 443, 531, 486, 578, 531, 627, 578, 678, 627, 731, 678, 786, 731
Offset: 0

Views

Author

Paul Curtz, Jan 22 2016

Keywords

Comments

Trisections:
3, 6, 6, 27, 27, 66, 66, ... = 3*(1, 2, 2, 9, 9, 22, 22, ... ). See A056105.
3, 3, 18, 18, 51, 51, 102, ... = 3*(1, 1, 6, 6, 17, 17, ... ). See A056109.
2, 11, 11, 38, 38, 83, 83, ... (== 2 (mod 9)).
The trisections also have the signature (1,2,-2,-1,1). The corresponding main sequence is 0, 0, 0, 0, 1, 1, 3, 3, ... = A161680(n) with each term duplicated.

Examples

			a(0) = (2+13)/5, a(1) = (13+2)/5, a(2) = (5+5)/5, a(3) = (29+1)/5, ... (using first formula).
		

Crossrefs

Programs

  • Magma
    &cat [[(n-1)^2+2, (n+1)^2+2]: n in [0..50]]; // Vincenzo Librandi, Jan 23 2016
  • Mathematica
    Flatten[Table[{n^2 - 2 n + 3, n^2 + 2 n + 3}, {n, 0, 30}]] (* Vincenzo Librandi, Jan 23 2016 *)
    CoefficientList[Series[(3 - 7 x^2 + 4 x^3 + 2 x^4)/((1 - x)^3 (1 + x)^2), {x, 0, 56}], x] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    Vec((3-7*x^2+4*x^3+2*x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 22 2016
    

Formula

a(n) = (A261327(n+2) + A261327(n-3))/5.
a(n+1) = a(n) + (-1)^n * A022998(n), a(0)=3.
a(n+3) = a(n) + 3*A193356(n), a(0)=a(1)=3, a(2)=2.
a(n) = 3 + A174474(n).
a(2n) + a(2n+1) = A255844(n).
From Colin Barker, Jan 22 2016: (Start)
a(n) = (2*n^2 - 6*(-1)^n*n - 2*n + 3*(-1)^n + 21)/8.
a(n) = (n^2 - 4*n + 12)/4 for n even.
a(n) = (n^2 + 2*n + 9)/4 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
G.f.: (3 - 7*x^2 + 4*x^3 + 2*x^4) / ((1-x)^3*(1+x)^2).
(End)

Extensions

More terms from Colin Barker, Jan 22 2016
Previous Showing 91-93 of 93 results.