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: Jan Snellman

Jan Snellman's wiki page.

Jan Snellman has authored 13 sequences. Here are the ten most recent ones:

A382751 Numbers k for which the 3-adic valuation A007949(k) == 0 (mod 3).

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 27, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 54, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95
Offset: 1

Author

Jan Snellman, May 12 2025

Keywords

Comments

Positive integers k for which the number of trailing 0 digits, which written in ternary, is a multiple of 3.
"Selective sifting" of the positive integers w.r.t. S={3,9}, where s(S) = {positive integers n: n cannot be written n = a*b with a in S, b in s(S), b < n}.
In other words, s(S) is determined by the fact that {s(S), S*s(S)} is a partition of the positive integers.
The asymptotic density of this sequence is 9/13. - Amiram Eldar, Jul 23 2025

Examples

			7 is a term since its 3-adic valuation is A007949(7) = 0 which is == 0 (mod 3).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Divisible[IntegerExponent[#, 3], 3] &] (* Amiram Eldar, May 13 2025 *)
  • PARI
    isok(k) = (valuation(k, 3) % 3) == 0; \\ Michel Marcus, Jun 03 2025

A382750 If k appears, 9*k does not.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 1

Author

Jan Snellman, May 09 2025

Keywords

Comments

Integers k with val(k, 9) even, where val(k, 9) is the 9-adic valuation of k.
Natural density 9/10.
Differs from A168183: 81 for example is not in A168183 but in this sequence. - R. J. Mathar, May 26 2025

Examples

			18 = 9*2 is not a term because 2 is a term.
162 = 9*18 is a term since 18 is not a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[IntegerExponent[#, 3], 4] < 2 &] (* Amiram Eldar, May 12 2025 *)
  • Python
    from sympy import integer_log
    def A382750(n):
        def f(x): return n+x-sum((k:=x//9**m)-k//9 for m in range(0,integer_log(x,9)[0]+1,2))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, May 24 2025
  • SageMath
    [ for  in range(1,100+1) if (valuation(_,3) % 4) < 2 ]
    

A382747 Greedy partition of the positive integers into arithmetic progressions of length at most 4.

Original entry on oeis.org

1, 2, 3, 4, 5, 10, 15, 20, 6, 12, 18, 24, 7, 14, 21, 28, 8, 16, 0, 0, 9, 0, 0, 0, 11, 22, 33, 44, 13, 26, 39, 52, 17, 34, 51, 68, 19, 38, 57, 76, 23, 46, 69, 92, 25, 50, 75, 100, 27, 54, 81, 108, 29, 58, 87, 116, 30, 60, 90, 120, 31, 62, 93, 124, 32, 64, 96, 128, 35, 70, 105, 140, 36, 72, 0, 0, 37, 74, 111, 148, 40, 80, 0, 0
Offset: 1

Author

Jan Snellman, Apr 23 2025

Keywords

Comments

Table by rows, rows have length 4.
Elements are a permutation of positive integers, intermixed with zeros.
Expanded description: Partition the positive integers into arithmetic progressions of the form k, 2k, 3k, 4k, putting every positive integer into the first progressions where it fits, allowing shortened progressions (which are padded with zeros):
k, 0, 0, 0;
k, 2k, 0, 0;
k, 2k, 3k, 0.
Construction:
1. Start by matrix M with rows indexed by positive integers, columns by 1,2,3,4.
2. M_ij = i*j.
3. Proceeding row by row, then column by column, if M_ij = M_rk with r < i, set M_is = 0 for i <= s <= 4; if j=0, remove entire row.
4. Call the resulting matrix A.
So starting with
M = [ 1 2 3 4]
[ 2 4 6 8]
[ 3 6 9 12]
[ 4 8 12 16]
[ 5 10 15 20]
[ 6 12 18 24]
[ 7 14 21 28]
[ 8 16 24 32]
[ 9 18 27 36]
[10 20 30 40]
[11 22 33 44]
[12 24 36 48]
[13 26 39 52]
[14 28 42 56]
[15 30 45 60]
[16 32 48 64]
[17 34 51 68]
[18 36 54 72]
[19 38 57 76]
[20 40 60 80]
we arrive at
A = [ 1 2 3 4]
[ 5 10 15 20]
[ 6 12 18 24]
[ 7 14 21 28]
[ 8 16 0 0]
[ 9 0 0 0]
[ 11 22 33 44]
[ 13 26 39 52]
[ 17 34 51 68]
[ 19 38 57 76]
Every row in A is an arithmetic progression (even when 0 is adjoined), and every positive integer occurs at precisely one position.
Thus we get a partition of the positive integers into parts which are arithmetic progressions; using this partition for every prime number p yields a regular (in the sense of Narkiewicz) convolution product on the vector space of arithmetic functions.
The first column of A contains those b such that p^b is primitive.
Alternative construction:
Form an infinite rooted tree T on the nonnegative integers in the following way.
1. 0 is the root.
2. Form a branch 0 - 1 - 2 -3 - 4.
3. Proceed inductively. Add n to end of an existing branch as either
0 - k=n
0 - k - 2k=n
0 - k - 2k - 3k=n
0 - k - 2k - 3k - 4k=n
with a preference for smaller k.
4. After infinitely many steps you have constructed T.
5. Read the positive integers branch by branch.

Examples

			Up to n=15 the branches of the aforementioned tree looks like
  0 -  1 -  2 -  3 - 4,
  0 -  5 - 10 - 15,
  0 -  6 - 12,
  0 -  7 - 14,
  0 -  8,
  0 -  9,
  0 - 11,
  0 - 13;
but since 20=5*4 the second branch may not be complete, so at this stage we only know the first row of the matrix A. Adding 16, 17, 18, 19, 20 we get
  0 -  1 -  2 -  3 -  4,
  0 -  5 - 10 - 15 - 20,
  0 -  6 - 12 - 18,
  0 -  7 - 14,
  0 -  8 - 16,
  0 -  9,
  0 - 11,
  0 - 13,
  0 - 17,
  0 - 19;
and now we know the first two rows of A.
		

Crossrefs

First column yields A382748.
A382749(n) = column where n occurs in this matrix.
The case length=2 is A036552, when the latter is interpreted as a matrix with two columns.

Programs

  • Python
    def A382747_generator(blocklength=4):
        a_set = set()
        a0 = 1
        while 1:
            while a0 in a_set:
                a_set.remove(a0)
                a0 += 1
            for i in range(1,blocklength+1):
                a = i*a0
                if i != 1 and a in a_set:
                    for j in range(blocklength-i+1): yield 0
                    break
                yield a
                a_set.add(a) # Pontus von Brömssen, Apr 30 2025
  • SageMath
    def greedy_matrix(blocklength=2,initial_cols=20):
        m, n = blocklength, initial_cols
        A = matrix(ZZ, m,n, lambda i,j: (i+1)*(j+1))
        for c in range(2, n+1):
            for r in range(1, m+1):
                prev = set(flatten([list() for  in A.columns()[:(c-1)]]))
                v = A[r-1, c-1]
                if v in prev:
                    for j in range(r, m+1):
                        A[j-1,c-1] = 0
                    break
        return A
    def pruned_greedy_matrix(blocklength=2, initial_cols=20):
        A = greedy_matrix(blocklength=blocklength, initial_cols=initial_cols)
        return matrix([ for  in A.columns() if add(_) > 0]).transpose()
    pruned_greedy_matrix(blocklength=4, initial_cols=20)
    

A382749 Position in block for greedy partition of length 4.

Original entry on oeis.org

1, 2, 3, 4, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 4, 3, 2, 1, 4, 1, 2, 1, 4, 1, 1, 1, 1, 3, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 2, 3, 4, 1, 2, 1, 1, 3, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 3, 2, 1, 2, 1, 2, 3, 4, 1, 1, 1, 2, 3, 2, 1, 2, 1, 2, 3, 1, 1, 3, 1, 4, 3, 2, 1, 3, 1, 2, 1, 4
Offset: 1

Author

Jan Snellman, Apr 24 2025

Keywords

Comments

a(n) = height of n with respect to the greedy convolution of length 4.
Position of n i block containing it for the greedy partition of length 4 of the positive integers.
a(n) = the column (one-indexed) in which n occurs in the infinite matrix A382747.

Crossrefs

a(n) = column index of the unique position in the infinite matrix A382747 in which n occurs.
a(n) = 1 iff n is "primitive" with respect to the greedy convolution of length 4 i.e. if n occurs in A382748.

A382748 Primitive exponents for the greedy convolution of length 4.

Original entry on oeis.org

1, 5, 6, 7, 8, 9, 11, 13, 17, 19, 23, 25, 27, 29, 30, 31, 32, 35, 36, 37, 40, 41, 42, 43, 45, 47, 48, 49, 53, 55, 56, 59, 61, 63, 65, 66, 67, 71, 73, 77, 78, 79, 83, 85, 88, 89, 91, 95, 97, 99, 101, 102, 103, 104, 107, 109, 113, 114, 115, 117, 119, 121, 125, 127, 131, 133, 135, 136, 137, 138, 139
Offset: 1

Author

Jan Snellman, Apr 24 2025

Keywords

Comments

Integers n such that p^n is primitive for the "greedy convolution of length 4" when p is a prime number.
Smallest elements in the blocks of the greedy partition of the positive integers into parts of length at most 4.
First column of A382747.
Strict definition:
Form an infinite rooted tree T on the nonnegative integers in the following way.
1. 0 is the root
2. Form a branch 0 - 1 - 2 -3 - 4
3. Proceed inductively. Add n to end of an existing branch as either
0 - k=n
0 - k - 2k=n
0 - k - 2k - 3k=n
0 - k - 2k - 3k - 4k=n
with a preference for smaller k.
The primitive elements are the integers at distance one from the root.

Examples

			Up to n=15 the branches of the aforementioned tree looks like
  0 - 1 - 2 - 3 - 4
  0 - 5 - 10 - 15
  0 - 6 - 12
  0 - 7 - 14
  0 - 8
  0 - 9
  0 - 11
  0 - 13
so the primitive elements <= 15 are 1, 5, 6, 7, 8, 9, 11, 13.
		

Crossrefs

First column of A382747.
Cf. A121537.

Programs

A382746 If k appears, 8*k does not.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79
Offset: 1

Author

Jan Snellman, Apr 04 2025

Keywords

Comments

Also: integers of the form 2^m*r, r odd, m congruent to 0, 1, 2 mod 6.
The asymptotic density of this sequence is 8/9. - Amiram Eldar, May 31 2025

Examples

			8, 16, ... , 56 are removed, but 8*8 = 64 remains.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[IntegerExponent[#, 2], 6] < 3 &] (* Amiram Eldar, Apr 04 2025 *)
  • PARI
    isok(k) = valuation(k, 2) % 6 < 3; \\ Amiram Eldar, May 31 2025
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None, typed=True)
    def in_sieve(n, S):
        if n == 1:
            return True
        elif n in S:
            return False
        else:
            L = [s for s in S if (n % s) == 0]
            return all(not in_sieve(n/ell, S) for ell in L )
    def nth_in_sieve(n, S):
        if n == 1:
            return 1
        else:
            i, m = 1, 1
            while i < n:
                m = m+1
                if in_sieve(m, S):
                    i = i+1
        return m
    def a(n):
        return nth_in_sieve(n, tuple([8]))
    
  • Python
    def A382746(n):
        def f(x): return n+x-sum((x>>m)+1>>1 for m in range(x.bit_length()+1) if m%6<3)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 10 2025
    
  • Sage
    [ for  in range(1,100) if (valuation(_,2) % 6) < 3]
    

A382744 If k appears, 5*k does not.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84
Offset: 1

Author

Jan Snellman, Apr 04 2025

Keywords

Comments

Also: numbers with an even number of 5's in their prime factorization.
Natural density 5/6.

Examples

			5 is removed since 5 = 5*1, 10 is removed, 15 is removed, 20 is removed, but 25 remains.
		

Crossrefs

Programs

  • Maple
    select(t -> padic:-ordp(t,5)::even, [$1..100]); # Robert Israel, Apr 04 2025
  • Mathematica
    Select[Range[100], EvenQ[IntegerExponent[#, 5]] &] (* Amiram Eldar, Apr 04 2025 *)
  • Python
    def ok(n):
        c = 0
        while n and n%5 == 0: n //= 5; c += 1
        return c&1 == 0
    print([k for k in range(1, 82) if ok(k)]) # Michael S. Branicky, Apr 04 2025
    
  • Python
    from sympy import integer_log
    def A382744(n):
        def f(x): return n+x-sum((k:=x//5**m)-k//5 for m in range(0,integer_log(x,5)[0]+1,2))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 10 2025
  • SageMath
    [ for  in range(1,100) if (valuation(_,5) % 2) == 0]
    

Formula

a(n) ~ (6/5)*n.

A382745 If k appears, 7*k does not.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 85
Offset: 1

Author

Jan Snellman, Apr 04 2025

Keywords

Comments

Also numbers with an even number of 7's in their prime factorization.
Natural density 7/8.

Examples

			7 is removed since 7 = 7*1, 14, 21, 28, 35, 42 are removed, but 49 remains.
		

Crossrefs

Programs

  • Maple
    q:= n-> is(irem(padic[ordp](n,7), 2)=0):
    select(q, [$1..85])[];  # Alois P. Heinz, Apr 04 2025
  • Mathematica
    Select[Range[100], EvenQ[IntegerExponent[#, 7]] &] (* Amiram Eldar, Apr 04 2025 *)
  • Python
    def ok(n):
        c = 0
        while n and n%7 == 0: n //= 7; c += 1
        return c&1 == 0
    print([k for k in range(1, 86) if ok(k)]) # Michael S. Branicky, Apr 04 2025
    
  • Python
    from sympy import integer_log
    def A382745(n):
        def f(x): return n+x-sum((k:=x//7**m)-k//7 for m in range(0,integer_log(x,7)[0]+1,2))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 10 2025

Formula

a(n) ~ (8/7)*n.

A086159 Number of partitions of n into the first three triangular numbers, 1, 3 and 6.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 4, 4, 6, 6, 6, 9, 9, 9, 12, 12, 12, 16, 16, 16, 20, 20, 20, 25, 25, 25, 30, 30, 30, 36, 36, 36, 42, 42, 42, 49, 49, 49, 56, 56, 56, 64, 64, 64, 72, 72, 72, 81, 81, 81, 90, 90, 90, 100, 100, 100, 110, 110, 110, 121, 121, 121, 132, 132, 132
Offset: 0

Author

Jan Snellman, Aug 25 2003

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 1, -1, 0, 1, -1, 0, -1, 1}, {1, 1, 1, 2, 2, 2, 4, 4, 4, 6}, 100] (* Amiram Eldar, Feb 14 2023 *)

Formula

G.f.: 1/((1-x)*(1-x^3)*(1-x^6)).
Sum_{n>=0} 1/a(n) = Pi^2/2 + 3. - Amiram Eldar, Feb 14 2023

A084913 Number of monomial ideals in two variables that are Artinian, integrally closed and of colength n.

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 11, 17, 23, 28, 39, 48, 59, 79, 100, 121, 152, 185, 225, 280, 338, 404, 492, 584, 696, 835, 983, 1162, 1385, 1612
Offset: 0

Author

Jan Snellman and Michael Paulsen, Jul 03 2003

Keywords

Comments

Alternatively, "concave partitions" of n, where a concave partition is defined by demanding that the monomial ideal, generated by the monomials whose exponents do not lie in the Ferrers diagram of the partition, is integrally closed.

Examples

			a(4) = 4 because the Artinian monomial ideals in two variables that have colength 4 are (x^4,y), (x^3,y^2), (x^2, y^2), (x^2,xy,y^3), (x,y^4), corresponding to the partitions (1,1,1,1), (3,1), (2,2), (2,1,1), (4); the ideal (x^2,y^2) is not integrally closed, hence the partition (2,2) is not concave.
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley Publishing Company, 1976.
  • M. Paulsen & J. Snellman, Enumerativa egenskaper hos konkava partitioner (in Swedish), Department of Mathematics, Stockholm University.

Crossrefs