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.

A348433 a(1) = 1; a(n+1) = 2*a(n) if the digit sum of a(n) is already in the sequence, otherwise a(n+1) = digitsum(a(n)).

Original entry on oeis.org

1, 2, 4, 8, 16, 7, 14, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 11, 22, 44, 88, 176, 352, 704, 1408, 13, 26, 52, 104, 208, 416, 832, 1664, 17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 8704, 19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 19456, 25, 50, 100, 200
Offset: 1

Views

Author

Rodolfo Kurchan, Oct 18 2021

Keywords

Comments

There are no multiples of 3 in this sequence.
Will all other positive integers appear in this sequence?

Examples

			The sum of the digits of a(4) = 8 is 8, which is already in the sequence, so a(5) = 2*8 = 16.
The sum of the digits of a(5) = 16 is 7, which is not yet in the sequence, so a(6) = 7.
From _Omar E. Pol_, Oct 19 2021: (Start)
Written as an irregular triangle the sequence begins (see A348408):
   1,  2,  4,   8,  16;
   7, 14;
   5, 10, 20,  40,  80, 160,  320,  640, 1280;
  11, 22, 44,  88, 176, 352,  704, 1408;
  13, 26, 52, 104, 208, 416,  832, 1664;
  17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 8704;
  19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 19456;
... (End)
		

Crossrefs

Programs

  • Mathematica
    seq[len_] := Module[{s = {1}, k, d}, While[Length[s] < len, k = s[[-1]]; If[MemberQ[s, (d = Plus @@ IntegerDigits[k])], AppendTo[s, 2*k], AppendTo[s, d]]]; s]; seq[50] (* Amiram Eldar, Oct 19 2021 *)
  • PARI
    lista(nn) = my(s, v=List([1])); for(n=1, nn, if(setsearch(vecsort(v), s=sumdigits(v[n])), listput(v, 2*v[n]), listput(v, s))); v \\ Jinyuan Wang, Oct 21 2021
    
  • PARI
    See Links section.

Extensions

Definition and examples clarified by N. J. A. Sloane, Oct 24 2021

A348400 a(1) = 1; a(n+1) = a(n) + n if the digit sum of a(n) is already in the sequence, otherwise a(n+1) = digitsum(a(n)).

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 22, 29, 37, 10, 20, 31, 43, 56, 70, 85, 13, 30, 3, 22, 42, 6, 28, 51, 75, 12, 38, 65, 93, 122, 5, 36, 9, 42, 76, 111, 147, 184, 222, 261, 301, 342, 384, 15, 59, 14, 60, 107, 8, 57, 107, 158, 210, 263, 317, 372, 428, 485, 17, 76, 136, 197, 259
Offset: 1

Views

Author

Rodolfo Kurchan, Oct 21 2021

Keywords

Comments

Do all the positive integers appear in this sequence?
With 10^6 terms, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 101, 102, 103, 104, 105, 106, 108, 109, 110, 112 are the smallest numbers that still are not in the sequence.

Examples

			a(8) = 29 and digitsum(29) = 11 is already in the sequence, so a(9) = a(8) + 8 = 29 + 8 = 37.
a(9) = 37 and digitsum(37) = 3 + 7 = 10 is not yet in the sequence, so a(10) = 10.
Written as an irregular triangle, in which each line begins with a term which is the digit sum of its preceding term, the sequence begins:
   1,  2,   4,   7,  11,  16,  22,  29,  37;
  10, 20,  31,  43,  56,  70,  85;
  13, 30;
   3, 22,  42;
   6, 28,  51,  75;
  12, 38,  65,  93, 122;
   5, 36;
   9, 42,  76, 111, 147, 184, 222, 261, 301, 342, 384;
  15, 59;
  14, 60, 107;
  ...
		

Crossrefs

Programs

  • Mathematica
    seq[len_] := Module[{s = {1}, k, d, i = 1}, While[Length[s] < len, k = s[[-1]]; If[MemberQ[s, (d = Plus @@ IntegerDigits[k])], AppendTo[s, k + i], AppendTo[s, d]]; i++]; s]; seq[50] (* Amiram Eldar, Oct 21 2021 *)
  • PARI
    See Links section.

Extensions

Definition clarified by Amiram Eldar, Oct 23 2021

A348575 Irregular triangle read by rows: T(n, k) = T(n, k-1) + k - 1 if digsum(T(n, k-1)) is already in the sequence, otherwise start a new row with T(n+1, 1) = digsum(T(n, k-1)); T(1, 1) = 1.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 22, 29, 37, 10, 11, 13, 16, 20, 25, 31, 38, 46, 55, 65, 76, 88, 101, 115, 130, 146, 163, 181, 200, 220, 241, 263, 286, 310, 335, 361, 388, 19, 20, 22, 25, 29, 34, 40, 47, 55, 64, 74, 85, 97, 110, 124, 139, 155, 172, 190, 209, 229, 250, 272, 295
Offset: 1

Views

Author

Rodolfo Kurchan, Oct 23 2021

Keywords

Comments

