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.

A081594 Let n = 10x + y where 0 <= y <= 9, x >= 0. Then a(n) = 2x+y.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 20
Offset: 0

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Crossrefs

Cf. A081502. Differs from A028897, A156230 and A244158 for the first time at n=100, which here is a(100) = 20.

Programs

  • Magma
    [(n+4*y)/5 where y is n mod 10: n in [0..100]]; // Bruno Berselli, Jun 24 2014
    
  • Maple
    A081594:=n->n-8*floor(n/10); seq(A081594(n), n=0..100); # Wesley Ivan Hurt, Jun 25 2014
  • Mathematica
    CoefficientList[Series[-x (7 x^9 - x^8 - x^7 - x^6 - x^5 - x^4 - x^3 - x^2 - x - 1)/((x - 1)^2 (x + 1) (x^4 - x^3 + x^2 - x+1) (x^4 + x^3 + x^2 + x + 1)), {x, 0, 150}], x] (* Vincenzo Librandi, Jun 25 2014 *)
    LinearRecurrence[{1,0,0,0,0,0,0,0,0,1,-1},{0,1,2,3,4,5,6,7,8,9,2},110] (* or *) Table[Range[n,n+9],{n,0,26,2}]//Flatten (* Harvey P. Dale, Jul 22 2021 *)
  • PARI
    my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 2*x+y) \\ Colin Barker, Jun 24 2014
    
  • Sage
    [n-8*floor(n/10) for n in (0..100)] # Bruno Berselli, Jun 24 2014

Formula

a(n) = (2 * floor(n/10)) + (n modulo 10). - Antti Karttunen, Jun 22 2014
G.f.: -x*(7*x^9 -x^8 -x^7 -x^6 -x^5 -x^4 -x^3 -x^2 -x -1) / ((x -1)^2*(x +1)*(x^4 -x^3 +x^2 -x +1)*(x^4 +x^3 +x^2 +x +1)). - Colin Barker, Jun 23 2014
a(n) = n - 8*floor(n/10). [Bruno Berselli, Jun 24 2014]

Extensions

Terms up to n=100 added by Antti Karttunen, Jun 22 2014
G.f. revised by Vincenzo Librandi, Jun 25 2014