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 22 results. Next

A065120 Highest power of 2 dividing A057335(n).

Original entry on oeis.org

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

Views

Author

Alford Arnold, Nov 12 2001

Keywords

Comments

a(n) appears on row 1 of the array illustrated in A066099.
Except for initial zero, ordinal transform of A062050. After initial zero, n-th chunk consists of n, one n-1, two (n-2)'s, ..., 2^(k-1) (n-k)'s, ..., 2^(n-1) 1's. - Franklin T. Adams-Watters, Sep 11 2006
Zero together with a triangle read by rows in which row j lists the first 2^(j-1) terms of A001511 in nonincreasing order, j >= 1, see example. Also row j lists the first parts, in nonincreasing order, of the compositions of j. - Omar E. Pol, Sep 11 2013
The n-th row represents the frequency distribution of 1, 2, 3, ..., 2^(n-1) in the first 2^n - 1 terms of A003602. - Gary W. Adamson, Jun 10 2021

Examples

			A057335(7)= 30 and 30 = 2*3*5 so a(7) = 1; A057335(9)= 24 and 24 = 8*3 so a(9) = 3
From _Omar E. Pol_, Aug 30 2013: (Start)
Written as an irregular triangle with row lengths A011782:
  0;
  1;
  2,1;
  3,2,1,1;
  4,3,2,2,1,1,1,1;
  5,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1;
  6,5,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
  ...
Column 1 is A001477. Row sums give A000225. Row lengths is A011782.
(End)
		

Crossrefs

