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-3 of 3 results.

A159966 Lodumo_4 of A102370 (sloping binary numbers).

Original entry on oeis.org

0, 3, 2, 1, 4, 7, 6, 5, 8, 11, 10, 9, 12, 15, 14, 13, 16, 19, 18, 17, 20, 23, 22, 21, 24, 27, 26, 25, 28, 31, 30, 29, 32, 35, 34, 33, 36, 39, 38, 37, 40, 43, 42, 41, 44, 47, 46, 45, 48, 51, 50, 49, 52, 55, 54, 53, 56, 59, 58, 57, 60, 63, 62, 61, 64, 67, 66, 65, 68, 71, 70, 69, 72
Offset: 0

Views

Author

Philippe Deléham, Apr 28 2009

Keywords

Comments

A permutation of the nonnegative integers.
A092486 preceded by a zero. - Philippe Deléham, May 05 2009
Fixed points are the even numbers. - Wesley Ivan Hurt, Oct 16 2015

Crossrefs

Programs

  • Magma
    [n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n) div 4) : n in [0..100]]; // Wesley Ivan Hurt, Oct 16 2015
    
  • Maple
    A159966:=n->n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4): seq(A159966(n), n=0..100); # Wesley Ivan Hurt, Oct 16 2015
  • Mathematica
    Table[n - (1 - (-1)^n) (-1)^((2 n + 1 - (-1)^n)/4), {n, 0, 40}] (* or *) CoefficientList[Series[(3 x - 4 x^2 + 3 x^3)/((x - 1)^2 (1 + x^2)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Oct 16 2015 *)
    LinearRecurrence[{2,-2,2,-1},{0,3,2,1},80] (* Harvey P. Dale, Jul 02 2022 *)
  • PARI
    concat(0, Vec((3*x-4*x^2+3*x^3)/((x-1)^2*(1+x^2)) + O(x^100))) \\ Altug Alkan, Oct 17 2015

Formula

a(n) = lod_4 (A102370(n)).
From Wesley Ivan Hurt, Oct 16 2015: (Start)
G.f.: (3*x-4*x^2+3*x^3)/((x-1)^2*(1+x^2)).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4), n>3.
a(n) = n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4).
a(2n) = A005843(n); a(2n+1) = A166549(n).
a(n+1) - a(n) = A132429(n)*(-1)^n. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Nov 28 2023

A244953 a(n) = Sum_{i=0..n} (-i mod 4).

Original entry on oeis.org

0, 3, 5, 6, 6, 9, 11, 12, 12, 15, 17, 18, 18, 21, 23, 24, 24, 27, 29, 30, 30, 33, 35, 36, 36, 39, 41, 42, 42, 45, 47, 48, 48, 51, 53, 54, 54, 57, 59, 60, 60, 63, 65, 66, 66, 69, 71, 72, 72, 75, 77, 78, 78, 81, 83, 84, 84, 87, 89, 90, 90, 93, 95, 96, 96, 99
Offset: 0

Views

Author

Wesley Ivan Hurt, Jul 08 2014

Keywords

Comments

Partial sums of A158459.
Similar to A047271 with every third term repeated.

Examples

			To quickly generate terms of the sequence: start with zero for n=0, then add 3 more for n=1, then add 2 more for n=2, add 1 more..., then add 0..., and repeat.
		

Crossrefs

Cf. A158459. Same members as A047271. Similar to A130482.

Programs

  • Magma
    [&+[-i mod 4: i in [0..n]]: n in [0..70]]; // Bruno Berselli, Jul 09 2014
  • Maple
    A244953:=n->add(-i mod 4, i=0..n): seq(A244953(n), n=0..50);
  • Mathematica
    Table[Sum[Mod[-i, 4], {i, 0, n}], {n, 0, 50}]
    Table[1 + n + (2 (1 + n) - (1 + (-1)^n) (1 + 2 I^(n (n + 1))))/4, {n, 0, 70}] (* Bruno Berselli, Jul 09 2014 *)
    LinearRecurrence[{1,0,0,1,-1},{0,3,5,6,6},70] (* Harvey P. Dale, Oct 29 2023 *)
  • PARI
    a(n) = sum(i=0, n, -i % 4); \\ Michel Marcus, Jul 09 2014
    

Formula

a(n) = Sum_{i=0..n} A158459(i).
From Bruno Berselli, Jul 09 2014: (Start)
G.f.: (3 + 2*x + x^2)/((1 + x)*(1 - x)^2*(1 + x^2)).
a(n) = 1 + n + ( 2*(1 + n) - (1 + (-1)^n)*(1 + 2*i^(n*(n+1))) )/4, where i = sqrt(-1).
a(n) = 6 + Sum_{i=1..3}((4-i)*floor((n-i)/4)). (End)
a(n) = a(n-1) + a(n-4) - a(n-5). - Robert Israel, Jul 09 2014
a(n) = (3*n + 4 - (n mod 4 - 2)^2)/2. - Thomas Klemm, Aug 21 2022

A306279 Numbers congruent to 3 or 18 mod 22.

Original entry on oeis.org

3, 18, 25, 40, 47, 62, 69, 84, 91, 106, 113, 128, 135, 150, 157, 172, 179, 194, 201, 216, 223, 238, 245, 260, 267, 282, 289, 304, 311, 326, 333, 348, 355, 370, 377, 392, 399, 414, 421, 436, 443, 458, 465, 480, 487, 502, 509, 524, 531, 546, 553, 568
Offset: 1

Views

Author

Davis Smith, Feb 02 2019

Keywords

Crossrefs

Programs

  • Maple
    seq(seq(22*i+j, j=[3, 18]), i=0..200);
  • Mathematica
    Select[Range[200], MemberQ[{3, 18}, Mod[#, 22]] &]
    Flatten[Table[{22n + 3, 22n + 18}, {n, 0, 43}]] (* Alonso del Arte, Feb 18 2019 *)
  • PARI
    for(n=3, 678, if((n%22==3) || (n%22==18), print1(n, ", ")))
    
  • PARI
    vector(62,n,11*n-6+2*(-1)^n)
    
  • PARI
    Vec(x*(3 + 15*x + 4*x^2) / ((1 - x)^2*(1 + x)) + O(x^40)) \\ Colin Barker, Feb 07 2019
    
  • Scala
    (3 to 949 by 22).union(18 to 942 by 22).sorted // Alonso del Arte, Feb 18 2019

Formula

a(n) = 11*n - 6 + 2*(-1)^n.
a(n) = 11*n - A105398(n + 4).
A007310(a(n) + 1) = 11*A007310(n).
From Colin Barker, Feb 07 2019: (Start)
G.f.: x*(3 + 15*x + 4*x^2) / ((1 - x)^2*(1 + x)).
a(n) = a(n - 1) + a(n - 2) - a(n - 3) for n > 3. (End)
E.g.f.: 4 + (11*x - 6)*exp(x) + 2*exp(-x). - David Lovler, Sep 08 2022
Showing 1-3 of 3 results.