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

A096306 Number of iterations of n -> n + (largest digit of n) needed for the trajectory of n to join the trajectory of A045844.

Original entry on oeis.org

0, 0, 18, 0, 19, 17, 16, 0, 15, 18, 17, 16, 1, 15, 2, 0, 1, 14, 1, 1, 15, 0, 14, 0, 3, 13, 3, 0, 2, 2, 3, 12, 1, 2, 11, 0, 10, 1, 9, 10, 69, 0, 9, 9, 68, 0, 8, 8, 66, 67, 8, 0, 66, 7, 66, 7, 0, 65, 6, 65, 62, 6, 63, 0, 63, 64, 61, 5, 62, 0, 62, 63, 63, 60, 4, 4, 0, 61, 62, 62, 59, 3, 3, 0, 2, 60
Offset: 1

Views

Author

Jason Earls, Jun 26 2004

Keywords

Comments

Conjecture: For any positive integer starting value n, iterations of n -> n + (largest digit of n) will eventually join A045844.

Examples

			a(25)=3 because the trajectory for 1 (sequence A045844) starts
1->2->4->8->16->22->24->28->36->42->46...
and the trajectory for 25 starts
25->30->33->36->42->46->52->57...
so the sequence beginning with 25 joins A045844 after 3 steps.
		

A095815 a(n) = n + largest digit of n.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 22, 23, 24, 26, 28, 30, 32, 34, 36, 38, 33, 34, 35, 36, 38, 40, 42, 44, 46, 48, 44, 45, 46, 47, 48, 50, 52, 54, 56, 58, 55, 56, 57, 58, 59, 60, 62, 64, 66, 68, 66, 67, 68, 69, 70, 71, 72, 74, 76, 78, 77, 78
Offset: 1

Views

Author

Jason Earls, Jul 10 2004

Keywords

Examples

			a(19) = 19 + 9 = 28.
a(77) = 77 + 7 = 84.
		

Crossrefs

Cf. A054055; A045844 (iterated).
Cf. A182324.

Programs

  • Haskell
    a095815 n = n + fromIntegral (a054055 n) -- Reinhard Zumkeller, Aug 23 2011
    
  • Mathematica
    #+Max[IntegerDigits[#]]&/@Range[100] (* Harvey P. Dale, May 03 2024 *)
  • Python
    def A095815(n): return n + max(int(d) for d in str(n)) # Chai Wah Wu, Jun 06 2022

A260263 a(n+1) = a(n) + largest digit not in a(n), starting with a(1) = 1.

Original entry on oeis.org

1, 10, 19, 27, 36, 45, 54, 63, 72, 81, 90, 98, 105, 114, 123, 132, 141, 150, 159, 167, 176, 185, 194, 202, 211, 220, 229, 237, 246, 255, 264, 273, 282, 291, 299, 307, 316, 325, 334, 343, 352, 361, 370, 379, 387, 396, 404, 413, 422, 431, 440, 449, 457, 466, 475
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Jul 21 2015

Keywords

Comments

From a(16173532) = 123456798 on, the sequence becomes constant.
From a(324) = 2796 + 8 = 2804 on, this sequence becomes equal to sequence A260264, which has the same definition except for starting with a(0)=0.
a(10^k): 1, 81, 870, 8598, 84284, 823330, 8010205, 77737463. - Robert G. Wilson v, Jul 21 2015

Crossrefs

Cf. A045844.

Programs

  • Maple
    a[1]:= 1:
    for n from 2 to 100 do
      a[n]:= a[n-1] + max({$1..9} minus convert(convert(a[n-1],base,10),set));
    od:
    seq(a[n],n=1..100); # Robert Israel, Jul 22 2015
  • Mathematica
    a[n_] := a[n] = a[n - 1] + Max[ Complement[ Range[9], IntegerDigits[ a[n - 1]] ]]; a[1] = 1; Array[a, 55] (* Robert G. Wilson v, Jul 21 2015 *)
  • PARI
    {a=1;d=vector(9,d,d);for(n=1,100,print1(a",");a+=vecmax(setminus(d,Set(digits(a)))))}

A260264 a(n+1) = a(n) + largest digit not in a(n), starting with a(0) = 0.

Original entry on oeis.org

