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-10 of 14 results. Next

A377917 Number of n-digit terms in A377912.

Original entry on oeis.org

10, 66, 489, 3631, 26951, 200045, 1484850, 11021410, 81807240, 607220362, 4507138581, 33454573430, 248319075015, 1843166918425, 13681044394077, 101548575900358, 753751904485831, 5594779921615960, 41527672679871145, 308242258385100002, 2287951231622970075, 16982489246315828049
Offset: 1

Views

Author

Keywords

Comments

Also number of n-digit terms in A342042.
a(1149) has 1001 digits. - Michael S. Branicky, Nov 30 2024
The terms of A377912 as decimal digit strings are a regular language so can be counted using the transitions in a state machine matching those strings. - Kevin Ryde, Dec 01 2024

Examples

			The 66 two-digit terms in A377912 are
  10,11,12,13,14,15,16,17,18,19,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,
  38,39,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,67,68,69,70,71,72,73,74,
  75,76,77,78,79,89,90,91,92,93,94,95,96,97,98,99.
There is an obvious division into 5 blocks of size 10 and blocks of sizes 7, 5, 3, and 1.
		

Crossrefs

First differences of A377918.

Programs

  • Mathematica
    LinearRecurrence[{5, 15, 20, 15, 6, 1}, {10, 66, 489, 3631, 26951, 200045, 1484850}, 25] (* Paolo Xausa, Dec 01 2024 *)

Formula

From Kevin Ryde, Dec 01 2024: (Start)
a(n) = 5*a(n-1) + 15*a(n-2) + 20*a(n-3) + 15*a(n-4) + 6*a(n-5) + a(n-6) for n>=8.
G.f.: -1 + x + (1+x)^4 / (1 - 5*x - 15*x^2 - 20*x^3 - 15*x^4 - 6*x^5 - x^6). (End)

Extensions

a(6) and beyond from Michael S. Branicky, Nov 30 2024

A377918 a(n) = index in A377912 (or, equally, in A342042) of the first n-digit term.

Original entry on oeis.org

1, 11, 77, 566, 4197, 31148, 231193, 1716043, 12737453, 94544693, 701765055, 5208903636, 38663477066, 286982552081, 2130149470506, 15811193864583, 117359769764941, 871111674250772, 6465891595866732, 47993564275737877, 356235822660837879, 2644187054283807954, 19626676300599636003
Offset: 1

Views

Author

Keywords

Comments

These are the points in the graph of A342042 where the separate paths come together.
The first differences are in A377917, which is the more fundamental sequence. To get this sequence from A377917, add an initial zero, take partial sums, and add 1 to each term.

Crossrefs

Programs

  • Maple
    A377918 := proc(n) local S; option remember;
    S:=[1, 11, 77, 566, 4197, 31148, 231193, 1716043];
    if n <= 8 then S[n] else
    6*A377918(n-1)+10*A377918(n-2)+5*A377918(n-3)-5*A377918(n-4)-9*A377918(n-5)-5*A377918(n-6)-A377918(n-7); fi;
    end;
    [seq(A377918(i),i=1..20)];
  • Mathematica
    LinearRecurrence[{6, 10, 5, -5, -9, -5, -1}, {1, 11, 77, 566, 4197, 31148, 231193, 1716043}, 25] (* Paolo Xausa, Dec 02 2024  *)

Formula

G.f. = (x^7+6*x^6+15*x^5+19*x^4+11*x^3-x^2-5*x-1)/((1-x)*(x^6+6*x^5+15*x^4+20*x^3+15*x^2+5*x-1)) (From g.f. for A377917).
Recurrence: See Maple code.
The smallest root of the denominator of the g.f. is 0.134724138401519... whose reciprocal is (say) c1 = 7.422574840... Then a(n) is asymptotically c2*c1^n, for n >= 0, where c2 = 1.3824387... This is an excellent approximation. It gives a(22) = 0.1962667617*10^20, compared with a(22) = 19626676300599636003.
This also enables us to give a formula for the lower envelope of A342042 - see that entry for details.

Extensions

More terms added based on A377917. - N. J. A. Sloane, Dec 01 2024

A377915 a(n) = m means A342042(n) is the m-th term of A377912.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 28, 14, 15, 43, 16, 17, 56, 18, 19, 67, 20, 21, 22, 44, 23, 24, 57, 25, 26, 68, 27, 29, 30, 31, 32, 45, 33, 34, 58, 35, 36, 69, 37, 38, 39, 59, 40, 41, 70, 42, 46, 47, 48, 49, 60, 50, 51, 71, 52, 53, 54, 72, 55, 61, 62, 63, 64, 73, 65, 66, 74, 75, 76, 77, 78, 201, 79, 80, 310, 81, 82, 406, 83, 84, 491, 85, 86, 87, 88, 202, 203
Offset: 1

Views

Author

N. J. A. Sloane, Nov 29 2024

Keywords

Comments

