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: Vincent Champain

Vincent Champain's wiki page.

Vincent Champain has authored 4 sequences.

A309706 Smallest number that contains the first n primes as substrings in base 10. Substrings go from left to right, but numbers in the substrings can be separated by several numbers.

Original entry on oeis.org

2, 23, 235, 2357, 112357, 112357, 112357, 1123579, 1123579, 1123579, 1231579, 1231579, 12341579, 12431579, 12431579, 12453179, 12453179, 124536179, 124536179, 1124536719, 1234567139, 1234567139, 12345671839, 12345671839, 12456783197, 102456783197, 102456783197, 102456783197
Offset: 1

Author

Vincent Champain, Aug 28 2019

Keywords

Comments

The version with subsequences of contiguous numbers is A054261.
The sequence is nondecreasing, by definition.

Examples

			The series starts as A054261, but 112357 is followed by 112357 because 13 can be obtained with a subsequence '1','3' which is interrupted by '2'.
		

Crossrefs

Formula

a(n) <= A054261(n). - David A. Corneth, Aug 28 2019

Extensions

a(11)-a(28) from David A. Corneth, Aug 28 2019

A306334 a(n) is the number of different linear hydrocarbon molecules with n carbon atoms.

Original entry on oeis.org

1, 3, 4, 10, 18, 42, 84, 192, 409, 926, 2030, 4577, 10171, 22889, 51176, 115070, 257987, 579868, 1301664, 2925209, 6569992, 14763529, 33166848, 74527233, 167446566, 376253517, 845401158, 1899609267, 4268309531, 9590827171, 21550227328, 48422972296, 108805058758
Offset: 1

Author

Vincent Champain, Feb 08 2019

Keywords

Comments

Linear hydrocarbons are molecules made of carbon (C) and hydrogen (H) atoms organized without cycles.
a(n) <= A002986(n) because molecules can be acyclic but not linear (i.e., including carbon atoms bonded with more than two other carbons).
From Petros Hadjicostas, Nov 16 2019: (Start)
We prove Vaclav Kotesovec's conjectures from the Formula section. Let M = [[0,0,1], [0,1,1], [1,1,1]], X(n) = M^(n-2), and Y(n) = M^(floor(n/2)-2) = X(floor(n/2)) (with negative powers indicating matrix inverses). Let also, t_1 = [1,1,1]^T, t_2 = [1,2,2]^T, and t_3 = [1,2,3]^T. In addition, define b(n) = (1/2)*(t_1^T X(n) t_1) and c(n) = (1/2)*(t_3^T Y(n) t_1) if n is even and = (1/2)*(t_2^T Y(n) t_1) if n is odd.
We have a(n) = b(n) + c(n) for n >= 1. Since the characteristic polynomial of Vaclav Kotesovec's recurrence is x^9 - 2*x^8 - 3*x^7 + 5*x^6 + x^5 + 2*x^3 - 3*x^2 - x + 1 = g(x)*g(x^2), where g(x) = x^3 - 2*x^2 - x + 1, to prove his first conjecture, it suffices to show that b(n) - 2*b(n-1) - b(n-2) + b(n-3) = 0 (whose characteristic polynomial is g(x)) and c(n) - 2*c(n-2) - c(n-4) + c(n-6) = 0 (whose characteristic polynomial is g(x^2)).
Note that 2*b(n) = A006356(n-1) for n >= 1. (See the comments by L. Edson Jeffery and R. J. Mathar in the documentation of that sequence.) Also, 2*c(2*n) = A006356(n) and 2*c(2*n-1) = A006054(n+1) for n >= 1.
Properties of the polynomial g(x) = x^3 - 2*x^2 - x + 1 and its roots were studied by Witula et al. (2006) (see Corollary 2.4). This means that a(n) can essentially be expressed in terms of exp(I*2*Pi/7), but we omit the discussion. See also the comments for sequence A006054.
The characteristic polynomial of matrix M is g(x). By the Cayley-Hamilton theorem, 0 = g(M) = M^3 - 2*M^2 - M + I_3, and thus, for n >= 5, X(n) - 2*X(n-1) - X(n-2) + X(n-3) = M^(n-2) - 2*M^(n-3) - M^(n-4) + M^(n-5) = 0. Pre-multiplying by (1/2)*t_1^T and post-multiplying by t_1, we get that b(n) - 2*b(n-1) - b(n-2) + b(n-3) = 0 for n >= 5.
Similarly, for n >= 10, Y(n) - 2*Y(n-2) - Y(n-4) + Y(n-6) = X(floor(n/2)) - 2*X(floor((n-2)/2)) - X(floor((n-4)/2)) + X(floor((n-6)/2)) = X(floor(n/2)) - 2*X(floor(n/2) - 1) - X(floor(n/2) - 2) + X(floor(n/2) - 3) = 0. Pre-multiplying by (1/2)*t_3^T (when n is even) or by (1/2)*t_2^T (when n is odd), and post-multiplying by t_1, we get c(n) - 2*c(n-2) - c(n-4) + c(n-6) = 0 for n >= 10.
Since the characteristic polynomial of Vaclav Kotesovec's recurrence is g(x)*g(x^2), which is a polynomial of degree 9, the denominator of the g.f. of the sequence (a(n): n >= 1) should be x^9*g(1/x)*g(1/x^2) = (1 - 2*x - x^2 + x^3)*(1 - 2*x^2 - x^4 + x^6), as Vaclav Kotesovec conjectured below. The numerator of Vaclav Kotesovec's g.f. can be easily derived using the initial conditions (from a(1) = 1 to a(9) = 409). (End)

