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.

Previous Showing 31-35 of 35 results.

A114801 2-concatenation-free sequence starting (1,2).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 121, 123, 124, 125, 126, 127, 128, 129, 131, 132, 134, 135, 136, 137, 138, 139, 141, 142, 143, 145, 146, 147, 148, 149, 151, 152, 153, 154, 156, 157, 158
Offset: 1

Views

Author

Jonathan Vos Post, Feb 18 2006

Keywords

Comments

Starting with the terms (1,2) this sequence consists of minimum increasing terms such that no term is the concatenation of any two previous distinct terms. The next consecutive number skipped after 121 is 122 = Concatenate(1, 22). This is the analog of a 2-Stöhr sequence with concatenation (base 10) substituting for addition. A033627 "0-additive sequence: not the sum of any previous pair" is another name for the 2-Stöhr sequence.

Crossrefs

Programs

  • Mathematica
    conc[x_, y_] := FromDigits@ Flatten@ IntegerDigits[{x, y}]; L = {1, 2}; cc = {12, 21}; Do[k = 1 + Max@L; While[MemberQ[cc, k], k++]; cc = Union[cc, conc[#, k] & /@ L, conc[k, #] & /@ L]; AppendTo[L, k];, {65}]; L (* Giovanni Resta, Jun 15 2016 *)
  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        cats1, cats2, an, s = {"1", "2"}, {"12", "21"}, 3, "3"
        yield from [1, 2]
        while True:
            yield an
            cats2 |= {s + c for c in cats1} | {c + s for c in cats1}
            cats1.add(s)
            while (s:=str(an)) in cats1 or s in cats2:
                an += 1
    print(list(islice(agen(), 59))) # Michael S. Branicky, Feb 01 2024

Formula

a(0) = 1, a(1) = 2, for n>2: a(n) = least k > a(n-1) such that k is not an element of {Concatenate(a(i), a(j))} for any distinct a(i) <= a(n-1) and a(j) <= a(n-1).

Extensions

Data corrected by Giovanni Resta, Jun 14 2016

A114802 3-concatenation-free sequence starting (1,2).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 121, 131, 141, 151, 161, 171, 181, 191, 200, 212, 232, 242, 252, 262, 272, 282, 292, 300, 313, 323, 343, 353, 363, 373, 383, 393, 400, 414, 424, 434, 454
Offset: 1

Views

Author

Jonathan Vos Post, Feb 18 2006

Keywords

Comments

Starting with the terms (1,2) this sequence consists of minimum increasing integer terms such that no term is the concatenation of any two or three previous distinct terms. The next consecutive numbers skipped after 121 are 122 = Concatenate(1,22) and 123 = Concatenate(1,2,3). This is the analog of a 3-Stöhr sequence with concatenation (base 10) substituting for addition. A026474 is a 3-Stöhr sequence.

Crossrefs

Programs

  • Mathematica
    conc[w_] := Flatten[ (FromDigits /@ Flatten /@ IntegerDigits /@ (Permutations[#]) &) /@ Subsets[w, {2, 3}]]; up = 10^3; L = {1, 2, 3}; cc = conc[L]; Do[k = 1 + Max@L; While[MemberQ[cc, k], k++]; If[k > up, Break[]]; Do[cc = Union[cc, Select[ conc[{k, L[[i]], L[[j]]}], # <= up &]], {i, Length[L]}, {j, i - 1}]; AppendTo[L, k], {60}]; L (* Giovanni Resta, Jun 15 2016 *)
  • Python
    from itertools import islice
    def incats(s, L, k):
        if s == "": return True
        if k == 0: return False
        return any(s.startswith(w) and incats(s[len(w):], L[:i]+L[i+1:], k-1) for i, w in enumerate(L))
    def agen(): # generator of terms
        L, an, s = ["1", "2"], 3, "3"
        yield from [1, 2]
        while True:
            yield an
            L.append(s)
            while incats((s:=str(an)), L, 3):
                an += 1
    print(list(islice(agen(), 70))) # Michael S. Branicky, Feb 01 2024

Formula

a(0) = 1, a(1) = 2, for n>2: a(n) = least k > a(n-1) such that k is not an element of {Concatenate[a(h),a(i),a(j)]} or {Concatenate[a(i),a(j)]} for any three distinct a(h), a(i), and a(j), where h, i, j < n.

Extensions

Corrected and edited by Giovanni Resta, Jun 15 2016

A119789 T(n, k) = floor(log_{goldenratio}(Fibonacci(n)*Fibonacci(k))), with T(n, k) = 0 for n < 3, T(n, 0) = n-2 for n > 2, triangle read by rows.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 4, 3, 3, 3, 4, 5, 6, 4, 4, 4, 5, 6, 7, 8, 5, 5, 5, 6, 7, 8, 9, 10, 6, 6, 6, 7, 8, 9, 10, 11, 12, 7, 7, 7, 8, 9, 10, 11, 12, 13, 14, 8, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16
Offset: 0

Views

Author

Roger L. Bagula, Jul 30 2006

Keywords

Examples

			Triangle begins as:
  0;
  0, 0;
  0, 0, 0;
  1, 1, 1, 2;
  2, 2, 2, 3, 4;
  3, 3, 3, 4, 5, 6;
  4, 4, 4, 5, 6, 7, 8;
  5, 5, 5, 6, 7, 8, 9, 10;
		

Crossrefs

Programs

  • Magma
    A119789:= func< n,k | n le 2 select 0 else k le 1 select n-2 else n+k-4 >;
    [A119789(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 17 2022
    
  • Mathematica
    f[n_, k_]= If[n<3, 0, If[k==0, n-2, Floor[Log[GoldenRatio, Fibonacci[n]*Fibonacci[k]]]]];
    Table[f[n, k], {n,0,12}, {k,0,n}]//Flatten
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[n<3, 0, If[k<2, n-2, n+k-4]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 17 2022 *)
  • SageMath
    def A119789(n,k):
        if (n<3): return 0
        elif (k<2): return n-2
        else: return n+k-4
    flatten([[A119789(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 17 2022

Formula

T(n, k) = floor(log_{goldenratio}(Fibonacci(n)*Fibonacci(k))), with T(n, k) = 0 for n < 3, T(n, 0) = n-2 for n > 2.
From G. C. Greubel, Dec 17 2022: (Start)
T(n, k) = n+k-4, with T(n, k) = 0 for n < 3, T(n, 0) = n-2 for n >= 3.
T(n, n) = 2*T(n, 0).
T(2*n, n) = 0*[n<2] + A016789(n-2)*[n>1].
T(2*n, n+1) = 3*A001477(n-1), for n > 0.
T(2*n, n-1) = A033627(n) - [n=1].
T(3*n, n) = n*[n<2] + 4*A000027(n-2)*[n>1].
Sum_{k=0..n} T(n, k) = 0*[n<2] + A140090(n-2)*[n>1].
Sum_{k=0..n} (-1)^k * T(n, k) = 0*[n<2] + (-1)^n*A064455(n-2)*[n>1]. (End)

Extensions

Edited by G. C. Greubel, Dec 17 2022

A244749 0-additive sequence: a(n) is the smallest number larger than a(n-1) that is not the sum of any subset of earlier terms, starting with initial values {2, 5}.

Original entry on oeis.org

2, 5, 6, 9, 10, 28, 29, 85, 86, 256, 257, 769, 770, 2308, 2309, 6925, 6926, 20776, 20777, 62329, 62330, 186988, 186989, 560965, 560966, 1682896, 1682897, 5048689, 5048690, 15146068, 15146069, 45438205, 45438206, 136314616, 136314617, 408943849, 408943850, 1226831548, 1226831549
Offset: 1

Views

Author

Keywords

Comments

This sequence differs from A003664.

Examples

			The numbers 11-27 are not in the sequence since some combination of the previous terms add to it. example 17=2+5+10.
The number 28 however is a term since no combination of the previous terms cannot be found which sum to 28.
		

References

  • R. K. Guy, "s-Additive sequences," preprint, 1994.

Crossrefs

Programs

  • Mathematica
    f[s_List] := f[n] = Block[{k = s[[-1]] + 1, ss = Union[ Plus @@@ Subsets[s]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#] &, {2, 5}, 20] (* or *)
    b = LinearRecurrence[{4, -3}, {9, 28}, 18]; Join[{2, 5, 6}, Riffle[b, b + 1]]
    Join[{2, 5, 6},LinearRecurrence[{-1, 3, 3},{9, 10, 28},36]] (* Ray Chandler, Aug 03 2015 *)
  • PARI
    Vec(x*(7*x^5+14*x^4+6*x^3-5*x^2-7*x-2)/((x+1)*(3*x^2-1)) + O(x^100)) \\ Colin Barker, Jul 11 2014

Formula

a(2n) = 4a(2n - 2) - 3a(2n - 4) and a(2n +1) = a(2n) +1, for n>2.
a(n) = -a(n-1) + 3*a(n-2) + 3*a(n-3) for n>6. - Colin Barker, Jul 11 2014
G.f.: x*(7*x^5+14*x^4+6*x^3-5*x^2-7*x-2) / ((x+1)*(3*x^2-1)). - Colin Barker, Jul 11 2014

A123031 Array read by antidiagonals: row i (i>=0) contains those positive integers n >= 2 for which the multiset { n mod k : k=2,3,...,n } contains exactly one copy of i.

Original entry on oeis.org

2, 3, 3, 5, 4, 5, 7, 6, 6, 7, 9, 8, 7, 8, 11, 11, 10, 9, 9, 12, 13, 13, 12, 11, 10, 13, 14, 17, 15, 14, 13, 12, 12, 15, 18, 19, 17, 16, 15, 14, 13, 14, 19, 20, 23, 19, 18, 17, 16, 15, 15, 16, 21, 24, 29, 21, 20, 19, 18, 17, 16, 17, 20, 25, 30, 31, 23, 22, 21, 20, 19, 18, 18, 21, 22
Offset: 1

Views

Author

Jared B. Ricks (jaredricks(AT)yahoo.com), Sep 24 2006

Keywords

Comments

In other words, for i >= 1, the i-th row contains all numbers n>2i such that n-i does not have divisors d with i < d < n-i. If p is the smallest prime divisor of n-i then (n-i)/p <= i.
Alternatively, the i-th row (i>=1) consists of 2i+1 and positive integers n>2i+1 such that the smallest prime divisor of n-i is greater than or equal to (n-i)/i = n/i - 1.

Examples

			For example, the 0th row obviously contains all prime numbers.
The first few rows of the array are
0) 2, 3, 5, 7, 11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,
1) 3, 4, 6, 8, 12,14,18,20,24,30,32,38,42,44,48,54,60,62,68,72,74,80,84,90,98,
2) 5, 6, 7, 9, 13,15,19,21,25,31,33,39,43,45,49,55,61,63,69,73,75,81,85,91,99,
3) 7, 8, 9, 10,12,14,16,20,22,26,32,34,40,44,46,50,56,62,64,70,74,76,82,86,92,
4) 9, 10,11,12,13,15,17,21,23,27,33,35,41,45,47,51,57,63,65,71,75,77,83,87,93,
5) 11,12,13,14,15,16,18,20,22,24,28,30,34,36,42,46,48,52,58,64,66,72,76,78,84,
6) 13,14,15,16,17,18,19,21,23,25,29,31,35,37,43,47,49,53,59,65,67,73,77,79,85,
...
		

Crossrefs

Rows: A000040, A008864, ...; columns: A004280, A051755, ...; diagonal starting with 2: A033627.

Extensions

Additional comments from Max Alekseyev, Sep 26 2006
Previous Showing 31-35 of 35 results.