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.

A367343 Compute the commas sequence starting at 1, as in A121805, except do the calculations in octal. The terms are written here in decimal (see also A367344).

Original entry on oeis.org

1, 10, 29, 70, 119, 177, 187, 214, 266, 286, 339, 368, 373, 419, 450, 473, 488, 495, 552, 553, 562, 579, 604, 637, 678, 727, 784, 785, 794, 811, 836, 869, 910, 959, 1016, 1017, 1027, 1053, 1095, 1153, 1163, 1189, 1231, 1289, 1299, 1325, 1367, 1425, 1435, 1461, 1503, 1562
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2023

Keywords

Examples

			See A367344 for the calculation of the first three terms.
		

Crossrefs

Programs

  • Mathematica
    b = 8; a[1] = 1; a[n_] := a[n] = For[x = Mod[a[n - 1], b]; y = 0, y <= (b - 1), y++, k = a[n - 1] + b*x + y; If[y == IntegerDigits[k, b][[1]], Return[k]]]; Array[a, 10^4] (* Michael De Vlieger, Nov 15 2023, after Jean-François Alcover at A121805 *)
  • Python
    from itertools import islice
    from sympy.ntheory.factor_ import digits
    def agen(): # generator of terms
        an, y = 1, 1
        while y < 8:
            yield an
            an, y = an + 8*(an%8), 1
            while y < 8:
                if str(digits(an+y,8)[1]) == str(y):
                    an += y
                    break
                y += 1
    print(list(islice(agen(), 52))) # Michael S. Branicky, Nov 16 2023

A367355 Comma sequence, analogous to A121805, starting at 1, but the calculations are done in base 3.

Original entry on oeis.org

1, 5, 12, 13, 17, 25, 29, 36, 37, 41, 48, 49, 53, 61, 66, 68, 76
Offset: 1

Views

Author

N. J. A. Sloane, Nov 18 2023

Keywords

Crossrefs

A367605 and A367605 give the length and last term for the analogous sequence in base b.

Programs

  • Maple
    # Comma Successor in Maple in base "bas", from N. J. A. Sloane, Dec 06 2023
    bas := 3;
    Ldigit:=proc(n) local v; v:=convert(n, base, bas); v[-1]; end; # Returns leading digit
    # Return comma-successor to a or -1 if no successor exists
    commsucc := proc(a) local f,i,d;
    f := (a mod bas);
    d:=bas*f;
    for i from 1 to bas-1 do
    d := d+1;
    if Ldigit(a+d) = i then return(a+d); fi;
    od:
    return(-1);
    end;
    a:=[1]; s:=1; for n from 1 to 16 do s:=commsucc(s); a:=[op(a),s]; od: a;

A367605 Final term of commas sequence (cf. A121805) if start at 1 and do the calculations in base n; or -1 if the sequence is infinite.

Original entry on oeis.org

-1, 76, 6, 15612, 60466165, 823512, 262122, 32, 99999945, 1771460, 110, 2052, 289254654871, 8649755859206, 18446744073709551480, 83264, 1338258845052394702439737982907, 893871504, 10239999999942, 1801088480, 189, 148035426, 13501, 244140456, 3670344486987375
Offset: 2

Views

Author

N. J. A. Sloane, Dec 08 2023

Keywords

Comments

a(n) is written here in base 10. In base n the values are more revealing: they are -1, 2211_3, 12_4, 444422_5, 5555555541_6, 6666624_7, 777752_8, 35_9, and 99999945_10. That is, they consist of a possibly empty string of digits b-1 followed by a pair of digits xy with x+y = b-1 (see the theorem in A367341).

Crossrefs

The sequences for bases 3, 8, and 10 are A367355, A367344, and A121805.

Extensions

More terms from Michael S. Branicky, Dec 08 2023

A367345 Compute the commas sequence starting at 1, as in A121805, except do the calculations in hexadecimal. The terms are written here in decimal.

Original entry on oeis.org

1, 18, 53, 141, 350, 576, 578, 612, 678, 777, 924, 1120, 1124, 1192, 1325, 1539, 1593, 1743, 1990, 2094, 2327, 2448, 2457, 2611, 2669, 2888, 3027, 3087, 3340, 3545, 3703, 3829, 3924, 4003, 4066, 4099, 4148, 4213, 4294, 4391, 4504, 4633, 4778, 4939, 5116, 5309, 5518
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2023, following a suggestion from William Cheswick

Keywords

Comments

When written in hexadecimal the terms are 1, 12, 35, 8D, 15E, 240, 242, 264, 2A6, 309, 39C, 460, 464, 4A8, 52D, 603, 639, 6CF, 7C6, 82E, 917, 990, 999, A33, A6D, B48, BD3, C0F, D0C, DD9, ...
Finite with last term a(144693554136426354) = 18446744073709551480, which is FFFFFFFFFFFFFF78 in hexadecimal. - Michael S. Branicky, Nov 18 2023

Examples

			See A367344 for examples of similar calculations in base 8.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy.ntheory.factor_ import digits
    def agen(b=16): # generator of terms
        an, y = 1, 1
        while y < b:
            yield an
            an, y = an + b*(an%b), 1
            while y < b:
                if str(digits(an+y, b)[1]) == str(y):
                    an += y
                    break
                y += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Nov 16 2023

A367604 Length of commas sequence (cf. A121805) if start at 1 and do the calculations in base n; or -1 if the sequence is infinite.

Original entry on oeis.org

-1, 17, 2, 1259, 3243760, 33779, 8367, 3, 2137453, 29347, 4, 27, 3097837317, 75455289096, 144693554136426354, 586, 8250248375768635503445567685, 4956282, 51496560713, 7977231, 4, 560002, 48, 779641, 10712620148411, 44948082868036315658034347512222651
Offset: 2

Views

Author

N. J. A. Sloane, Dec 08 2023

Keywords

Crossrefs

Cf. A121805, A367605 (last term).
The sequences for bases 3, 8, and 10 are A367355, A367344, and A121805.

Extensions

More terms from Michael S. Branicky, Dec 08 2023
Showing 1-5 of 5 results.