0, 9, 17, 26, 35, 44, 53, 62, 71, 80, 89, 96, 104, 113, 122, 131, 140, 149, 157, 166, 175, 184, 193, 201, 210, 219, 227, 236, 245, 254, 263, 272, 281, 290, 298, 305, 314, 323, 332, 341, 350, 359, 367, 376, 385, 394, 402, 411, 420, 429, 437, 446, 455, 464, 473, 482
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Jul 21 2015

Keywords

Comments

From a(16173532) = 123456798 on, the sequence becomes constant.
From a(324) = 2798 + 6 = 2804 on, this sequence becomes equal to sequence A260263, which has the same definition except for starting with a(1) = 1.
a(10^k) = 9, 89, 874, 8598, 84284, 823330, 8010205, 77737463, 123456798, ...

Crossrefs

Cf. A045844.

Programs

  • Mathematica
    NestList[#+Max[Complement[Range[0,9],IntegerDigits[#]]]&,0,60] (* Harvey P. Dale, May 17 2019 *)
  • PARI
    {L=0;a=0;d=vector(9,d,d);for(n=0,1000,n>=L&&print1(a",")+L*=10;a+=vecmax(setminus(d,Set(digits(a)))))} \\ Set L=1 to list only a(10^k).

A235698 a(n+1) = a(n) + (smallest digit of a(n)) + 1, a(0)=0.

Original entry on oeis.org

0, 1, 3, 7, 15, 17, 19, 21, 23, 26, 29, 32, 35, 39, 43, 47, 52, 55, 61, 63, 67, 74, 79, 87, 95, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187
Offset: 0

Views

Author

M. F. Hasler, Jan 14 2014

Keywords

Comments

It is obvious why the "+ 1" has to be there.
In the range where 100 < a(n) < 200, the gaps may only be 1 or 2, similarly for other multiples of 100, 1000, etc

Crossrefs

Cf. A045844.

Programs

  • PARI
    print1(0", "a=1); for(i=1, 99, print1(", ", a+=vecmin(digits(a))+1))

Extensions

PARI code corrected by Colin Barker, Sep 20 2014

A235699 a(n+1) = a(n) + (a(n) mod 10) + 1, a(0) = 0.

Original entry on oeis.org

0, 1, 3, 7, 15, 21, 23, 27, 35, 41, 43, 47, 55, 61, 63, 67, 75, 81, 83, 87, 95, 101, 103, 107, 115, 121, 123, 127, 135, 141, 143, 147, 155, 161, 163, 167, 175, 181, 183, 187, 195, 201, 203, 207, 215, 221, 223, 227, 235, 241, 243, 247, 255, 261, 263, 267, 275, 281, 283, 287, 295, 301, 303, 307, 315, 321, 323, 327, 335, 341, 343, 347, 355
Offset: 0

Views

Author

M. F. Hasler, Jan 14 2014

Keywords

Comments

Instead of (a(n) mod 10) one might say "the last (decimal) digit of a(n)".
Apart from the initial term, the first differences form the periodic sequence (2,4,8,6)[repeated].
Without the final "+ 1" and starting with 1, one gets A102039: Indeed, the last digit cycles through 2,4,8,6 and therefore the sequence never becomes constant.

Crossrefs

Programs

  • Mathematica
    NestList[#+Mod[#,10]+1&,0,80] (* or *) Join[{0},LinearRecurrence[{2,-2,2,-1},{1,3,7,15},80]] (* Harvey P. Dale, Dec 21 2014 *)
  • PARI
    print1(a=0);for(i=1,99,print1(","a+=a%10+1))

Formula

a(n) = 5*n-6+cos(n*Pi/2)+2*sin(n*Pi/2), for n>0. - Giovanni Resta, Jan 15 2014
From Colin Barker, Jan 16 2014: (Start)
a(n) = -6+(1/2+i)*(-i)^n+(1/2-i)*i^n+5*n for n>0 where i=sqrt(-1).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>4.
G.f.: x*(5*x^3+3*x^2+x+1) / ((x-1)^2*(x^2+1)). (End)

A101227 Number of solutions to equation n=x+largest digit of x, n>1.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Jan 22 2005

Keywords

Comments

In A045844, a sequence is defined by a rule a(n+1) = a(n) + largest digit of a(n); a(0) = 1. As usually in such cases, direct transformation is unique, while reverse one is not. Here the number of possible "previous" terms is given for each n.

Examples

			a(12)=2 because 12=6+6 and 12=11+1; a(101)=2 because 101=92+9 and 101=100+1; note offset=2.
		

Crossrefs

Cf. A045844.
Showing 1-7 of 7 results.