Programs

  • Mathematica
    nmax = 105;
    A062050 = Flatten[Table[Range[2^n], {n, 0, Log[2, nmax] // Ceiling}]];
    Module[{b}, b[_] = 0;
    a[n_] := If[n == 0, 0, With[{t = A062050[[n]]}, b[t] = b[t] + 1]]];
    a /@ Range[0, nmax] (* Jean-François Alcover, Jan 12 2022 *)
  • PARI
    lista(nn) = {my(v = vector(nn)); v[1] = 1; for (i=2, nn, v[i] = mg(i-1)*v[(i+1)\2];); for (i=1, nn, print1(valuation(v[i], 2), ", "););} \\ Michel Marcus, Feb 09 2014
    
  • PARI
    my(L(n)=if(n,logint(n,2),-1)); a(n) = my(p=L(n)); p - L(n-1<Kevin Ryde, Aug 06 2021

Formula

From Daniel Starodubtsev, Aug 05 2021: (Start)
a(n) = A001511(A059894(n) - 2^A000523(n) + 1) for n > 0 with a(0) = 0.
a(2n+1) = a(n), a(2n) = a(n) + A036987(n-1) for n > 1 with a(0) = 0, a(1) = 1. (End)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003

A066099 Triangle read by rows, in which row n lists the compositions of n in reverse lexicographic order.

Original entry on oeis.org

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

Views

Author

Alford Arnold, Dec 30 2001

Keywords

Comments

The representation of the compositions (for fixed n) is as lists of parts, the order between individual compositions (for the same n) is (list-)reversed lexicographic; see the example by Omar E. Pol. - Joerg Arndt, Sep 03 2013
This is the standard ordering for compositions in this database; it is similar to the Mathematica ordering for partitions (A080577). Other composition orderings include A124734 (similar to the Abramowitz & Stegun ordering for partitions, A036036), A108244 (similar to the Maple partition ordering, A080576), etc (see crossrefs).
Factorize each term in A057335; sequence records the values of the resulting exponents. It also runs through all possible permutations of multiset digits.
This can be regarded as a table in two ways: with each composition as a row, or with the compositions of each integer as a row. The first way has A000120 as row lengths and A070939 as row sums; the second has A001792 as row lengths and A001788 as row sums. - Franklin T. Adams-Watters, Nov 06 2006
This sequence includes every finite sequence of positive integers. - Franklin T. Adams-Watters, Nov 06 2006
Compositions (or ordered partitions) are also generated in sequence A101211. - Alford Arnold, Dec 12 2006
The equivalent sequence for partitions is A228531. - Omar E. Pol, Sep 03 2013
The sole partition of zero has no components, not a single component of length one. Hence the first nonempty row is row 1. - Franklin T. Adams-Watters, Apr 02 2014 [Edited by Andrey Zabolotskiy, May 19 2018]
See sequence A261300 for another version where the terms of each composition are concatenated to form one single integer: (0, 1, 2, 11, 3, 21, 12, 111,...). This also shows how the terms can be obtained from the binary numbers A007088, cf. Arnold's first Example. - M. F. Hasler, Aug 29 2015
The k-th composition in the list is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This is described as the standard ordering used in the OEIS, although the sister sequence A228351 is also sometimes considered to be canonical. Both sequences define a bijective correspondence between nonnegative integers and integer compositions. - Gus Wiseman, May 19 2020
First differences of A030303 = positions of bits 1 in the concatenation A030190 (= A030302) of numbers written in binary (A007088). - Indices of record values (= first occurrence of n) are given by A005183: a(A005183(n)) = n, cf. FORMULA for more. - M. F. Hasler, Oct 12 2020
The geometric mean approaches the Somos constant (A112302). - Jwalin Bhatt, Feb 10 2025

Examples

			A057335 begins 1 2 4 6 8 12 18 30 16 24 36 ... so we can write
  1 2 1 3 2 1 1 4 3 2 2 1 1 1 1 ...
  . . 1 . 1 2 1 . 1 2 1 3 2 1 1 ...
  . . . . . . 1 . . . 1 . 1 2 1 ...
  . . . . . . . . . . . . . . 1 ...
and the columns here gives the rows of the triangle, which begins
  1
  2; 1 1
  3; 2 1; 1 2; 1 1 1
  4; 3 1; 2 2; 2 1 1; 1 3; 1 2 1; 1 1 2; 1 1 1 1
  ...
From _Omar E. Pol_, Sep 03 2013: (Start)
Illustration of initial terms:
  -----------------------------------
  n  j       Diagram   Composition j
  -----------------------------------
  .               _
  1  1           |_|   1;
  .             _ _
  2  1         |  _|   2,
  2  2         |_|_|   1, 1;
  .           _ _ _
  3  1       |    _|   3,
  3  2       |  _|_|   2, 1,
  3  3       | |  _|   1, 2,
  3  4       |_|_|_|   1, 1, 1;
  .         _ _ _ _
  4  1     |      _|   4,
  4  2     |    _|_|   3, 1,
  4  3     |   |  _|   2, 2,
  4  4     |  _|_|_|   2, 1, 1,
  4  5     | |    _|   1, 3,
  4  6     | |  _|_|   1, 2, 1,
  4  7     | | |  _|   1, 1, 2,
  4  8     |_|_|_|_|   1, 1, 1, 1;
(End)
		

Crossrefs

Lists of compositions of integers: this sequence (reverse lexicographic order; minus one gives A108730), A228351 (reverse colexicographic order - every composition is reversed; minus one gives A163510), A228369 (lexicographic), A228525 (colexicographic), A124734 (length, then lexicographic; minus one gives A124735), A296774 (length, then reverse lexicographic), A337243 (length, then colexicographic), A337259 (length, then reverse colexicographic), A296773 (decreasing length, then lexicographic), A296772 (decreasing length, then reverse lexicographic), A337260 (decreasing length, then colexicographic), A108244 (decreasing length, then reverse colexicographic), also A101211 and A227736 (run lengths of bits).
Cf. row length and row sums for different splittings into rows: A000120, A070939, A001792, A001788.
Cf. lists of partitions of integers, or multisets of integers: A026791 and crosserfs therein, A112798 and crossrefs therein.
See link for additional crossrefs pertaining to standard compositions.
A related ranking of finite sets is A048793/A272020.

Programs

  • Haskell
    a066099 = (!!) a066099_list
    a066099_list = concat a066099_tabf
    a066099_tabf = map a066099_row [1..]
    a066099_row n = reverse $ a228351_row n
    -- (each composition as a row)
    -- Peter Kagey, Aug 25 2016
    
  • Mathematica
    Table[FactorInteger[Apply[Times, Map[Prime, Accumulate @ IntegerDigits[n, 2]]]][[All, -1]], {n, 41}] // Flatten (* Michael De Vlieger, Jul 11 2017 *)
    stc[n_] := Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]] // Reverse;
    Table[stc[n], {n, 0, 20}] // Flatten (* Gus Wiseman, May 19 2020 *)
    Table[Reverse @ LexicographicSort @ Flatten[Permutations /@ Partitions[n], 1], {n, 10}] // Flatten (* Eric W. Weisstein, Jun 26 2023 *)
  • PARI
    arow(n) = {local(v=vector(n),j=0,k=0);
       while(n>0,k++; if(n%2==1,v[j++]=k;k=0);n\=2);
       vector(j,i,v[j-i+1])} \\ returns empty for n=0. - Franklin T. Adams-Watters, Apr 02 2014
    
  • Python
    from itertools import islice
    from itertools import accumulate, count, groupby, islice
    def A066099_gen():
        for i in count(1):
            yield [len(list(g)) for _,g in groupby(accumulate(int(b) for b in bin(i)[2:]))]
    A066099 = list(islice(A066099_gen(), 120))  # Jwalin Bhatt, Feb 28 2025
  • Sage
    def a_row(n): return list(reversed(Compositions(n)))
    flatten([a_row(n) for n in range(1,6)]) # Peter Luschny, May 19 2018
    

Formula

From M. F. Hasler, Oct 12 2020: (Start)
a(n) = A030303(n+1) - A030303(n).
a(A005183(n)) = n; a(A005183(n)+1) = n-1 (n>1); a(A005183(n)+2) = 1. (End)

Extensions

Edited with additional terms by Franklin T. Adams-Watters, Nov 06 2006
0th row removed by Andrey Zabolotskiy, May 19 2018

A019565 The squarefree numbers ordered lexicographically by their prime factorization (with factors written in decreasing order). a(n) = Product_{k in I} prime(k+1), where I is the set of indices of nonzero binary digits in n = Sum_{k in I} 2^k.

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 42, 35, 70, 105, 210, 11, 22, 33, 66, 55, 110, 165, 330, 77, 154, 231, 462, 385, 770, 1155, 2310, 13, 26, 39, 78, 65, 130, 195, 390, 91, 182, 273, 546, 455, 910, 1365, 2730, 143, 286, 429, 858, 715, 1430, 2145, 4290
Offset: 0

Views

Author

Keywords

Comments

A permutation of the squarefree numbers A005117. The missing positive numbers are in A013929. - Alois P. Heinz, Sep 06 2014
From Antti Karttunen, Apr 18 & 19 2017: (Start)
Because a(n) toggles the parity of n there are neither fixed points nor any cycles of odd length.
Conjecture: there are no finite cycles of any length. My grounds for this conjecture: any finite cycle in this sequence, if such cycles exist at all, must have at least one member that occurs somewhere in A285319, the terms that seem already to be quite rare. Moreover, any such a number n should satisfy in addition to A019565(n) < n also that A048675^{k}(n) is squarefree, not just for k=0, 1 but for all k >= 0. As there is on average a probability of only 6/(Pi^2) = 0.6079... that any further term encountered on the trajectory of A048675 is squarefree, the total chance that all of them would be squarefree (which is required from the elements of A019565-cycles) is soon minuscule, especially as A048675 is not very tightly bounded (many trajectories seem to skyrocket, at least initially). I am also assuming that usually there is no significant correlation between the binary expansions of n and A048675(n) (apart from their least significant bits), or, for that matter, between their prime factorizations.
See also the slightly stronger conjecture in A285320, which implies that there would neither be any two-way infinite cycles.
If either of the conjectures is false (there are cycles), then certainly neither sequence A285332 nor its inverse A285331 can be a permutation of natural numbers. (End)
The conjecture made in A087207 (see also A288569) implies the two conjectures mentioned above. A further constraint for cycles is that in any A019565-trajectory which starts from a squarefree number (A005117), every other term is of the form 4k+2, while every other term is of the form 6k+3. - Antti Karttunen, Jun 18 2017
The sequence satisfies the exponential function identity, a(x + y) = a(x) * a(y), whenever x and y do not have a 1-bit in the same position, i.e., when A004198(x,y) = 0. See also A283475. - Antti Karttunen, Oct 31 2019
The above identity becomes unconditional if binary exclusive OR, A003987(.,.), is substituted for addition, and A059897(.,.), a multiplicative equivalent of A003987, is substituted for multiplication. This gives us a(A003987(x,y)) = A059897(a(x), a(y)). - Peter Munn, Nov 18 2019
Also the Heinz number of the binary indices of n, where the Heinz number of a sequence (y_1,...,y_k) is prime(y_1)*...*prime(y_k), and a number's binary indices (A048793) are the positions of 1's in its reversed binary expansion. - Gus Wiseman, Dec 28 2022

Examples

			5 = 2^2+2^0, e_1 = 2, e_2 = 0, prime(2+1) = prime(3) = 5, prime(0+1) = prime(1) = 2, so a(5) = 5*2 = 10.
From _Philippe Deléham_, Jun 03 2015: (Start)
This sequence regarded as a triangle withs rows of lengths 1, 1, 2, 4, 8, 16, ...:
   1;
   2;
   3,  6;
   5, 10, 15, 30;
   7, 14, 21, 42, 35,  70, 105, 210;
  11, 22, 33, 66, 55, 110, 165, 330, 77, 154, 231, 462, 385, 770, 1155, 2310;
  ...
(End)
From _Peter Munn_, Jun 14 2020: (Start)
The initial terms are shown below, equated with the product of their prime factors to exhibit the lexicographic order. We start with 1, since 1 is factored as the empty product and the empty list is first in lexicographic order.
   n     a(n)
   0     1 = .
   1     2 = 2.
   2     3 = 3.
   3     6 = 3*2.
   4     5 = 5.
   5    10 = 5*2.
   6    15 = 5*3.
   7    30 = 5*3*2.
   8     7 = 7.
   9    14 = 7*2.
  10    21 = 7*3.
  11    42 = 7*3*2.
  12    35 = 7*5.
(End)
		

Crossrefs

Row 1 of A285321.
Equivalent sequences for k-th-power-free numbers: A101278 (k=3), A101942 (k=4), A101943 (k=5), A054842 (k=10).
Cf. A109162 (iterates).
Cf. also A048675 (a left inverse), A087207, A097248, A260443, A054841.
Cf. A285315 (numbers for which a(n) < n), A285316 (for which a(n) > n).
Cf. A276076, A276086 (analogous sequences for factorial and primorial bases), A334110 (terms squared).
For partial sums see A288570.
A003961, A003987, A004198, A059897, A089913, A331590, A334747 are used to express relationships between sequence terms.
Column 1 of A329332.
Even bisection (which contains the odd terms): A332382.
A160102 composed with A052330, and subsequence of the latter.
Related to A000079 via A225546, to A057335 via A122111, to A008578 via A336322.
Least prime index of a(n) is A001511.
Greatest prime index of a(n) is A029837 or A070939.
Taking prime indices gives A048793, reverse A272020, row sums A029931.
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Haskell
    a019565 n = product $ zipWith (^) a000040_list (a030308_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    
  • Maple
    a:= proc(n) local i, m, r; m:=n; r:=1;
          for i while m>0 do if irem(m,2,'m')=1
            then r:=r*ithprime(i) fi od; r
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 06 2014
  • Mathematica
    Do[m=1;o=1;k1=k;While[ k1>0, k2=Mod[k1, 2];If[k2\[Equal]1, m=m*Prime[o]];k1=(k1-k2)/ 2;o=o+1];Print[m], {k, 0, 55}] (* Lei Zhou, Feb 15 2005 *)
    Table[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2], {n, 0, 55}]  (* Michael De Vlieger, Aug 27 2016 *)
    b[0] := {1}; b[n_] := Flatten[{ b[n - 1], b[n - 1] * Prime[n] }];
      a = b[6] (* Fred Daniel Kline, Jun 26 2017 *)
  • PARI
    a(n)=factorback(vecextract(primes(logint(n+!n,2)+1),n))  \\ M. F. Hasler, Mar 26 2011, updated Aug 22 2014, updated Mar 01 2018
    
  • Python
    from operator import mul
    from functools import reduce
    from sympy import prime
    def A019565(n):
        return reduce(mul,(prime(i+1) for i,v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1
    # Chai Wah Wu, Dec 25 2014
    
  • Scheme
    (define (A019565 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) p) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (* p (A000040 i)))) (else (loop (/ n 2) (+ 1 i) p))))) ;; (Requires only the implementation of A000040 for prime numbers.) - Antti Karttunen, Apr 20 2017