Examples

			For n=1, there is one possibility: CH4.
For n=2, there are 3 solutions: CHCH, CH3CH3, CH2CH2.
For n=3, there are 4 solutions: CHCCH3, CH2CCH2, CH3CHCH2, CH3CH2CH3.
For n=6, there are 42 solutions: CH3CH2CHCHCCH, CH3CH2CHCHCH2CH3, CH2CHCCCHCH2, CH2CHCHCHCH2CH3, CH2CHCHCHCCH, CH2CCCCHCH3, CHCCCCHCH2, CH3CHCHCHCHCH3, CHCCHCHCCH, CH2CCCCCH2, CH3CCCH2CH2CH3, CH3CCCCCH3, CH3CH2CH2CH2CH2CH3, CH2CHCHCHCHCH2, CH2CCHCH2CHCH2, CH3CHCCCHCH3, CHCCH2CH2CH2CH3, CHCCH2CH2CCH, CH3CCCH2CHCH2, CH2CCCHCH2CH3, CH2CCCHCCH, CHCCH2CCCH3, CHCCH2CHCCH2, CH3CH2CH2CH2CHCH2, CH2CHCHCCHCH3, CH3CH2CCCH2CH3, CH2CHCH2CH2CHCH2, CH2CHCHCCCH2, CH3CHCCHCH2CH3, CH3CH2CH2CHCHCH3, CH3CHCCHCCH, CHCCH2CH2CHCH2, CH3CHCHCCCH3, CH2CCHCCCH3, CH3CHCHCHCCH2, CHCCCCH2CH3, CH2CHCH2CHCHCH3, CH2CCHCHCCH2, CHCCCCCH, CH2CCHCH2CH2CH3, CH3CH2CCCHCH2, CHCCH2CHCHCH3.
		

Crossrefs

Other hydrocarbon related sequences: A002986, A018190, A129012.

