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.

User: Nicholas M. R. Frieler

Nicholas M. R. Frieler's wiki page.

Nicholas M. R. Frieler has authored 11 sequences. Here are the ten most recent ones:

A375567 Length of the "exponential comma sequence" with n as the initial term, or -1 if that sequence is infinite.

Original entry on oeis.org

-1, 3, 4, 1, 2, 3, 5, 4, 4, -1, 5, 1, 1, 4, 1, 1, 1, 1, 1, 6, 1, 11, 4, 9, 5, 1, 7, 2, 3, 1, 1, 1, 6, 3, 1, 6, 4, 1, 7, 1, 3, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 4, 7, 2, 4, 1, 2, 1, 3, 2, 1, 8, 3, 1, 6, 2, 1, 2, 2, 3, 3, 4, 3, 5, 1, 5, 3, 2, 1, 3, 2, 3, 4, 3
Offset: 1

Author

Nicholas M. R. Frieler, Aug 19 2024

Keywords

Comments

An "exponential comma sequence" is the lexicographically earliest sequence of positive integers (with some chosen initial term) with the property that the sequence formed by the pairs of digits adjacent to the commas between the terms is the same as the sequence of successive logarithms between the terms.
If the decimal expansion of n is 1...0, its exponential comma sequence is trivially constant and therefore infinite so that a(n) = -1. Conjecture: these are the only infinite exponential comma sequences.

Examples

			For n = 2, the next term of its exponential comma sequence is 67108864 because log_2(67108864) = 26 and this is the smallest number where the exponential comma property holds.
		

Crossrefs

Programs

  • C
    /* See links. */
  • Mathematica
    ExponentialCommaSequenceLength[n_] := Module[{seq = {n}, i = 1},
      While[True,
      Do[
        If[(IntegerDigits@Power[Last@seq, Mod[Last@commaSeq,10]*10 + j])[[1]] == j,
          seq = seq~Join~{Power[Last@seq, Mod[Last@commaSeq, 10]*10 + j]};
          Break[];];,
         {j, 1, 9}
        ];
       If[Length@seq != i + 1, Break[];];
       If[seq[[1]] == seq[[2]], Return[-1]];
       i++;
     ];
      Length@seq
     ]

A375590 Numbers m such that there exists a nonnegative integer k for which the concatenation of m, m-1, ..., m-k is an m-digit number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 150, 153, 156, 159, 162, 165, 168
Offset: 1

Author

Nicholas M. R. Frieler, Aug 19 2024

Keywords

Comments

Let d be the number of digits of m (in base 10). One can show that the number m is a member of this sequence if and only if:
(a) m is divisible by d and m >= 10^(d-1) * d/(d+1)
or
(b) 10^(d-1) == 1 (mod d-1) (i.e., d-1 is a term of A014950) and m < 10^d * d/(d+1).

Examples

			13 is a term because the concatenation of 13, 12, ..., 5 is a 13-digit number.
100 is not a term because the concatenation of 100, 99, ..., 52 is a 99-digit number and concatenating this number with 51 yields a 101-digit number.
		

Crossrefs

Cf. A375461 (self-consecutive).

Programs

  • Mathematica
    SelfDownwardConsecutiveQ[n_] :=
     Module[{len = Length@IntegerDigits[n], num, c = 1, numDigits = 0},
      numDigits = len*Ceiling[n + 1 - 10^(len - 1)];
    If[numDigits >= n, Return[Mod[n, len] == 0]];
    num = n - Ceiling[n + 1 - 10^(len - 1)];
    While[numDigits < n + 1,
      If[(len - c)*Ceiling[num + 1 - 10^(len - c - 1)] >= n - numDigits,
       Return[Mod[n - numDigits, len - c] == 0],
       numDigits += (len - c)*Ceiling[num + 1 - 10^(len - c - 1)]
        ];
      num -= Ceiling[num + 1 - 10^(len - c - 1)];
      c++;
       ]
     ]
    Select[Range[1000], SelfDownwardConsecutiveQ]

A375581 Numbers m such that there exists an integer k >= 1 for which the concatenation of m, 2m, ..., km is an m-digit number.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 10, 12, 14, 15, 19, 20, 23, 27, 30, 33, 34, 37, 40, 43, 46, 49, 50, 53, 58, 59, 64, 69, 74, 79, 83, 84, 88, 93, 97, 103, 107, 111, 112, 116, 120, 124, 125, 129, 133, 137, 141, 146, 150, 154, 158, 162, 166, 167, 171, 175, 179, 183, 187, 191
Offset: 1

Author

Nicholas M. R. Frieler, Aug 19 2024

Keywords

Comments

Do there exist arbitrarily large gaps between successive terms?

Examples

			7 is a term because the concatenation of 7, 14, 21, 28 is 7142128 which has 7 digits.
21 is not a term because the concatenation of 21, 42, ..., 168 has 20 digits but concatenating this with 168+21 = 189 gives a number with 23 digits.
		

Crossrefs

Cf. A375461 (increment by 1).

