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

A081503 Number of steps to reach a single digit when map in A081502 is iterated.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3
Offset: 0

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Examples

			19 -> 3+9 = 12 -> 3+2 = 5, taking 2 steps, so a(19)=2.
		

Programs

  • Maple
    A081503 := proc(n)
        local nitr,a ;
        nitr := n ;
        a := 0 ;
        while nitr > 9 do
            nitr := A081502(nitr) ;
            a := a+1 ;
        end do;
        a ;
    end proc: # R. J. Mathar, Oct 03 2014

Formula

a(n) = O(log n).

Extensions

More terms from Matthew Conroy, Jan 16 2006
Formula from Charles R Greathouse IV, Aug 02 2010

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

A028898 Map n = Sum c_i 10^i to a(n) = Sum c_i 3^i.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

If n is a multiple of 7, then a(n) is also a multiple of 7. See the Bhattacharyya link. - Michel Marcus, May 11 2016

Crossrefs

Cf. A008589 (multiples of 7).
Different from A081502 for n>=100.

Programs

  • Maple
    a:= proc(n) option remember;   n mod 10 + 3*procname(floor(n/10))
    end proc:
    a(0):= 0:
    seq(a(i),i=0..100); # Robert Israel, May 11 2016
  • Mathematica
    a = {1}; Do[AppendTo[a, If[Mod[n, 10] == 0, 3 a[[n/10]], a[[n - 1]] + 1]], {n, 2, 76}]; {0}~Join~a (* Michael De Vlieger, May 10 2016 *)
  • PARI
    a(n)=if(n<1,0,if(n%10,a(n-1)+1,3*a(n/10)))
    
  • PARI
    a(n) = subst(Pol(digits(n)), x, 3); \\ Michel Marcus, May 10 2016

Formula

a(0)=0, a(n)=3*a(n/10) if n==0 (mod 10), a(n)=a(n-1)+1 otherwise. - Benoit Cloitre, Dec 21 2002
G.f.: G(x) = (1-x)^(-1) * Sum_{i>=0} 3^i*p(x^(10^i)) where p(t) = (t+2*t^2+3*t^3+4*t^4+5*t^5+6*t^6+7*t^7+8*t^8+9*t^9)/(1+t+t^2+t^3+t^4+t^5+t^6+t^7+t^8+t^9) satisfies (1-x)*G(x) = p(x) + 3*(1-x^10)*G(x^10). - Robert Israel, May 11 2016

Extensions

More terms from Erich Friedman
Moved Wesley Ivan Hurt's formula to A081502 where it applies. - Kevin Ryde, Dec 03 2019

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

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 108, 109, 110
Offset: 0

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Comments

More than the usual number of terms are displayed in order to distinguish this from some closely related sequences. - N. J. A. Sloane, Mar 22 2014

Crossrefs

Cf. A081502. Different from A028904.

Programs

  • Magma
    k:=9; [n-(10-k)*Floor(n/10): n in [0..150]]; // Bruno Berselli, Jun 24 2014
  • Maple
    f1:=proc(n) local x,y;
    y:= (n mod 10);
    x:=(n-y)/10;
    9*x+y;
    end;
    [seq(f1(n),n=0..200)];
  • PARI
    my(n, x, y); vector(500, n, y=(n-1)%10; x=(n-1-y)\10; 9*x+y) \\ Colin Barker, Jun 23 2014
    
  • PARI
    a(n)=n - n\10 \\ Charles R Greathouse IV, Sep 01 2015
    

Formula

G.f.: x*(x^2 +x +1)*(x^6 +x^3 +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 24 2014
a(n) = n - floor(n/10). - Bruno Berselli, Jun 24 2014

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Crossrefs

Cf. A081502. Starts to differ from A028899 at a(100).

Programs

  • Magma
    k:=4; [n-(10-k)*Floor(n/10): n in [0..100]]; // Bruno Berselli, Jun 24 2014
  • Mathematica
    CoefficientList[Series[-x (5 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,4},80] (* Harvey P. Dale, Sep 17 2023 *)
  • PARI
    my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 4*x+y) \\ Colin Barker, Jun 24 2014
    

Formula

G.f.: -x*(5*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 24 2014
a(n) = n - 6*floor(n/10). [Bruno Berselli, Jun 24 2014]

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Crossrefs

Cf. A081502. Different from A028900.

Programs

  • Magma
    k:=5; [n-(10-k)*Floor(n/10): n in [0..100]]; // Bruno Berselli, Jun 24 2014
  • Mathematica
    CoefficientList[Series[-x (4 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 *)
  • PARI
    my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 5*x+y) \\ Colin Barker, Jun 24 2014
    

Formula

G.f.: -x*(4*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 24 2014
a(n) = n - 5*floor(n/10). [Bruno Berselli, Jun 24 2014]

A081597 Let n = 10*x + y where 0 <= y <= 9, x >= 0. Then a(n) = 6*x + y.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Crossrefs

Cf. A081502. Different from A028901.

Programs

  • Magma
    k:=6; [n-(10-k)*Floor(n/10): n in [0..10]]; // Bruno Berselli, Jun 24 2014
  • Maple
    A081597:=n->n-4*floor(n/10): seq(A081597(n), n=0..150); # Wesley Ivan Hurt, Apr 25 2017
  • Mathematica
    CoefficientList[Series[-x (3 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 *)
  • PARI
    my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 6*x+y) \\ Colin Barker, Jun 24 2014
    

Formula

G.f.: -x*(3*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 24 2014
a(n) = n - 4*floor(n/10). [Bruno Berselli, Jun 24 2014]
a(n) = a(n-1) + a(n-10) - a(n-11) for n > 10. - Chai Wah Wu, Apr 25 2017

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Crossrefs

Cf. A081502. Different from A028902.

Programs

  • Magma
    k:=7; [n-(10-k)*Floor(n/10): n in [0..100]]; // Bruno Berselli, Jun 24 2014
  • Mathematica
    CoefficientList[Series[-x (2 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 *)
    Table[n-3*Floor[n/10],{n,0,80}] (* Harvey P. Dale, Apr 22 2019 *)
  • PARI
    my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 7*x+y) \\ Colin Barker, Jun 24 2014
    

Formula

G.f.: -x*(2*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 24 2014
a(n) = n - 3*floor(n/10). [Bruno Berselli, Jun 24 2014]

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Crossrefs

Cf. A081502. Different from A028898.

Programs

  • Magma
    k:=8; [n-(10-k)*Floor(n/10): n in [0..100]]; // Bruno Berselli, Jun 24 2014
  • Maple
    A081599 := proc(n)
        local x,y ;
        x := floor(n/10) ;
        y := modp(n,10) ;
        8*x+y ;
    end proc:
    seq(A081599(n),n=0..100) ; # R. J. Mathar, May 25 2023
  • Mathematica
    Table[n-2*Floor[n/10],{n,0,80}] (* Harvey P. Dale, Nov 07 2017 *)
  • PARI
    my(n, x, y); vector(200, n, y=(n-1)%10; x=(n-1-y)\10; 8*x+y) \\ Colin Barker, Jun 24 2014
    

Formula

G.f.: -x*(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 24 2014
a(n) = n - 2*floor(n/10). - Bruno Berselli, Jun 24 2014
Showing 1-9 of 9 results.