Formula

G.f.: Product_{k>=0} (1 + prime(k+1)*x^2^k), where prime(k)=A000040(k). - Ralf Stephan, Jun 20 2003
a(n) = f(n, 1, 1) with f(x, y, z) = if x > 0 then f(floor(x/2), y*prime(z)^(x mod 2), z+1) else y. - Reinhard Zumkeller, Mar 13 2010
For all n >= 0: A048675(a(n)) = n; A013928(a(n)) = A064273(n). - Antti Karttunen, Jul 29 2015
a(n) = a(2^x)*a(2^y)*a(2^z)*... = prime(x+1)*prime(y+1)*prime(z+1)*..., where n = 2^x + 2^y + 2^z + ... - Benedict W. J. Irwin, Jul 24 2016
From Antti Karttunen, Apr 18 2017 and Jun 18 2017: (Start)
a(n) = A097248(A260443(n)), a(A005187(n)) = A283475(n), A108951(a(n)) = A283477(n).
A055396(a(n)) = A001511(n), a(A087207(n)) = A007947(n). (End)
a(2^n - 1) = A002110(n). - Michael De Vlieger, Jul 05 2017
a(n) = A225546(A000079(n)). - Peter Munn, Oct 31 2019
From Peter Munn, Mar 04 2022: (Start)
a(2n) = A003961(a(n)); a(2n+1) = 2*a(2n).
a(x XOR y) = A059897(a(x), a(y)) = A089913(a(x), a(y)), where XOR denotes bitwise exclusive OR (A003987).
a(n+1) = A334747(a(n)).
a(x+y) = A331590(a(x), a(y)).
a(n) = A336322(A008578(n+1)).
(End)