That is, a(n) = m means A342042(n) = A377912(m).
The reason for looking at this is that A342042 is a permutation of A377912. But not all nonnegative integers appear in either sequence. The present sequence shows the numbers in A342042 in the order in which they appear in A377912. It is a permutation of the natural numbers. A377916 gives the inverse permutation.

Examples

			A342042(14) = 30 is the 28-th term of A377912, so a(14) = 38.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A342042 When a digit d in the digit-stream of this sequence is even, the next digit is > d.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 30, 13, 14, 50, 15, 16, 70, 17, 18, 90, 19, 23, 24, 51, 25, 26, 71, 27, 28, 91, 29, 31, 32, 33, 34, 52, 35, 36, 72, 37, 38, 92, 39, 45, 46, 73, 47, 48, 93, 49, 53, 54, 55, 56, 74, 57, 58, 94, 59, 67, 68, 95, 69, 75, 76, 77, 78, 96, 79, 89, 97, 98, 99, 101
Offset: 1

Views

Author

Eric Angelini, Feb 26 2021

Keywords

Comments

The definition refers to the digit-stream in the sequence (ignoring the commas), which starts 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2, 3, 0, ...
The sequence is always extended with the smallest nonnegative integer not yet present that doesn't lead to a contradiction.
Theorem: The sequence contains every nonnegative integer except those in A347298.
Proved in September 2021. See S.K. link for a new, more detailed proof. - Sebastian Karlsson, Nov 28 2024. See N.J.A.S. link for an alternative, shorter, proof. - N. J. A. Sloane, Nov 29 2024
Comments added by N. J. A. Sloane, Dec 04 2024 (Start):
Let S = present sequence, P = A377912. By definition the terms in P appear in their natural order. There are A377917(k) terms in P of decimal length k >= 1. They form a consecutive block in P, starting at P(i1) and ending at P(i2), where i1 = A377918(k), i2 = A377918(k+1)-1.
We know S contains exactly the same terms as P, but in a different order.
Conjecture 1. For k >= 1, the terms of length k in S form a consecutive block with the same starting and ending points as in P. In both P and S, the block begins with 10101... (1's and 0's alternate, length is k) and end with 99...9 (k 9's).
Conjecture 2. We know every number appears in S. Suppose x = S(m) = 899...9 (with k-1 9's). Then x is the last term of length k in S that begins with a digit <= 8. The remaining terms of length k have leading digit 9 and appear in order, ending with 99...9 (k 9's).
(Some k-digit numbers beginning with 9 may appear before x.)
(End)
Comment from N. J. A. Sloane, Dec 01 2024 (Start)
Let c1 = 7.422574840... and c2 = 1.3824387... be the constants defined in A377918. Then assuming Conjecture 1, the index of the last term of length k in the present sequence is close to (c2*c1^k, 10^k). [Thanks to Sebastian Karlsson for pointing out that Conjecture 1 is required and is as yet unproved.]
Let x = c2*c1^k, and express k in terms of x.
Then this point has coordinates (x,y) where y = (x/c2)^c3, with c3 = (log 10)/(log c1) = 1.14869... This defines a curve that is a good approximation to the lower envelope of the present sequence.
For example, the fifth meeting point has coordinates (31148, 101010) (see A377918) and the formula here gives (x,y) = (31148, 100003.0039).
(End)
Comment from Sebastian Karlsson, Dec 12 2024: (Start)
Theorem: Let d be in {1, 2, ..., 8}. For every positive integer k, the k-digit number d99...9 appears in the sequence before the k-digit number (d+1)99...9.
A proof can be found in the links. Since all k-digit numbers starting with 9 appears before any (k+1)-digit number, we get that terms of a certain length form a consecutive block. In particular, this proves Conjectures 1 and 2 above.
(End)

Crossrefs

Cf. A342043, A342044, A342045, A342046 and A342047 (variations on the same idea).
See A377913 and A377914 for records.
See also A347298.

Programs

  • PARI
    \\ See Links section.
    
  • Python
    def cond(s, minfirst):
        return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i] in "02468")
    def aupton(terms):
        alst, seen = [0], {0}
        while len(alst) < terms:
            d = alst[-1]%10
            an = minfirst = (1 - d%2)*(d+1)
            stran = str(an)
            while an in seen or not cond(stran, minfirst):
                an += 1
                stran = str(an)
                if int(stran[0]) < minfirst:
                    an = minfirst*10**(len(stran)-1)
            alst.append(an); seen.add(an)
        return alst
    print(aupton(77)) # Michael S. Branicky, Sep 07 2021

Extensions

Edited by N. J. A. Sloane, Nov 24 2024

A347298 Numbers that contain an even digit d immediately followed by a digit <= d.

Original entry on oeis.org

20, 21, 22, 40, 41, 42, 43, 44, 60, 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, 84, 85, 86, 87, 88, 100, 120, 121, 122, 140, 141, 142, 143, 144, 160, 161, 162, 163, 164, 165, 166, 180, 181, 182, 183, 184, 185, 186, 187, 188, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215
Offset: 1

Views

Author