Terms computed by Claudio Meller.
From Jon E. Schoenfield, Dec 04 2021: (Start)
The 31996289225th term of the sequence is T(30, 1) = 167, so row 30 begins with the terms 167, 168, 170, 173, 177, 182, 188, 195, 203, 212, 222, 233, 245, 258, ..., i.e., T(30, k) = 167 + A000217(k-1), and each term in row 30 is congruent to 2, 5, 6, or 8 (mod 9). The terms in row 30 include the first appearances of the values 167 (at T(30, 1)), 177 (at T(30, 5)), 203 (at T(30, 9)), and 233 (T(30, 12)), .... After those first appearances, the smallest numbers that have not yet appeared are 160, 169, 208, 214, 216, 219, 224, 226, 237, 240, 244, 251, 255, 257, .... Of those, the only ones congruent to 2, 5, 6, or 8 (mod 9), and thus the only numbers that can be the digit sum of the final term in row 30, begin with 224, 240, 251, 257, ....
It seems nearly certain that a term will occur in row 30 with digit sum 224 before any of those significantly larger digit sums 240, 251, 257, etc. have appeared; i.e., it seems nearly certain that row 31 will begin with T(31, 1) = 224, and will thus consist of the terms 224, 225, 227, 230, 234, 239, 245, 252, 260, ... (each of those listed here has already appeared before row 31, except for 224), so each term in row 31 will be congruent to 0, 2, 5, or 8 (mod 9). The terms that still will not have appeared will begin with 160, 169, 208, 214, 216, 219, 226, 237, 240, 244, 251, 255, 257, ..., of which the ones congruent to 0, 2, 5, or 8 (mod 9) begin with 216, 251, 257, ....
Thus, row 31 will almost certainly end with a number whose digit sum is 216, causing row 32 to begin with T(32, 1) = 216, consist of terms congruent to 0, 1, 3, or 6 (mod 9), and include the first appearances of 216, 219, 226, 237, and 244, leaving 160, 169, 208, 214, 240, 251, 255, 257, ... yet to appear. Of those, the only ones congruent to 0, 1, 3, or 6 (mod 9) are 208, 240, 255, ....
This means that row 32 will almost certainly end with a number whose digit sum is 208, yielding T(33, 1) = 208 (and the first appearance of 214 at T(33,4)), so the terms in row 32 will be congruent to 1, 2, 4, or 7 (mod 9). (End)

Examples

			The first three rows of the triangle are:
[1]:  1,  2,  4,  7, 11, 16, 22, 29, 37;
[2]: 10, 11, 13, 16, 20, 25, 31, 38, 46, 55, 65, 76, 88, 101, 115, 130, 146, 163, 181, 200, 220, 241, 263, 286, 310, 335, 361, 388;
[3]: 19, 20, 22, 25, 29, 34, 40, 47, 55, 64, 74, 85, 97, 110, 124, 139, 155, 172, 190, 209, 229, 250, 272, 295, 319, 344, 370, 397, 425, 454, 484, 515, 547, 580, 614, 649, 685, 722, 760, 799, 839, 880, 922, 965, 1009, 1054, 1100, 1147, 1195, 1244, 1294, 1345, 1397, 1450, 1504, 1559, 1615, 1672, 1730, 1789, 1849, 1910, 1972, 2035, 2099, 2164, 2230, 2297, 2365, 2434, 2504, 2575, 2647, 2720, 2794, 2869, 2945, 3022, 3100, 3179, 3259, 3340, 3422, 3505, 3589, 3674, 3760, 3847, 3935, 4024, 4114, 4205, 4297, 4390, 4484, 4579, 4675, 4772, 4870, 4969;
.
a(8) = 29 because a(7) = 22 and the sum of its digits 2+2=4 already a term, so as this is the 7th term in the increasing sequence, we add 7, and 22 + 7 = 29.
a(9) = 37 because a(8) = 29 and the sum of its digits 2+9=11 already a term, so as this is the 8th term in the increasing sequence so we add 8, and 29 + 8 = 37.
a(10) = 10 because a(9) = 37 and the sum of its digits is 10, and 10 was not already in the sequence.
a(11) = 11 because a(10) = 10 and is the 1st term in this new increasing sequence so we add 1, and 10 + 1 = 11.
a(12) = 13 because a(11) = 11 and is the 2nd term in this new increasing sequence so we add 2, and 11 + 2 = 13.
In the first 17 rows of the triangle we have that:
-------------------------------------------------------------------------------
  First term       Last term or right border              Some rows
-------------------------------------------------------------------------------
  T( 1,1) =  1     T( 1,9)     = 37            [1, 2, 4, 7, 11, 16, 22, 29, 37]
  T( 2,1) = 10     T( 2,28)    = 388
  T( 3,1) = 19     T( 3,100)   = 4969
  T( 4,1) = 28     T( 4,3660)  = 6695998
  T( 5,1) = 52     T( 5,2)     = 53
  T( 6,1) =  8     T( 6,4)     = 14            [8, 9, 11, 14]
  T( 7,1) =  5     T( 7,34)    = 566
  T( 8,1) = 17     T( 8,279)   = 38798
  T( 9,1) = 35     T( 9,1342)  = 899846
  T(10,1) = 44     T(10,24486) = 299769899
  T(11,1) = 68     T(11,41)    = 888
  T(12,1) = 24     T(12,4)     = 30            [24, 25, 27, 30]
  T(13,1) =  3     T(13,9)     = 39
  T(14,1) = 12     T(14,37)    = 678
  T(15,1) = 21     T(15,3373)  = 5686899
  T(16,1) = 51     T(16,30332) = 459999997
  T(17,1) = 70     T(17,10768) = 57969598
		

Crossrefs

Column 1 gives A349548.
Row lengths give A349547.
Right border gives A349742.

Programs

  • Mathematica
    seq[len_] := Module[{s = {1}, i = 1, d}, While[Length[s] < len, If[MemberQ[s, (d = Plus @@ IntegerDigits[s[[-1]]])], AppendTo[s, s[[-1]] + i], AppendTo[s, d]; i = 0]; i++]; s]; seq[50] (* Amiram Eldar, Oct 23 2021 *)

Extensions

Definition clarified by Amiram Eldar at my request. - N. J. A. Sloane, Nov 19 2021
Showing 1-3 of 3 results.