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

A022958 a(n) = 2 - n.

Original entry on oeis.org

2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, -51, -52, -53, -54, -55
Offset: 0

Views

Author

Keywords

Comments

a(n) is the Euler characteristic of one-sided surface of genus n (see Courant and Herbert). - Stefano Spezia, Sep 10 2022

Crossrefs

Cf. A239229.

Programs

Formula

From Paul Barry, Mar 31 2007: (Start)
G.f.: (2-3x)/(1-x)^2.
E.g.f.: exp(x)*(2-x). (End)
a(n) = 2*a(n-1) - a(n-2); a(0)=2, a(1)=1. - Philippe Deléham, Nov 03 2008

A293292 Numbers with last digit less than 5 (in base 10).

Original entry on oeis.org

0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 70, 71, 72, 73, 74, 80, 81, 82, 83, 84, 90, 91, 92, 93, 94, 100, 101, 102, 103, 104, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 130
Offset: 1

Views

Author

Bruno Berselli, Oct 05 2017

Keywords

Comments

Equivalently, numbers k such that floor(k/5) = 2*floor(k/10).
After 0, partial sums of A010122 starting from the 2nd term.
The sequence differs from A007091 after a(25).
Also numbers k such that floor(k/5) is even. - Peter Luschny, Oct 05 2017

Crossrefs

Cf. A010122, A239229, A257145, A293481 (complement).
Sequences of the type floor(n/d) = (10/d)*floor(n/10), where d is a factor of 10: A008592 (d=1), A197652 (d=2), this sequence (d=5), A001477 (d=10).
Sequences of the type n + r*floor(n/r): A005843 (r=1), A042948 (r=2), A047240 (r=3), A047476 (r=4), this sequence (r=5).

Programs

  • Magma
    [n: n in [0..130] | n mod 10 lt 5];
    
  • Magma
    [n: n in [0..130] | IsEven(Floor(n/5))];
    
  • Magma
    [n+5*Floor(n/5): n in [0..70]];
    
  • Maple
    select(k -> type(floor(k/5), even), [$0..130]); # Peter Luschny, Oct 05 2017
  • Mathematica
    Table[n + 5 Floor[n/5], {n, 0, 70}]
    Reap[For[k = 0, k <= 130, k++, If[Floor[k/5] == 2*Floor[k/10], Sow[k]]]][[2, 1]] (* or *) LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 10}, 66] (* Jean-François Alcover, Oct 05 2017 *)
  • PARI
    concat(0, Vec(x^2*(1 + x + x^2 + x^3 + 6*x^4) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)) + O(x^70))) \\ Colin Barker, Oct 05 2017
    
  • PARI
    select(k->floor(k/5) == 2*floor(k/10), vector(1000, k, k)) \\ Colin Barker, Oct 05 2017
    
  • Python
    [k for k in range(131) if (k//5) % 2 == 0] # Peter Luschny, Oct 05 2017
    
  • Python
    def A293292(n): return (n-1<<1)-(n-1)%5 # Chai Wah Wu, Oct 29 2024
    
  • Sage
    [k for k in (0..130) if 2.divides(floor(k/5))] # Peter Luschny, Oct 05 2017

Formula

G.f.: x^2*(1 + x + x^2 + x^3 + 6*x^4)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6).
a(n) = (n-1) + 5*floor((n-1)/5) = 10*floor((n-1)/5) + ((n-1) mod 5).
a(n) = A257145(n+2) - A239229(n-1). - R. J. Mathar, Oct 05 2017
a(n) = 2n-2-((n-1) mod 5). - Chai Wah Wu, Oct 29 2024

Extensions

Definition by David A. Corneth, Oct 05 2017
Showing 1-2 of 2 results.