Extensions

Definition corrected by Klaus-R. Löffler, Aug 20 2014
New name from Peter Munn, Jun 14 2020

A055932 Numbers all of whose prime divisors are consecutive primes starting at 2.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 30, 32, 36, 48, 54, 60, 64, 72, 90, 96, 108, 120, 128, 144, 150, 162, 180, 192, 210, 216, 240, 256, 270, 288, 300, 324, 360, 384, 420, 432, 450, 480, 486, 512, 540, 576, 600, 630, 648, 720, 750, 768, 810, 840, 864, 900, 960, 972
Offset: 1

Views

Author

Leroy Quet, Jul 17 2000

Keywords

Comments

a(n) is also the sorted version of A057335 which is generated recursively using the formula A057335 = A057334 * A057335(repeated), where A057334 = A000040(A000120). - Alford Arnold, Nov 11 2001
Squarefree kernels of these numbers are primorial numbers. See A080404. - Labos Elemer, Mar 19 2003
If u and v are terms then so is u*v. - Reinhard Zumkeller, Nov 24 2004
Except for the initial value a(1) = 1, a(n) gives the canonical primal code of the n-th finite sequence of positive integers, where n = (prime_1)^c_1 * ... * (prime_k)^c_k is the code for the finite sequence c_1, ..., c_k. See examples of primal codes at A106177. - Jon Awbrey, Jun 22 2005
From Daniel Forgues, Jan 24 2011: (Start)
Least integer, in increasing order, of each ordered prime signature.
The least integer of each ordered prime signature are the smallest numbers with a given tuple of exponents of prime factors.
The ordered prime signature (where the order of exponents matters) of n corresponds to a given composition of Omega(n), as opposed to the prime signature of n, which corresponds to a given partition of Omega(n). (End)
Except for the initial entry 1, the entries of the sequence are the Heinz numbers of all partitions that contain all parts 1,2,...,k, where k is the largest part. The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1,1,2,4,10] the Heinz number is 2*2*3*7*29 = 2436. The number 150 (= 2*3*5*5) is in the sequence because it is the Heinz number of the partition [1,2,3,3]. - Emeric Deutsch, May 22 2015
Numbers n such that A053669(n) > A006530(n). - Anthony Browne, Jun 06 2016
From David W. Wilson, Dec 28 2018: (Start)
Numbers n such that for primes p > q, p | n => q | n.
Numbers n such that prime p | n => A034386(p) | n. (End)