N. J. A. Sloane, Aug 26 2021

Keywords

Comments

Conjecture: This is precisely the list of numbers missing from A342042.
The conjecture is correct, see A342042 for details. - Sebastian Karlsson, Oct 02 2021

Crossrefs

Cf. A342042, A377912 (complement).

Programs

  • Mathematica
    A347298Q[k_] := MemberQ[Partition[IntegerDigits[k], 2, 1], {i_?EvenQ, j_} /; j <= i];
    Select[Range[300], A347298Q] (* Paolo Xausa, Mar 17 2025 *)
  • Python
    def ok(n):
        s = str(n)
        return any(s[i] in "2468" and s[i+1] <= s[i] for i in range(len(s)-1))
    print([k for k in range(216) if ok(k)]) # Michael S. Branicky, Nov 28 2024

A382465 Positive integers such that every even digit except the first is immediately preceded by a smaller digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 38, 39, 41, 43, 45, 46, 47, 48, 49, 51, 53, 55, 56, 57, 58, 59, 61, 63, 65, 67, 68, 69, 71, 73, 75, 77, 78, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99
Offset: 1

Views

Author

Paolo Xausa, Mar 28 2025

Keywords

Comments

Conjecture: these are the terms of A382462, sorted.

Crossrefs

Programs

  • Mathematica
    A382465Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?EvenQ} /; i >= j];
    Select[Range[100], A382465Q]
  • Python
    def ok(n):
        s = str(n)
        return n and all(d not in "02468" or s[i-1] 0)
    print([k for k in range(100) if ok(k)]) # Michael S. Branicky, Apr 30 2025

A382624 Positive integers such that every even digit except the leftmost is immediately preceded by a larger digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 20, 21, 23, 25, 27, 29, 30, 31, 32, 33, 35, 37, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 53, 54, 55, 57, 59, 60, 61, 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90
Offset: 1

Views

Author

Paolo Xausa, Apr 01 2025

Keywords

Comments

Conjecture: these are the terms of A382621, sorted.

Crossrefs

Cf. A377912, A382465, A382621, A382623 (complement).

Programs

  • Mathematica
    A382624Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?EvenQ} /; i <= j];
    Select[Range[100], A382624Q]
  • Python
    def ok(n):
        s = str(n)
        return all(s[i+1] < s[i] for i in range(len(s)-1) if s[i+1] in "02468")
    print([k for k in range(1, 91) if ok(k)]) # Michael S. Branicky, Apr 03 2025

A383062 Nonnegative integers such that every odd digit except the leftmost is immediately preceded by a smaller digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 42, 44, 45, 46, 47, 48, 49, 50, 52, 54, 56, 57, 58, 59, 60, 62, 64, 66, 67, 68, 69, 70, 72, 74, 76, 78, 79, 80, 82, 84, 86, 88, 89, 90
Offset: 1

Views

Author

Paolo Xausa, Apr 18 2025

Keywords

Comments

Conjecture: these are the terms of A383059, sorted.

Crossrefs

Programs

  • Mathematica
    A383062Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?OddQ} /; i >= j];
    Select[Range[0, 100], A383062Q]
  • Python
    def ok(n):
        s = str(n)
        return all(s[i+1] > s[i] for i in range(len(s)-1) if s[i+1] in "13579")
    print([k for k in range(91) if ok(k)]) # Michael S. Branicky, Apr 19 2025

A382938 Nonnegative integers such that every odd digit except the leftmost is immediately preceded by a larger digit.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 21, 22, 24, 26, 28, 30, 31, 32, 34, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 58, 60, 61, 62, 63, 64, 65, 66, 68, 70, 71, 72, 73, 74, 75, 76, 78, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Paolo Xausa, Apr 14 2025

Keywords

Crossrefs

Programs

  • Mathematica
    A382938Q[k_] := FreeQ[Partition[IntegerDigits[k], 2, 1], {i_, j_?OddQ} /; i <= j];
    Select[Range[0, 100], A382938Q]
  • Python
    def ok(n):
        s = str(n)
        return all(s[i+1] < s[i] for i in range(len(s)-1) if s[i+1] in "13579")
    print([k for k in range(96) if ok(k)]) # Michael S. Branicky, Apr 14 2025

A383246 Positive integers without the digit 0 such that every even digit except the rightmost is immediately followed by a smaller digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 91, 92, 93, 94, 95, 96, 97, 98, 99
Offset: 1

Views

Author

Paolo Xausa, Apr 20 2025

Keywords

Comments

Conjecture: these are the terms of A342043, sorted.

Crossrefs

Programs

  • Mathematica
    A383246Q[k_] := FreeQ[#, 0] && FreeQ[Partition[#, 2, 1], {i_?EvenQ, j_} /; j >= i] &  [IntegerDigits[k]];
    Select[Range[200], A383246Q]
  • Python
    def ok(n):
        s = str(n)
        return "0" not in s and all(d not in "02468" or s[i]Michael S. Branicky, Apr 28 2025
Showing 1-10 of 14 results. Next