Programs

  • Maple
    with(LinearAlgebra):
    M := Matrix([[0, 0, 1], [0, 1, 1], [1, 1, 1]]):
    X := proc(n) MatrixPower(M, n - 2): end proc:
    Y := proc(n) MatrixPower(M, floor(1/2*n) - 2): end proc:
    a := proc(n) `if`(n < 4, [1,3,4][n], 1/2*(add(add(X(n)[i, j], i = 1..3), j = 1..3) + add(add(Y(n)[i, j]*min(j, 3 - (n mod 2)), i = 1..3), j = 1..3))):
         end proc:
    seq(a(n), n=1..40); # Petros Hadjicostas, Nov 17 2019
  • Mathematica
    M = {{0, 0, 1}, {0, 1, 1}, {1, 1, 1}};
    X[n_] := MatrixPower[M, n - 2];
    Y[n_] := MatrixPower[M, Floor[1/2*n] - 2];
    a[n_] := If[n < 4, {1, 3, 4}[[n]], 1/2*(Sum[Sum[X[n][[i, j]], {i, 1, 3}], {j, 1, 3}] + Sum[Sum[Y[n][[i, j]]*Min[j, 3 - Mod[n, 2]], {i, 1, 3}], {j, 1, 3}])];
    Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Aug 16 2023, after Petros Hadjicostas *)
  • Python
    from numpy import array as npa
    from numpy.linalg import matrix_power as npow
    def F(n):
         if n<4: return([0,1,3,4][n])
         m=npa([[0,0,1],[0,1,1],[1,1,1]],dtype=object)
         m2=npow(m,n//2-2)
         return((sum(sum(npow(m,n-2)))+sum(sum(m2[j]*min(j+1,3-(n&1)) for j in range(3))))//2)

Formula

a(n) = (1/2) * (Sum_{i,j = 1..3} X_{ij} + Sum_{i,j = 1..3} Y_{ij} * min(j, 3 - (n&1))), where M = [[0,0,1], [0,1,1], [1,1,1]], X = [X_{ij}: i,j = 1..3] = M^(n-2), and Y = [Y_{ij}: i,j = 1..3] = M^(floor(n/2)-2)) for n >= 1 (with negative powers indicating matrix inverses). [Edited by Petros Hadjicostas, Nov 16 2019]
Conjectures from Vaclav Kotesovec, Feb 12 2019: (Start)
a(n) = 2*a(n-1) + 3*a(n-2) - 5*a(n-3) - a(n-4) - 2*a(n-6) + 3*a(n-7) + a(n-8) - a(n-9), for n >= 10.
G.f.: (1 - x - 2*x^2 - x^4 + 2*x^5 + x^6 - x^7) / ((1 - 2*x - x^2 + x^3)*(1 - 2*x^2 - x^4 + x^6)) - 1. (End) [These conjectures are true. See my comments above. - Petros Hadjicostas, Nov 17 2019]
From Petros Hadjicostas, Nov 17 2019: (Start)
a(2*n) = (1/2)*(A006356(2*n-1) + A006356(n)).
a(2*n-1) = (1/2)*(A006356(2*n-2) + A006054(n+1)). (End)

A305188 Numbers that are equal to a nontrivial multinomial coefficient (i.e., equal to k!/(k1!*...*km!) with k1 + ... + km = k, k-2 >= k1 >= ... >= km).

Original entry on oeis.org

6, 10, 12, 15, 20, 21, 24, 28, 30, 35, 36, 42, 45, 55, 56, 60, 66, 70, 72, 78, 84, 90, 91, 105, 110, 120, 126, 132, 136, 140, 153, 156, 165, 168, 171, 180, 182, 190, 210, 220, 231, 240, 252, 253, 272, 276, 280, 286, 300, 306, 325, 330, 336, 342, 351, 360, 364
Offset: 1

Author

Vincent Champain, May 27 2018

Keywords

Comments

This sequence answers the following question: what numbers correspond to the number of permutations of a number of items that is lower than the number of permutations itself? It means that the underlying structure has some form of redundance / symmetry.
It can be shown that:
- no prime number is part of this sequence (see A304938)
- some nonprimes are not part of the sequence (beginning with 1, 4, 8, 9, 14, 16, 18, ...)
- any number that is a factorial of another integer e is part of this sequence (k=e, k1=ki=...=ke=1).
This sequence is a generalization of A006987.
From David A. Corneth, May 28 2018: (Start)
Also the numbers that are the number of permutations of either:
- sets of balls with two distinct colors of balls where each color occurs at least twice;
- sets of balls with at least three distinct colors of balls.
(End)
From Amiram Eldar, Jul 23 2020: (Start)
The asymptotic density of this sequence is 0 (Niven, 1951).
The number of terms not exceeding x is (1 + sqrt(2)) * x^(1/2) + o(x^(1/2)) (Erdős, 1954). (End)

Examples

			a(1) = 6 because all numbers lower than 6 are either prime or a power of primes.
105 is a term of the sequence because 105 is equal to a multinomial coefficient: 105 = (4+2+1)! / (4! * 2! * 1!) and 105 is the number of ways 7 balls can be sorted where 4 are red, 2 are yellow and one is blue.
2016 is a term because 64! / (62! * 2!) = 2016. - _David A. Corneth_, May 29 2018
		

Crossrefs

Programs

  • Mathematica
    mult[w_] := Total[w]!/Times @@ (w!); L = {}; Do[ t = mult /@ Select[ IntegerPartitions@ n, #[[1]] < n-1 &]; L = Union[L, Select[t, # <= 400 &]], {n, 3, 30}]; L (* Terms < 400, Giovanni Resta, May 27 2018 *)
  • Python
    # see link above

Extensions

a(28)-a(57) from Giovanni Resta, May 27 2018

A304938 a(n) is the smallest number which can be written in n different ways as an ordered product of prime factors.

Original entry on oeis.org

1, 6, 12, 24, 48, 30, 192, 384, 768, 72, 3072, 60, 12288, 24576, 144, 98304, 196608, 393216, 786432, 120, 288, 6291456, 12582912, 210, 50331648, 100663296, 201326592, 576, 805306368, 180, 3221225472, 6442450944, 12884901888, 25769803776, 432, 1152, 206158430208, 412316860416, 824633720832, 1649267441664
Offset: 1

Author

Vincent Champain, May 21 2018

Keywords

Comments

It can be easily demonstrated that a(n) exists for all n and is less than or equal to 2^(n-1)*3 since 2^(n-1)*3 can be written in n different ways.
If n is a prime number then a(n) = 2^(n-1)*3, but there are also nonprime numbers n with this property (e.g., 9 and 14).
If n=k! then a(n) is the product of the first k prime numbers.
Finding the terms up to 2^64 was the focus of the 4th question of the ICPC coding challenge in 2013.

Examples

			a(1) = 1 because only a prime power or the empty product (which equals 1) can be written in just one way, and no prime power is smaller than 1.
a(2) = 6 = 3 * 2 = 2 * 3 because none of 3, 4, 5 can be written in two different ways.
a(3) = 12 = 3 * 2 * 2 = 2 * 3 * 2 = 2 * 2 * 3 (each of 7, 8, 9, 10, 11 can be written in at most 2 ways).
a(4) = 24 = 2 * 2 * 2 * 3 (each of 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 can be written in at most 3 ways).
		

Crossrefs

Cf. A000961, A007283 (2^n*3), A008480 (number of ordered prime factorizations of n).
Subsequence of A025487.
The sorted version is A358526.

Programs

  • Mathematica
    uv=Table[Length[Permutations[Join@@ConstantArray@@@FactorInteger[n]]],{n,1,1000}];
    Table[Position[uv,k][[1,1]],{k,Min@@Complement[Range[Max@@uv],uv]-1}] (* Gus Wiseman, Nov 22 2022 *)
  • PARI
    a008480(n) = my(f=factor(n)); sum(k=1, #f~, f[k,2])!/prod(k=1, #f~, f[k,2]!);
    a(n) = {my(k=2); while (a008480(k) !=n, k++); k;} \\ Michel Marcus, May 23 2018

Formula

a(p) = 2^(p-1)*3 if p is a prime.
a(k!) = prime(k)# is the k-th primorial number. So for no m < k!, prime(k) | a(m). - David A. Corneth, May 24 2018
a(n) = min { k : A008480(k) = n }. - Alois P. Heinz, May 26 2018