Programs

  • Mathematica
    SelfIncrementingQ[n_] := Module[{len=Length@IntegerDigits[n],num,c=1,numDigits=0},
      numDigits = len*Ceiling[(10^len - n)/n];
      If[numDigits >= n, Return[Mod[n, len] == 0]];
      num = Ceiling[10^len/n]*n;
      While[numDigits < n + 1,
        If[(len + c)*Ceiling[(10^(len + c) - num)/n] >= n - numDigits,
          Return[Mod[n - numDigits, len + c] == 0],
          numDigits += (len + c)*Ceiling[(10^(len + c) - num)/n]
           ];
        num += Ceiling[(10^(len + c) - num)/n]*n;
        c++;
       ]
     ]
    Select[Range[191],SelfIncrementingQ]

A375481 Starting numbers for the terms in A035333.

Original entry on oeis.org

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

Author

Nicholas M. R. Frieler, Aug 17 2024

Keywords

Examples

			a(19) = 12 since A035333(19) = 1213, the concatenation of 12 and 13.
a(20) =  1 since A035333(20) = 1234, the concatenation of 1, 2, 3 and 4.
		

Crossrefs

For the terms generated by consecutive concatenations see A035333.For concatenations of various numbers of consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).For primes that are the concatenation of two or more consecutive integers see A052087.

Programs

  • Mathematica
    ConsecutiveNumber[num_, numberOfNumbers_] := Module[{},
      If[numberOfNumbers == 1, Return[num]];
      FromDigits@(IntegerDigits[num]~Join~
         IntegerDigits@ConsecutiveNumber[num + 1, numberOfNumbers - 1])
     ]
    ConsecutiveNumberDigits[maxDigits_] := Module[{numList = {}, c, d},
      Do[
       numList =
         numList~Join~(Association[# -> ConsecutiveNumber[#, c]] & /@
            Range[Power[10, d - 1], Power[10, d] - 1]);,
       {d, 1, Floor[maxDigits/2]}, {c, 2, Floor[maxDigits/d]}
       ];
      SortBy[Select[numList, Values[#][[1]] < Power[10, maxDigits] &],
       Values[#] &]
     ]
    Keys[ConsecutiveNumberDigits[8]]//Flatten (* number in this line corresponds to the maximum number of digits of the concatenated terms *)
  • Python
    import heapq
    from itertools import islice
    def agen(): # generator of terms
        c = 12
        h = [(c, 1, 2)]
        nextcount = 3
        while True:
            (v, s, l) = heapq.heappop(h)
            yield s
            if v >= c:
                c = int(str(c) + str(nextcount))
                heapq.heappush(h, (c, 1, nextcount))
                nextcount += 1
            l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 70))) # Michael S. Branicky, Aug 18 2024

A375461 Self-consecutive numbers: numbers m such that there exists a nonnegative integer k for which the concatenation of m, m+1, ..., m+k is an m-digit number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168
Offset: 1

Author

Nicholas M. R. Frieler, Aug 17 2024

Keywords

Comments

Let d be the number of digits of m (in base 10). One can show that the number m is a member of this sequence if and only if:
1) m is divisible by d AND m < 10^d * d/(d+1)
OR
2) 10^d is divisible by d+1 AND m >= 10^d * d/(d+1).
Equivalently, integers m in the block 10^(d-1) <= m < 10^d are included in this sequence based on their relation to the value s = 10^d * d/(d+1). If m < s, then m is in this sequence iff m is divisible by d. If m >= s, m is in this sequence iff s is an integer. Note that for d = 2, s = 66.666... so no integers m in the range 66.666... <= m < 100 are in this sequence. For d = 3, s = 750 is an integer so all integers m in the range 750 <= m < 1000 are in this sequence. - Dominic McCarty, Sep 09 2024

Examples

			7 is a term because if we concatenate 7, 8, 9, 10, and 11, we get 7891011, which has 7 digits.
102 is a term because we can concatenate 102 with the next 33 consecutive integers to get a number with 34*3 = 102 digits.
68 is not a term because if we concatenate 68,69,...,100 we get a 67-digit number and concatenating 101 with this yields a 70-digit number, so it is not possible to achieve a 68-digit number.
		

Crossrefs

Cf. A035333 (concatenations), A375590.

