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 11-13 of 13 results.

A088439 a(3n) = 3n, otherwise a(n) = 1.

Original entry on oeis.org

0, 1, 1, 3, 1, 1, 6, 1, 1, 9, 1, 1, 12, 1, 1, 15, 1, 1, 18, 1, 1, 21, 1, 1, 24, 1, 1, 27, 1, 1, 30, 1, 1, 33, 1, 1, 36, 1, 1, 39, 1, 1, 42, 1, 1, 45, 1, 1, 48, 1, 1, 51, 1, 1, 54, 1, 1, 57, 1, 1, 60, 1, 1, 63, 1, 1, 66, 1, 1, 69, 1, 1, 72, 1, 1, 75, 1, 1, 78, 1, 1, 81, 1, 1, 84, 1, 1, 87, 1, 1, 90, 1, 1
Offset: 0

Views

Author

Roger L. Bagula, Nov 09 2003

Keywords

Crossrefs

Programs

  • Magma
    [n mod 3 eq 0 select n else 1: n in [0..100]];  // Bruno Berselli, Mar 11 2011
    
  • Mathematica
    Table[If[Divisible[n,3],n,1],{n,0,100}] (* or *) LinearRecurrence[ {0,0,2,0,0,-1},{0,1,1,3,1,1},100] (* Harvey P. Dale, Jun 18 2018 *)
  • SageMath
    def A088439(n): return 1 if (n%3) else n
    [A088439(n) for n in range(121)] # G. C. Greubel, Dec 05 2022

Formula

From Bruno Berselli, Mar 11 2011: (Start)
G.f.: x*(1+x+3*x^2-x^3-x^4)/(1-x^3)^2.
a(n) = n^A079978(n).
a(n) = 3*A175676(n-1) + A011655(n) for n>0. (End)
E.g.f.: (1/3)*(x+2)*exp(x) - (2/3)*exp(-x/2)*( cos(sqrt(3)*x/2) + x*sin((Pi + 3*sqrt(3)*x)/6) ). - G. C. Greubel, Dec 05 2022

A131805 Row sums of triangular array T: T(j,k) = -(k+1)/2 for odd k, T(j,k) = 0 for k = 0, T(j,k) = j+1-k/2 for even k > 0; 0 <= k <= j.

Original entry on oeis.org

0, -1, 1, 0, 4, 3, 9, 8, 16, 15, 25, 24, 36, 35, 49, 48, 64, 63, 81, 80, 100, 99, 121, 120, 144, 143, 169, 168, 196, 195, 225, 224, 256, 255, 289, 288, 324, 323, 361, 360, 400, 399, 441, 440, 484, 483, 529, 528, 576, 575, 625, 624, 676, 675, 729, 728, 784, 783, 841
Offset: 0

Views

Author

Klaus Brockhaus, Jul 18 2007

Keywords

Comments

Interleaving of A000290 and A067998 (starting at second term).
First differences are -1, 2, -1, 4, -1, 6, -1, 8, -1, 10, ...: a(n+1) - a(n) = (-1)^(n+1)*A124625(n+2).
Main diagonal of T is in A001057, antidiagonal sums are in A131804.

Examples

			First seven rows of T are
[ 0 ],
[ 0, -1 ],
[ 0, -1, 2 ],
[ 0, -1, 3, -2 ],
[ 0, -1, 4, -2, 3 ],
[ 0, -1, 5, -2, 4, -3 ],
[ 0, -1, 6, -2, 5, -3, 4 ]
		

Crossrefs

Cf. A000290 (n^2), A067998 (n^2-2*n), A124625, A001057, A131804.
Cf. A131118.

Programs

  • Magma
    m:=59; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do for k:=2 to j do if k mod 2 eq 0 then M[j, k]:= -k div 2; else M[j, k]:=j-(k div 2); end if; end for; end for; [ &+[ M[j, k]: k in [1..j] ]: j in [1..m] ];
    
  • Magma
    m:=29; &cat[ [ n^2, n^2-1 ]: n in [0..m] ];
    
  • Maxima
    makelist((2*n*(n-1)+(2*n+3)*(-1)^n-3)/8,n,0,58); /* Bruno Berselli, Mar 27 2012 */
  • PARI
    {m=58; for(n=0, m, r=n%2; print1(((n-r)/2)^2-r, ","))}
    

Formula

a(0) = 0; a(n) = a(n-1) - (n mod 2) + n*(1 - (n mod 2)) for n > 0.
G.f.: x*(-1+2*x+x^2)/((1-x)^3*(1+x)^2).
a(n) = -A131118(2n) = (2n(n-1)+(2n+3)(-1)^n-3)/8. - Bruno Berselli, Mar 27 2012

A216369 a(n) = !(n-1) mod n.

Original entry on oeis.org

0, 0, 1, 2, 4, 2, 6, 6, 1, 6, 1, 2, 10, 8, 4, 6, 13, 8, 9, 6, 13, 10, 21, 14, 14, 16, 10, 22, 17, 26, 2, 6, 1, 4, 34, 26, 5, 10, 10, 6, 4, 8, 16, 10, 19, 2, 18, 38, 48, 36, 13, 42, 13, 44, 34, 22, 28, 12, 28, 26, 22, 60, 55, 38, 49, 32, 65, 38, 67, 36, 68, 62
Offset: 1

Views

Author

Michel Lagneau, Sep 05 2012

Keywords

Comments

!n is a subfactorial number (A000166).

Examples

			a(7)=6 because !(7-1) = 265, and 265 == 6 mod 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory): f:=n->sum(n!*(((-1)^k)*1/k!), k=0..n):for n from 1 to 150 do:  x:=irem(f(n-1),n): printf(`%d, `, x):od:
Previous Showing 11-13 of 13 results.