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

A348408 a(n) is the length of the n-th row of A348433 when it is written as an irregular triangle.

Original entry on oeis.org

5, 2, 9, 8, 8, 10, 11, 22, 11, 16, 10, 14, 22, 29, 22, 26, 20, 27, 28, 26, 41, 36, 46, 42, 40, 42, 46, 42, 48, 44, 73, 62, 52, 53, 68, 69, 60, 67, 78, 73, 71, 86, 67, 80, 70, 96, 85, 88, 83, 80, 94, 84, 95, 96, 103, 101, 100, 110, 94, 113, 109, 120, 118, 126
Offset: 1

Views

Author

Rodolfo Kurchan, Oct 19 2021

Keywords

Examples

			When A348433 is written as an irregular triangle the first three rows are:
  1, 2, 4, 8, 16;
  7, 14;
  5, 10, 20, 40, 80, 160, 320, 640, 1280;
The lengths of the rows are [5, 2, 9] respectively, the same as the first three terms of this sequence.
		

Crossrefs

Cf. A348433.

Programs

  • Mathematica
    c[1] = m = 1; Most@ Prepend[Differences[#], First[#]] &@ Reap[Do[If[IntegerQ[c[#]], Set[n, 2 m], Set[n, #]] &@ Total@ IntegerDigits[m]; If[m > n, Sow[i]]; Set[c[n], 1]; m = n, {i, 2^12}]][[-1, -1]] (* Michael De Vlieger, Oct 25 2021 *)
  • PARI
    lista(nn) = my(k, r, s, v=List([1])); for(n=1, nn, while(setsearch(vecsort(v), s=sumdigits(v[k++])), listput(v, 2*v[k])); listput(v, s); print1(k-r, ", "); r=k); \\ Jinyuan Wang, Oct 21 2021

Extensions

More terms from Jinyuan Wang, Oct 21 2021

A348624 a(n) = sum of row n of A348433 expressed as an irregular triangle.

Original entry on oeis.org

31, 21, 2555, 2805, 3315, 17391, 38893, 104857575, 59363, 2097120, 31713, 376809, 117440484, 18790481885, 197132241, 2885681109, 42991575, 4966055899, 13153337295, 3959422917, 120946279055305, 4191888080835, 3729543441416139, 321057395310519, 84662395338675, 294669116243901
Offset: 1

Views

Author

Michael De Vlieger, Oct 25 2021

Keywords

Comments

The binary expansion w of a(n) has an interesting appearance shown by the bitmap in links. We may divide w with length m into 3 parts: the most significant part includes all bits including the last 0 before the middle of the word, m/2, a central run of k 1's that includes all but the last 1 before a 0, and a least significant part that includes the last 1 in the central run of 1s and an assortment of 0's. For example, a(3) = 2555 -> 100.11111.1011, which we may partition as shown by "." so as to preserve the otherwise-leading 0 in the last part. The central run of 1s generally increases in length as n increases.

Examples

			Table showing the first 5 rows of A348433 each having A348408(n) terms, and their sum a(n):
n\k 1  2  3   4   5   6   7    8    9     a(n)   binary(a(n))
--------------------------------------------------------------
1:  1  2  4   8  16                   ->   31 ->        11111
2:  7 14                              ->   21 ->        10101
3:  5 10 20  40  80 160 320  640 1280 -> 2555 -> 100111111011
4: 11 22 44  88 176 352 704 1408      -> 2805 -> 101011110101
5: 13 26 52 104 208 416 832 1664      -> 3315 -> 110011110011
		

Crossrefs

Programs

  • Mathematica
    c[1] = m = q = 1; Most@ Reap[Do[If[IntegerQ[c[#]], Set[n, 2 m], Set[n, #]] &@ Total@ IntegerDigits[m]; If[m > n, Sow[q]; Set[q, n], q += n]; Set[c[n], 1]; m = n, 650]][[-1, -1]]
    (* Extract up to 3961 terms from bitmap: *)
    Block[{s = ImageData[ColorNegate@ Import["https://oeis.org/A348624/a348624_2.png"], "Bit"]}, Array[FromDigits[s[[#]], 2] &, 26]] (* Michael De Vlieger, Oct 26 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

A348483 a(1) = 1; if the sum of the digits of 2*a(n-1) + 1 is not yet in the sequence then a(n) = 2*a(n-1) + 1; otherwise a(n) is the sum of digits of a(n-1).

Original entry on oeis.org

1, 3, 7, 15, 6, 13, 4, 9, 19, 10, 21, 43, 87, 175, 351, 703, 1407, 12, 25, 51, 103, 207, 415, 831, 1663, 16, 33, 67, 135, 271, 543, 1087, 2175, 4351, 8703, 18, 37, 75, 151, 303, 607, 1215, 2431, 4863, 9727, 19455, 24, 49, 99, 199, 399, 799, 1599, 3199, 22, 45
Offset: 1

Views

Author

Rodolfo Kurchan, Oct 20 2021

Keywords

Comments

Numbers of the form 2 + 3*k will not appear in this sequence.
Do all other positive integers appear in this sequence?

Examples

			a(4) = 15 because it is the double + 1 of a(3) = 7.
a(5) = 6 and not 31 because the sum of the digits of 15, 1 + 5 = 6 and 6 is not yet in the sequence.
a(6) = 13 because it is the double + 1 of a(5) = 6.
Written as an irregular triangle the sequence begins:
   1,  3,  7,  15;
   6, 13;
   4,  9, 19;
  10, 21, 43,  87, 175, 351,  703, 1407;
  12, 25, 51, 103, 207, 415,  831, 1663;
  16, 33, 67, 135, 271, 543, 1087, 2175, 4351, 8703;
  18, 37, 75, 151, 303, 607, 1215, 2431, 4863, 9727, 19455;
  24, 49, 99, 199, 399, 799, 1599, 3199;
  ...
		

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 + 1], AppendTo[s, d]]]; s]; seq[50] (* Amiram Eldar, Oct 21 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]+1), listput(v, s))); Vec(v); \\ Jinyuan Wang, Oct 21 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-5 of 5 results.