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: Jonathan Kal-El Peréz

Jonathan Kal-El Peréz's wiki page.

Jonathan Kal-El Peréz has authored 4 sequences.

A356647 Concatenation of runs {y..x} for each x>=1, using each y from 1 to x before moving on to the next value for x.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 3, 2, 3, 3, 1, 2, 3, 4, 2, 3, 4, 3, 4, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 3, 4, 5, 4, 5, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 3, 4, 5, 6, 4, 5, 6, 5, 6, 6, 1, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 4, 5, 6, 7, 5, 6, 7, 6, 7, 7, 1, 2, 3
Offset: 1

Author

Jonathan Kal-El Peréz, Aug 19 2022

Keywords

Comments

Alternate definition: Flattened list of all suffixes (ordered longest to shortest) of the list of all prefixes (ordered shortest to longest) of the list of positive integers. A prefix here is defined as any contiguous sublist of a list which includes the first element, and a suffix as any contiguous sublist of a list which includes the last element.
Also, concatenation of runs A002260(n)..A002024(n) for each n>=1.

Examples

			1
1 2
_ 2
1 2 3
_ 2 3
_ _ 3
1 2 3 4
_ 2 3 4
_ _ 3 4
_ _ _ 4...
		

Crossrefs

Programs

  • JavaScript
    a=n=>{for(let i=1;++i;){for(let j=0;++j
    				
  • MATLAB
    function a = A356647( max_x )
        a = cell2mat(arrayfun(@(x)(cell2mat(arrayfun(@(y)([y:x]),[1:x],'UniformOutput', false))) ...
            ,[1:max_x],'UniformOutput', false));
    end % Thomas Scheuerle, Sep 30 2022
    
  • Mathematica
    Print @ Flatten @ (Reverse@FoldList[Join[#2,#]&, {#}&/@Reverse@#]& /@ FoldList[Join, Table[{n},{n,1,10}]])
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        for k in count(1):
            for j in range(1, k+1):
                yield from range(j, k+1)
    print(list(islice(agen(), 87))) # Michael S. Branicky, Oct 11 2022

Formula

a(n) = A000120(A087118(n + 1)). - Thomas Scheuerle, Feb 16 2023
a(n*(n^2 + 5)/6) = a(A004006(n)) = n. This is the earliest appearance of n. - Thomas Scheuerle, Sep 30 2022

A325114 Integers k such that no nonzero subsequence of the decimal representation of k is divisible by 7.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 41, 43, 44, 45, 46, 48, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 64, 65, 66, 68, 69, 80, 81, 82, 83, 85, 86, 88, 89, 90, 92, 93, 94, 95, 96, 99, 100, 101, 102, 103, 104, 106, 108, 109, 110, 111, 113, 115, 116, 118, 120
Offset: 1

Author

Jonathan Kal-El Peréz, Mar 27 2019

Keywords

Comments

Does not contain 114 (helps to distinguish this from related sequences).
From David A. Corneth, Sep 10 2024: (Start)
Any term greater than 10^6 must have a digit 0. Proof: Any term between 10^6 and 10^7 has a 0.
Proof via induction and contradiction; any 7 digital number term has a digit 0. Suppose some number with k with q > 7 digits has no digit 0. Then floor(k/10) is a term and has no digit 0 and q - 1 digits. But there is no such number. A contradiction. Therefore any term with at least 7 digits has a digit 0. (End)

Crossrefs

Cf. A014261 (for 2), A325112 (for 3), A325113 (for 4), A261189 (for 5).
See A376046 for complement.

Programs

  • Mathematica
    With[{k = 7}, Select[Range@ 100, NoneTrue[DeleteCases[FromDigits /@ Rest@ Subsequences[IntegerDigits@ #], 0], Mod[#, k] == 0 &] &]] (* Michael De Vlieger, Mar 31 2019 *)
  • PARI
    \\ See Corneth link

Extensions

More than the usual number of terms are shown in order to distinguish this from a new sequence arising from the game of "buzz" (cf. A092433). - N. J. A. Sloane, Sep 09 2024

A325113 Positive integers whose decimal representation has no nonzero subsequence that is divisible by 4.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 15, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 35, 37, 39, 50, 51, 53, 55, 57, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 79, 90, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 110, 111, 113, 115, 117
Offset: 1

Author

Jonathan Kal-El Peréz, Mar 27 2019

Keywords

Comments

From Robert Israel, Apr 14 2020: (Start)
There are no digits 4 or 8.
If there is a digit 2 or 6, all previous digits must be even.
If there is a digit 0, all previous digits must be odd. (End)

Crossrefs

Cf. A014261 (for 2), A325112 (for 3), A261189 (for 5).

Programs

  • Maple
    filter:= proc(n) local L,i;
      L:= convert(n,base,10);
      if member(4,L) or member(8,L) then return false fi;
      if member(0,L,i) and hastype(L[i+1..-1],even) then return false fi;
      i:= ListTools:-SelectFirst(t -> t=2 or t=6, L,output=indices);
      i = NULL or not hastype(L[i+1..-1],odd);
    end proc:
    select(filter, [$1..300]); # Robert Israel, Apr 14 2020
  • Mathematica
    With[{k = 4}, Select[Range@ 120, NoneTrue[DeleteCases[FromDigits /@ Rest@ Subsequences[IntegerDigits@ #], 0], Mod[#, k] == 0 &] &]] (* Michael De Vlieger, Mar 31 2019 *)

Extensions

Corrected by Robert Israel, Apr 14 2020

A325112 Integers k such that no nonzero subsequence of the decimal representation of k is divisible by 3.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 14, 17, 20, 22, 25, 28, 40, 41, 44, 47, 50, 52, 55, 58, 70, 71, 74, 77, 80, 82, 85, 88, 100, 101, 104, 107, 110, 140, 170, 200, 202, 205, 208, 220, 250, 280, 400, 401, 404, 407, 410, 440, 470, 500, 502, 505, 508, 520, 550, 580, 700
Offset: 1

Author

Jonathan Kal-El Peréz, Mar 27 2019

Keywords

Comments

Integers whose decimal representation contains either just one nonzero digit, which is congruent to 1 or 2 (mod 3), or just two nonzero digits, which are either both == 1 (mod 3) or both == 2 (mod 3). - Robert Israel, Dec 25 2019

Examples

			From _David A. Corneth_, Sep 09 2024: (Start) 404 is in the sequence as its nonzero digits are (4,4). The nonzero subsequences of digits are (), (4), (4,4) with respective sums 0, 4, 8. None of these subsequences have a sum that is divisible by 3.
4160 is not in the sequence as one of its nonzero subsequences is (6) which sums to 6. As 6 is divisible by 3, 4160 is not in the sequence. (End)
		

Crossrefs

Cf. A014261 (for 2), A325113 (for 4), A261189 (for 5), A325114 (for 7).
A261188 is a subsequence.
A376045 is the complement.

Programs

  • Maple
    F:= proc(d) local i,j,k, g;
       g:= [1,2,4,5,7,8];
       op(sort([seq(i*10^(d-1),i=g), seq(seq(seq(i*10^(d-1) + j*10^k, j = select(t -> (t-i) mod 3 = 0, g)),k=0..d-2),i=g)]));
    end proc:
    seq(F(d),d=1..4); # Robert Israel, Dec 25 2019
  • Mathematica
    With[{k = 3}, Select[Range@ 700, NoneTrue[DeleteCases[FromDigits /@ Rest@ Subsequences[IntegerDigits@ #], 0], Mod[#, k] == 0 &] &]] (* Michael De Vlieger, Mar 31 2019 *)
  • Python
    from itertools import combinations
    def A325112(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, l = 0, len(str(x))
            for i in range(l):
                k = 10**i
                for j in (1,2,4,5,7,8):
                    if j*k<=x:
                        c += 1
            for a in combinations((10**i for i in range(l)),2):
                for b in ((1, 1), (1, 4), (1, 7), (2, 2), (2, 5), (2, 8), (4, 1), (4, 4), (4, 7), (5, 2), (5, 5), (5, 8), (7, 1), (7, 4), (7, 7), (8, 2), (8, 5), (8, 8)):
                    if a[0]*b[0]+a[1]*b[1] <= x:
                        c += 1
            return n+x-c
        return bisection(f,n,n) # Chai Wah Wu, Sep 10 2024