Examples

			60 is included because 60 = 2^2 * 3 * 5 and 2, 3 and 5 are consecutive primes beginning at 2.
Sequence A057335 begins
1..2..4..6..8..12..18..30..16..24..36..60..54..90..150..210... which is equal to
1..2..2..3..2...3...3...5...2...3...3...5...3...5....5....7... times
1..1..2..2..4...4...6...6...8...8..12..12..18..18...30...30...
		

Crossrefs

Programs

  • Magma
    [1] cat [k:k in[2..1000 by 2]|forall{i:i in [1..#PrimeDivisors(k)-1]|NextPrime(pd[i]) in pd where pd is PrimeDivisors(k)}]; // Marius A. Burtea, Feb 01 2020
    
  • Maple
    isA055932 := proc(n)
        local s,p ;
        s := numtheory[factorset](n) ;
        for p in s do
            if p > 2 and not prevprime(p)  in s then
                return false;
            end if;
        end do:
        true ;
    end proc:
    for n from 2 to 100 do
        if isA055932(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Oct 02 2012
  • Mathematica
    Select[Range[1000], #==1||FactorInteger[ # ][[ -1, 1]]==Prime[Length[FactorInteger[ # ]]]&]
    cpQ[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},f=={1}||f==Prime[ Range[Length[f]]]]; Select[Range[1000],cpQ] (* Harvey P. Dale, Jul 14 2012 *)
  • PARI
    is(n)=my(f=factor(n)[,1]~);f==primes(#f) \\ Charles R Greathouse IV, Aug 22 2011
    
  • PARI
    list(lim,p=2)=my(v=[1],q=nextprime(p+1),t=1);while((t*=p)<=lim,v=concat(v,t*list(lim\t,q))); vecsort(v) \\ Charles R Greathouse IV, Oct 02 2012
    
  • Python
    from itertools import count, islice
    from sympy import primepi, primefactors
    def A055932_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            p = list(map(primepi,primefactors(k)))
            if k==1 or (min(p)==1 and max(p)==len(p)):
                yield k
    A055932_list = list(islice(A055932_gen(),40)) # Chai Wah Wu, Aug 07 2025

Formula

Sum_{n>=1} 1/a(n) = Sum_{n>=0} 1/A005867(n) = 2.648101... (A345974). - Amiram Eldar, Jun 26 2025

Extensions

Edited by Daniel Forgues, Jan 24 2011

A287352 Irregular triangle T(n,k) = A112798(n,1) followed by first differences of A112798(n).

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, May 23 2017

Keywords

Comments

Irregular triangle T(n,k) = first differences of indices of prime divisors p of n.
Row lengths = (big) Omega(n) = A001222(n).
Row sums = A061395(n).
Row maxima = A286469(n).
We can concatenate the rows 1 <= n <= 28 as none of the values of k in this range exceed 9: {0, 1, 2, 10, 3, 11, 4, 100, 20, 12, 5, 101, 6, 13, 21, 1000, 7, 110, 8, 102, 22, 14, 9, 1001, 30, 15, 200, 103}; a(29) = {10}, which would require a digit greater than 9.
a(1) = 0 by convention.
a(0) is not defined (i.e., null set). a(n) is defined for positive nonzero n.
a(p) = A000720(p) for p prime.
a(p^e) = A000720(p) followed by (e - 1) zeros.
a(Product(p^e)) is the concatenation of the a(p^e) of the unitary prime power divisors p^e of n, sorted by the prime p (i.e. the function a(n) mapped across the terms of row n of A141809).
a(A002110(n)) = an array of n 1s.
T(n,k) could be used to furnish A054841(n). We read data in row n of T(n,k). If T(n,1) = 0, then write 0. If T(n,1) > 0, then increment the k-th place from the right. For k > 1, increment the k-th place to the right of the last-incremented place.
T(n,k) can be used to render n in decimal. If T(n,1) = 0, then write 1. If T(n,1) > 0, then multiply 1 by A000720(T(n,1)). For k > 1, multiply the previous product by pi(x) = A000720(x) of the running total of T(n,k) for each k.
Ignoring zeros in row n > 1 and decoding the remaining values of T(n,k) as immediately above yields the squarefree kernel of n = A007947(n).
Leading zeros of a(n) are trimmed, but as in decimal notation numbers that include leading zeros symbolize the same n as without them. Zeros that precede nonzero values merely multiply implicit 1 by itself until we encounter nonzero values. Thus, {0,0,2} = 1*1*pi(2) = 3, as {2} = pi(2) = 3. Because of this no row n > 1 has 0 for k = 1 of T(n,k).
Interpreting n written in binary as a row of a(n) yields A057335(n).

Examples

			a(1) = {0} by convention.
a(2) = {pi(2)} = {1}.
a(4) = {pi(2), pi(2) - pi(2)}, = {1, 0} since 4 = 2 * 2.
a(6) = {pi(2), pi(3) - pi(2)} = {1, 1} since 6 = 2 * 3.
a(12) = {pi(2), pi(2) - pi(2), pi(3) - pi(2) - pi(2)} = {1, 0, 1}, since 12 = 2 * 2 * 3.
The triangle starts:
   1:  0;
   2:  1;
   3:  2;
   4:  1, 0;
   5:  3;
   6:  1, 1;
   7:  4;
   8:  1, 0, 0;
   9:  2, 0;
  10:  1, 2;
  11:  5;
  12:  1, 0, 1;
  13:  6;
  14:  1, 3;
  15:  2, 1;
  16:  1, 0, 0, 0;
  17:  7;
  18:  1, 1, 0;
  19:  8;
  20:  1, 0, 2;
       ...
		

Crossrefs

Programs

  • Mathematica
    Table[Prepend[Differences@ #, First@ #] & Flatten[FactorInteger[n] /. {p_, e_} /; p > 0 :> ConstantArray[PrimePi@ p, e]], {n, 41}] // Flatten (* Michael De Vlieger, May 23 2017 *)

Formula

T(n,1) = A117798(n,1); T(n,k) = A117798(n,k) - A117798(n, k - 1) for 2 <= k <= A001222(n).

A056808 Members of A055932 which are not least prime signatures (cf. A025487).

Original entry on oeis.org

18, 54, 90, 108, 150, 162, 270, 300, 324, 450, 486, 540, 600, 630, 648, 750, 810, 972, 1050, 1200, 1350, 1458, 1470, 1500, 1620, 1890, 1944, 2100, 2250, 2400, 2430, 2700, 2916, 2940, 3000, 3150, 3240, 3750, 3780, 3888, 4050, 4200, 4374, 4410, 4500, 4800
Offset: 1

Views

Author

Alford Arnold, Aug 22 2000

Keywords

Examples

			18 = 2*3*3 and all prime divisors are consecutive primes but the least prime signature is 12 = 2*2*3; so a(1) = 18.
		

Crossrefs

Programs

  • Mathematica
    With[{nn = 4800}, Select[Range[2, nn], And[#1 != Times @@ MapIndexed[Prime[First@ #2]^#1 &, Sort[#3, Greater]], Last[#2] == Prime@ Length[#2]] & @@ Apply[Join, {{#1}, Transpose@ #2}] & @@ {#, FactorInteger[#]} &] ] (* Michael De Vlieger, Feb 06 2020 *)

Formula

{a(n) : n >= 1} = {A057335(A335485(k)) : k >= 1}. - Peter Munn, Feb 02 2024
Sum_{n>=1} 1/a(n) = A345974 - A161360 = 0.15229524564163275059... . - Amiram Eldar, Jun 26 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Nov 28 2000

A095684 Triangle read by rows. There are 2^(m-1) rows of length m, for m = 1, 2, 3, ... The rows are in lexicographic order. The rows have the property that the first entry is 1, the second distinct entry (reading from left to right) is 2, the third distinct entry is 3, etc.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 25 2004

Keywords

Comments

Row k is the unique multiset that covers an initial interval of positive integers and has multiplicities equal to the parts of the k-th composition in standard order (graded reverse-lexicographic, A066099). This composition is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. For example, the 13th composition is (1,2,1), so row 13 is {1,2,2,3}. - Gus Wiseman, Apr 26 2020

Examples

			1, 11, 12, 111, 112, 122, 123, 1111, 1112, 1122, 1123, 1222, 1223, 1233, ...
The 8 strings of length 4 are 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234.
From _Gus Wiseman_, Apr 26 2020: (Start)
The triangle read by columns begins:
  1:{1}  2:{1,1}  4:{1,1,1}   8:{1,1,1,1}  16:{1,1,1,1,1}
         3:{1,2}  5:{1,1,2}   9:{1,1,1,2}  17:{1,1,1,1,2}
                  6:{1,2,2}  10:{1,1,2,2}  18:{1,1,1,2,2}
                  7:{1,2,3}  11:{1,1,2,3}  19:{1,1,1,2,3}
                             12:{1,2,2,2}  20:{1,1,2,2,2}
                             13:{1,2,2,3}  21:{1,1,2,2,3}
                             14:{1,2,3,3}  22:{1,1,2,3,3}
                             15:{1,2,3,4}  23:{1,1,2,3,4}
                                           24:{1,2,2,2,2}
                                           25:{1,2,2,2,3}
                                           26:{1,2,2,3,3}
                                           27:{1,2,2,3,4}
                                           28:{1,2,3,3,3}
                                           29:{1,2,3,3,4}
                                           30:{1,2,3,4,4}
                                           31:{1,2,3,4,5}
(End)
		

Crossrefs

See A096299 for another version.
The number of distinct parts in row n is A000120(n), also the maximum part.
Row sums are A029931.
Heinz numbers of rows are A057335.
Row lengths are A070939.
Row products are A284001.
The version for prime indices is A305936.
There are A333942(n) multiset partitions of row n.
Multisets of compositions are counted by A034691.
Combinatory separations of normal multisets are A269134.
All of the following pertain to compositions in standard order (A066099):
- Necklaces are A065609.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon words are A275692.
- Dealings are counted by A333939.
- Distinct parts are counted by A334028.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}];
    Table[ptnToNorm[stc[n]],{n,15}] (* Gus Wiseman, Apr 26 2020 *)

A284001 a(n) = A005361(A283477(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 4, 6, 1, 2, 4, 6, 8, 12, 18, 24, 1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480, 600, 720, 1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480
Offset: 0

Views

Author

Antti Karttunen, Mar 18 2017

Keywords

Comments

a(n) is the product of elements of the multiset that covers an initial interval of positive integers with multiplicities equal to the parts of the n-th composition in standard order (graded reverse-lexicographic, A066099). This composition is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. For example, the 13th composition is (1,2,1) giving the multiset {1,2,2,3} with product 12, so a(13) = 12. - Gus Wiseman, Apr 26 2020

Crossrefs

Row products of A095684.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Weighted sum is A029931.
- Necklaces are A065609.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon words are A275692.
- Distinct parts are counted by A334028.

Programs

  • Mathematica
    Table[Times @@ FactorInteger[#][[All, -1]] &[Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]]], {n, 0, 93}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A005361(n) = factorback(factor(n)[, 2]); \\ From A005361
    A034386(n) = prod(i=1, primepi(n), prime(i));
    A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) };  \\ From A108951
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A283477(n) = A108951(A019565(n));
    A284001(n) = A005361(A283477(n));
    
  • Scheme
    (define (A284001 n) (A005361 (A283477 n)))

Formula

a(n) = A005361(A283477(n)).
a(n) = A003963(A057335(n)). - Gus Wiseman, Apr 26 2020
a(n) = A284005(A053645(n)) for n > 0 with a(0) = 1. - Mikhail Kurkov, Jun 05 2021 [verification needed]

A105552 Irregular triangle T(n,k) read down columns: the number of compositions c of n with largest_part(c)+length(c)=k+1 in row n, column k.

Original entry on oeis.org

1, 2, 4, 1, 7, 5, 2, 11, 14, 12, 5, 1, 16, 30, 39, 32, 18, 7, 2, 22, 55, 95, 113, 101, 71, 41, 18, 6, 1, 29, 91, 195, 299, 357, 350, 292, 207, 126, 64, 27, 9, 2, 37, 140, 357, 664, 978, 1204, 1283, 1198, 992, 731, 482, 284, 148, 66, 25, 7, 1, 46, 204, 602, 1309, 2274, 3329, 4253
Offset: 1

Views

Author

Alford Arnold, May 03 2005

Keywords

Comments

For each of the A000041(n) partitions of n, one can assign a weight to the partition which counts the permutations of that partition, given by the multinomial coefficient derived from the frequency representation of the parts.
An equivalent representation is given by writing down all compositions of n.
The entries count those partitions multiplied by their weights (=compositions) of n where the sum of the largest addend plus number of parts equals k+1. Only nonzero counts are entered into the sequence.
Each entry can also be interpreted as counting a subset of numbers in A055932, because there is a 1-to-1 correspondence between their prime signature and ordered partitions.
Each diagonal of T(n,k) can be decomposed into p(n) sequences. For example,
A086602 = 2 12 39 95 195 ... is the sum of
A000330 = 1 5 14 30 55 ... plus
A001296 = 1 7 25 65 140 ...
The main diagonal and subdiagonals in order of appearance are A000124, A000330, A086602, A089574, A107600, A107601, A109125, ...

Examples

			The row n=7 starts from the partitions (weights in parentheses) 7 (1), 6+1 (2), 5+2 (2), 4+3 (2), 5+1+1 (3), 4+2+1 (6=3!/1!/1!/1!), 3+3+1 (3), 3+2+2 (3), 4+1+1+1 (4=4!/1!/3!), 3+2+1+1 (12 = 4!/1!/1!/2!), 2+2+2+1 (4), 3+1+1+1+1+1 (5), 2+2+1+1+1 (10=5!/2!/3!), 2+1+1+1+1 (6), 1+1+1+1+1+1 (1).
Then T(7,7) = 1+2+3+4+5+6+1 = 22 is the sum of the weights of partitions with largest part 7 and length 1, largest part 6 and length 2,... largest part 1 and length 7.
T(7,6) = 2+6+12+10 = 30 is the sum of the weights of the partitions with largest part 6 and length 1, largest part 5 and length 2, ..., largest part 1 and length 6.
T(7,5) = 2+3+3+4 = 12 collects all the partitions with largest part 5 and length 1 down to largest part 1 and length 5.
The array has A033638(k) nonzero entries per column, starting at n=1 as :
1
..2
....4
....1..7
.......5..11
.......2..14..16
..........12..30..22
...........5..39..55..29
...........1..32..95..91..37
..............18.113.195.140
...............7.101.299.357
...............2
		

Crossrefs

Cf. A047969, A047970, A055932, A057335, A083480, A083906, A089349, A033638, A086602 (subdiagonal), A089574 (subdiagonal).

Programs

  • Maple
    A033638 := proc(n) ( (7+(-1)^n)/2 + n^2 )/4 ; end proc:
    freq := proc(L,n) local a,p; a := 0 ; for p in L do if p = n then a := a+1 ; end if; end do: a ; end proc:
    M3 := proc(L) local a,i; a := factorial(nops(L)) ; for i in convert(L,set) do a := a/factorial(freq(L,i)) ; end do: a ; end proc:
    A105552 := proc(n,k) local p,a,l ; a := 0 ; for p in combinat[partition](n) do if max(op(p)) + nops(p) = k+1 then a := a+ M3(p); end if; end do ; a ; end proc:
    for k from 1 to 15 do for n from k to k+A033638(k)+1 do T := A105552(n,k) ; if T >0 then printf("%d,", A105552(n,k)) ; end if; end do: printf("\n") ; end do: # R. J. Mathar, Jun 26 2010
    # second Maple program:
    b:= proc(n, k, p) option remember; `if`(n=0 and k=0, 1,
         `if`(k<1, 0, add(b(n-j, k-1-max(p, j)+p, max(p, j)), j=1..n)))
        end:
    T:= k-> seq(b(n, k+1, 0), n=k..k+floor((k-1)^2/4)):
    seq(T(k), k=1..10);  # Alois P. Heinz, Jul 24 2013
  • Mathematica
    b[n_, k_, p_] := b[n, k, p] = If[n == 0 && k == 0, 1, If[k < 1, 0, Sum[b[n - j, k - 1 - Max[p, j] + p, Max[p, j]], {j, 1, n}]]]; T[k_] := Table[b[n, k + 1, 0], {n, k, k + Floor[(k - 1)^2/4]}]; Table[T[k], {k, 1, 10}] // Flatten (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)

Formula

Row sums: Sum_{k=0..n} T(n,k) = 2^(n-1).
Column sums: Sum_{n>=k} T(n,k) = A047970(n).

Extensions

Definition clarified by R. J. Mathar, Jun 26 2010

A324939 Triangle T(n,k) read by rows in which n-th row lists in increasing order all compositions [c_1, c_2, ..., c_q] of n encoded as Product_{i=1..q} prime(i)^(c_i); n>=0, 1<=k<=A011782(n).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 30, 16, 24, 36, 54, 60, 90, 150, 210, 32, 48, 72, 108, 120, 162, 180, 270, 300, 420, 450, 630, 750, 1050, 1470, 2310, 64, 96, 144, 216, 240, 324, 360, 486, 540, 600, 810, 840, 900, 1260, 1350, 1500, 1890, 2100, 2250, 2940, 3150, 3750, 4410, 4620, 5250, 6930, 7350, 10290, 11550, 16170, 25410, 30030
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2019

Keywords

Comments

All terms sorted give A055932.
All terms first sorted by number of factors give A057335.

Examples

			Triangle T(n,k) begins:
   1;
   2;
   4,  6;
   8, 12, 18,  30;
  16, 24, 36,  54,  60,  90, 150, 210;
  32, 48, 72, 108, 120, 162, 180, 270, 300, 420, 450, 630, 750, 1050, 1470, 2310;
  ...
		

Crossrefs

Column k=1 gives A000079.
Last elements of rows give A002110.
Row sums give A325054.
Row lengths give A011782.

Programs

  • Maple
    b:= n-> `if`(n=0, [[]], [seq(map(x-> [j, x[]], b(n-j))[], j=1..n)]):
    T:= n-> sort(map(x-> mul(ithprime(i)^x[i], i=1..nops(x)), b(n)))[]:
    seq(T(n), n=0..7);
Showing 1-10 of 22 results. Next