Programs

  • JavaScript
    function next(m){let d=(""+m).length;if(m*(d+1)d*(10**d)){return next(10**d)}else{return m+d}}else{if((10**d)%(d+1)==0){return m+1}else{return next(10**d)}}}let m=0;a="";while(m<168){m=next(m);a+=m+", "}console.log(a) // Dominic McCarty, Sep 09 2024
  • Mathematica
    SelfConsecutiveQ[n_] :=
     Module[{len = Length@IntegerDigits[n], counter = 1, numDigits = 0},
      If[len*(Power[10, len] - n) >= n, Return[Mod[n, len] == 0],
       numDigits = len*(Power[10, len] - n)];
      Mod[n - numDigits, len + 1] == 0
     ]
    Select[Range[1000], SelfConsecutiveQ[#] &]

A374732 a(n) = a(n-1) + rotate(a(n-1), n-1 digits right) with a(1) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 77, 154, 569, 1264, 5390, 14443, 45887, 133345, 646679, 1443145, 6587459, 12553333, 43808666, 110246752, 321271427, 594484141, 736078625, 1598652232, 3920250884, 4804642909, 9095590955, 15005150050, 65055300101, 95065465156, 149717034662
Offset: 1

Author

Nicholas M. R. Frieler, Jul 17 2024

Keywords

Examples

			a(12) = a(11) + rotate(a(11), 11) = 14443 + rotate(14443, 11) = 14443 + 31444 = 45887.
		

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + FromDigits@RotateRight[IntegerDigits[a[n - 1]], n - 1]; arr = a[#] & /@ Range[1, 100]

A374734 a(n) = a(n-1) + rotate(a(n-1), n-1 digits left) with a(1) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 77, 154, 695, 1264, 3905, 4444, 8888, 17776, 93953, 133348, 481481, 1296295, 7591424, 11839015, 50854133, 92189218, 114081407, 928152547, 1182945362, 10636566544, 47203110650, 78309615370, 139846693679, 606783485077, 955291245755, 1201047201046
Offset: 1

Author

Nicholas M. R. Frieler, Jul 17 2024

Keywords

Examples

			Here we use -m (where m > 0) to represent rotating the digits of a number m digits to the left.
a(9) = a(8) + rotate(a(8), -8) = 695 + rotate(695, -8) = 695 + 569 = 1264.
		

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + FromDigits@RotateLeft[IntegerDigits[a[n - 1]], n - 1]; arr = a[#] & /@ Range[1, 100]
    nxt[{n_,a_}]:={n+1,a+FromDigits[RotateLeft[IntegerDigits[a],n]]}; NestList[nxt,{1,1},30][[;;,2]] (* Harvey P. Dale, Nov 08 2024 *)

A374733 a(n) = a(n-1) + rotate(a(n-1), n-2 digits left) with a(1) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 55, 110, 211, 332, 664, 1310, 1441, 2882, 11704, 52874, 105748, 586805, 1145485, 5996630, 9056596, 15962255, 41478217, 58892999, 154782298, 452937080, 1257466450, 7707592196, 9675299788, 18572052785, 46423909990, 145470333899, 484461788602
Offset: 1

Author

Nicholas M. R. Frieler, Jul 17 2024

Keywords

Examples

			a(13) = a(12) + rotate_left(a(12), 11) = 1310 + rotate_left(1310, 11) = 1310 + 0131 = 1441.
		

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + FromDigits@RotateLeft[IntegerDigits[a[n - 1]], n - 2]; arr = a[#] & /@ Range[1, 100]

A374731 a(n) = a(n-1) + rotate(a(n-1), n-2 digits right) with a(1) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 55, 110, 121, 332, 664, 1130, 2431, 4862, 7348, 12221, 24442, 46886, 133354, 266708, 1093378, 2027159, 4054318, 12459749, 37057240, 74114480, 81525928, 110341187, 220682374, 642750611, 759178117, 876937295, 1606524988, 10422590237, 20845180474, 62929698521, 84558995506
Offset: 1

Author

Nicholas M. R. Frieler, Jul 17 2024

Keywords

Examples

			a(12) = a(11) + rotate(a(11), 11) = 1130 + rotate(1130, 11) = 1130 + 1301 = 2431.
		

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + FromDigits@RotateRight[IntegerDigits[a[n - 1]], n - 2]; arr = a[#] & /@ Range[0, 100]

A374725 The "multiplicative comma sequence": the lexicographically earliest sequence of positive integers with the property that the sequence formed by the pairs of digits adjacent to the commas between the terms is the same as the sequence of successive ratios between the terms.

Original entry on oeis.org

1, 11, 121, 1331, 14641, 161051, 1771561, 19487171, 233846052, 5846151300
Offset: 1

Author

Nicholas M. R. Frieler, Jul 17 2024

Keywords

Comments

A more formal definition can be given as follows: a(1) = 1; for n > 1, let x be the least significant digit of a(n-1); then a(n) = a(n-1) * (10*x + y), with y being the most significant digit of a(n). Choose the smallest such y if such a y exists. If no such y exists, the sequence ends. We also restrict y to being a nonzero digit.
The sequence is given in its entirety as there is no possible next term after 5846151300.
Choosing other values for a(1) yields finite sequences up to a(1) = 10000 as long as a(1) is not of the form 1...0 otherwise the sequence is constant and infinite. For example, if a(1) = 120, then a(2) = 120 because 120 * 01 = 120.

Examples

			Replace each comma in the original sequence by the pair of digits adjacent to the comma; the result is the sequence of first ratios between the terms of the sequence:
Sequence: 1, 11, 121, 1331, 14641, 161051, 1771561, 19487171, 233846052, 5846151300
Ratios:    11, 11,  11,   11,    11,     11,      11,       12,        25
For example: a(9) = 233846052 = 12 * 19487171 = 12 * a(8)
		

Crossrefs

Cf. A121805.

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = For[x = Mod[a[n - 1], 10]; y = 1, y <= 9, y++, an = a[n - 1]*(10*x + y); If[y == IntegerDigits[an][[1]], Return[an]]]; Array[a, 10]